Remove all trailing whitespace from the dalvik team-maintained parts of libcore.
Gentlemen, you may now set your editors to "strip trailing whitespace"...
Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
diff --git a/luni/src/main/java/com/ibm/icu4jni/charset/CharsetDecoderICU.java b/luni/src/main/java/com/ibm/icu4jni/charset/CharsetDecoderICU.java
index 9c74d68..0a4e321 100644
--- a/luni/src/main/java/com/ibm/icu4jni/charset/CharsetDecoderICU.java
+++ b/luni/src/main/java/com/ibm/icu4jni/charset/CharsetDecoderICU.java
@@ -5,11 +5,11 @@
*******************************************************************************
*
*******************************************************************************
-*/
- /**
+*/
+ /**
* A JNI interface for ICU converters.
*
- *
+ *
* @author Ram Viswanadha, IBM
*/
package com.ibm.icu4jni.charset;
@@ -27,8 +27,8 @@
import java.nio.charset.CodingErrorAction;
import java.nio.ByteBuffer;
-public final class CharsetDecoderICU extends CharsetDecoder{
-
+public final class CharsetDecoderICU extends CharsetDecoder{
+
private static final int INPUT_OFFSET = 0,
OUTPUT_OFFSET = 1,
@@ -42,11 +42,11 @@
* data[INPUT_HELD] = number of input chars held in the converter's state
*/
private int[] data = new int[LIMIT];
-
+
/* handle to the ICU converter that is opened */
private long converterHandle=0;
-
+
private byte[] input = null;
private char[] output= null;
@@ -54,7 +54,7 @@
private byte[] allocatedInput = null;
private char[] allocatedOutput = null;
// END android-added
-
+
// These instance variables are
// always assigned in the methods
// before being used. This class
@@ -67,8 +67,8 @@
private int onUnmappableInput = NativeConverter.STOP_CALLBACK;;
private int onMalformedInput = NativeConverter.STOP_CALLBACK;;
private int savedInputHeldLen;
-
- /**
+
+ /**
* Constructs a new decoder for the given charset
* @param cs for which the decoder is created
* @param cHandle the address of ICU converter
@@ -80,7 +80,7 @@
NativeConverter.getAveCharsPerByte(cHandle),
NativeConverter.getMaxCharsPerByte(cHandle)
);
-
+
char[] sub = replacement().toCharArray();
ec = NativeConverter.setCallbackDecode(cHandle,
onMalformedInput,
@@ -93,18 +93,18 @@
converterHandle=cHandle;
}
-
+
/**
* Sets this decoders replacement string. Substitutes the string in input if an
* umappable or illegal sequence is encountered
* @param newReplacement to replace the error bytes with
* @stable ICU 2.4
- */
+ */
protected void implReplaceWith(String newReplacement) {
if(converterHandle > 0){
if( newReplacement.length() > NativeConverter.getMaxBytesPerChar(converterHandle)) {
throw new IllegalArgumentException();
- }
+ }
ec =NativeConverter.setSubstitutionChars(converterHandle,
newReplacement.toCharArray(),
newReplacement.length()
@@ -114,7 +114,7 @@
}
}
}
-
+
/**
* Sets the action to be taken if an illegal sequence is encountered
* @param newAction action to be taken
@@ -134,9 +134,9 @@
ec = NativeConverter.setCallbackDecode(converterHandle, onMalformedInput, onUnmappableInput, sub, sub.length);
if(ErrorCode.isFailure(ec)){
throw ErrorCode.getException(ec);
- }
+ }
}
-
+
/**
* Sets the action to be taken if an illegal sequence is encountered
* @param newAction action to be taken
@@ -155,20 +155,20 @@
ec = NativeConverter.setCallbackDecode(converterHandle,onMalformedInput, onUnmappableInput, sub, sub.length);
if(ErrorCode.isFailure(ec)){
throw ErrorCode.getException(ec);
- }
+ }
}
-
+
/**
* Flushes any characters saved in the converter's internal buffer and
* resets the converter.
* @param out action to be taken
- * @return result of flushing action and completes the decoding all input.
+ * @return result of flushing action and completes the decoding all input.
* Returns CoderResult.UNDERFLOW if the action succeeds.
* @stable ICU 2.4
*/
protected final CoderResult implFlush(CharBuffer out) {
try{
-
+
data[OUTPUT_OFFSET] = getArray(out);
ec=NativeConverter.flushByteToChar(
@@ -177,8 +177,8 @@
outEnd, /* input index+1 to be written */
data /* contains data, inOff,outOff */
);
-
-
+
+
/* If we don't have room for the output, throw an exception*/
if (ErrorCode.isFailure(ec)) {
if (ec == ErrorCode.U_BUFFER_OVERFLOW_ERROR) {
@@ -198,7 +198,7 @@
implReset();
}
}
-
+
/**
* Resets the to Unicode mode of converter
* @stable ICU 2.4
@@ -213,17 +213,17 @@
output = null;
input = null;
}
-
+
/**
* Decodes one or more bytes. The default behaviour of the converter
- * is stop and report if an error in input stream is encountered.
+ * is stop and report if an error in input stream is encountered.
* To set different behaviour use @see CharsetDecoder.onMalformedInput()
- * This method allows a buffer by buffer conversion of a data stream.
- * The state of the conversion is saved between calls to convert.
- * Among other things, this means multibyte input sequences can be
- * split between calls. If a call to convert results in an Error, the
- * conversion may be continued by calling convert again with suitably
- * modified parameters.All conversions should be finished with a call to
+ * This method allows a buffer by buffer conversion of a data stream.
+ * The state of the conversion is saved between calls to convert.
+ * Among other things, this means multibyte input sequences can be
+ * split between calls. If a call to convert results in an Error, the
+ * conversion may be continued by calling convert again with suitably
+ * modified parameters.All conversions should be finished with a call to
* the flush method.
* @param in buffer to decode
* @param out buffer to populate with decoded result
@@ -240,7 +240,7 @@
data[INPUT_OFFSET] = getArray(in);
data[OUTPUT_OFFSET]= getArray(out);
data[INPUT_HELD] = 0;
-
+
try{
/* do the conversion */
ec=NativeConverter.decode(
@@ -252,7 +252,7 @@
data, /* contains data, inOff,outOff */
false /* donot flush the data */
);
-
+
/* return an error*/
if(ec == ErrorCode.U_BUFFER_OVERFLOW_ERROR){
@@ -269,7 +269,7 @@
setPosition(out);
}
}
-
+
/**
* Releases the system resources by cleanly closing ICU converter opened
* @stable ICU 2.4
@@ -279,7 +279,7 @@
super.finalize();
converterHandle = 0;
}
-
+
//------------------------------------------
// private utility methods
//------------------------------------------
@@ -299,12 +299,12 @@
}
output = allocatedOutput;
// END android-added
- //since the new
- // buffer start position
+ //since the new
+ // buffer start position
// is 0
return 0;
}
-
+
}
private final int getArray(ByteBuffer in){
if(in.hasArray()){
@@ -326,12 +326,12 @@
in.get(input,0,inEnd);
// reset the position
in.position(pos);
- // the start position
- // of the new buffer
+ // the start position
+ // of the new buffer
// is whatever is savedInputLen
return savedInputHeldLen;
}
-
+
}
private final void setPosition(CharBuffer out){
if(out.hasArray()){
@@ -348,7 +348,7 @@
}
private final void setPosition(ByteBuffer in){
- // ok was there input held in the previous invocation of decodeLoop
+ // ok was there input held in the previous invocation of decodeLoop
// that resulted in output in this invocation?
// BEGIN android-changed
in.position(in.position() + data[INPUT_OFFSET] + savedInputHeldLen - data[INPUT_HELD]);
diff --git a/luni/src/main/java/com/ibm/icu4jni/charset/CharsetEncoderICU.java b/luni/src/main/java/com/ibm/icu4jni/charset/CharsetEncoderICU.java
index eada080..cee4394 100644
--- a/luni/src/main/java/com/ibm/icu4jni/charset/CharsetEncoderICU.java
+++ b/luni/src/main/java/com/ibm/icu4jni/charset/CharsetEncoderICU.java
@@ -6,13 +6,13 @@
*
*******************************************************************************
*/
-/**
+/**
* A JNI interface for ICU converters.
*
- *
+ *
* @author Ram Viswanadha, IBM
*/
-package com.ibm.icu4jni.charset;
+package com.ibm.icu4jni.charset;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
@@ -64,7 +64,7 @@
private int onUnmappableInput = NativeConverter.STOP_CALLBACK;;
private int onMalformedInput = NativeConverter.STOP_CALLBACK;;
- /**
+ /**
* Construcs a new encoder for the given charset
* @param cs for which the decoder is created
* @param cHandle the address of ICU converter
@@ -78,7 +78,7 @@
(float) NativeConverter.getMaxBytesPerChar(cHandle),
replacement);
byte[] sub = replacement();
- // The default callback action on unmappable input
+ // The default callback action on unmappable input
// or malformed input is to ignore so we set ICU converter
// callback to stop and report the error
ec = NativeConverter.setCallbackEncode( cHandle,
@@ -159,7 +159,7 @@
* Flushes any characters saved in the converter's internal buffer and
* resets the converter.
* @param out action to be taken
- * @return result of flushing action and completes the decoding all input.
+ * @return result of flushing action and completes the decoding all input.
* Returns CoderResult.UNDERFLOW if the action succeeds.
* @stable ICU 2.4
*/
@@ -224,9 +224,9 @@
data[OUTPUT_OFFSET]= getArray(out);
data[INPUT_HELD] = 0;
// BEGIN android-added
- data[INVALID_CHARS] = 0; // Make sure we don't see earlier errors.
+ data[INVALID_CHARS] = 0; // Make sure we don't see earlier errors.
// END android added
-
+
try {
/* do the conversion */
ec = NativeConverter.encode(converterHandle,/* Handle to ICU Converter */
@@ -257,13 +257,13 @@
}
/**
- * Ascertains if a given Unicode character can
+ * Ascertains if a given Unicode character can
* be converted to the target encoding
*
* @param c the character to be converted
* @return true if a character can be converted
* @stable ICU 2.4
- *
+ *
*/
public boolean canEncode(char c) {
return canEncode((int) c);
@@ -341,8 +341,8 @@
}
output = allocatedOutput;
// END android-added
- //since the new
- // buffer start position
+ //since the new
+ // buffer start position
// is 0
return 0;
}
@@ -368,18 +368,18 @@
in.get(input,0,inEnd);
// reset the position
in.position(pos);
- // the start position
- // of the new buffer
+ // the start position
+ // of the new buffer
// is whatever is savedInputLen
return savedInputHeldLen;
}
}
private final void setPosition(ByteBuffer out) {
-
+
if (out.hasArray()) {
- // in getArray method we accessed the
- // array backing the buffer directly and wrote to
+ // in getArray method we accessed the
+ // array backing the buffer directly and wrote to
// it, so just just set the position and return.
// This is done to avoid the creation of temp array.
// BEGIN android-changed: take arrayOffset into account
@@ -396,17 +396,17 @@
private final void setPosition(CharBuffer in){
// BEGIN android-removed
-// // was there input held in the previous invocation of encodeLoop
+// // was there input held in the previous invocation of encodeLoop
// // that resulted in output in this invocation?
// if(data[OUTPUT_OFFSET]>0 && savedInputHeldLen>0){
// int len = in.position() + data[INPUT_OFFSET] + savedInputHeldLen;
-// in.position(len);
+// in.position(len);
// savedInputHeldLen = data[INPUT_HELD];
// }else{
// in.position(in.position() + data[INPUT_OFFSET] + savedInputHeldLen);
// savedInputHeldLen = data[INPUT_HELD];
// in.position(in.position() - savedInputHeldLen);
-// }
+// }
// END android-removed
// BEGIN android-added
@@ -417,13 +417,13 @@
// since we never saw that happening.
int len = in.position() + data[INPUT_OFFSET] + savedInputHeldLen;
len -= data[INVALID_CHARS]; // Otherwise position becomes wrong.
- in.position(len);
+ in.position(len);
savedInputHeldLen = data[INPUT_HELD];
- // was there input held in the previous invocation of encodeLoop
+ // was there input held in the previous invocation of encodeLoop
// that resulted in output in this invocation?
if(!(data[OUTPUT_OFFSET]>0 && savedInputHeldLen>0)){
in.position(in.position() - savedInputHeldLen);
- }
+ }
// END android-added
// BEGIN android-added
diff --git a/luni/src/main/java/com/ibm/icu4jni/common/ErrorCode.java b/luni/src/main/java/com/ibm/icu4jni/common/ErrorCode.java
index 023f165..42d1750 100644
--- a/luni/src/main/java/com/ibm/icu4jni/common/ErrorCode.java
+++ b/luni/src/main/java/com/ibm/icu4jni/common/ErrorCode.java
@@ -13,16 +13,16 @@
* Error exception class mapping ICU error codes of the enum UErrorCode
* @author syn wee quek
* @internal
-*/
+*/
public final class ErrorCode extends Exception
-{
+{
// public methods --------------------------------------------------------
-
+
/**
* Generic mapping from the error codes to java default exceptions.
* @param error error code
- * @return java default exception that maps to the argument error code,
+ * @return java default exception that maps to the argument error code,
* otherwise if error is not a valid error code, null is returned.
* @stable ICU 2.4
*/
@@ -45,33 +45,33 @@
return new RuntimeException(errorname);
}
}
-
+
// public static data member ---------------------------------------------
-
+
/**
- * Start of information results (semantically successful)
+ * Start of information results (semantically successful)
*/
public static final int U_ERROR_INFO_START = -128;
- /**
- * A resource bundle lookup returned a fallback result (not an error)
+ /**
+ * A resource bundle lookup returned a fallback result (not an error)
*/
public static final int U_USING_FALLBACK_ERROR = -128;
/**
- * A resource bundle lookup returned a result from the root locale (not an
- * error)
+ * A resource bundle lookup returned a result from the root locale (not an
+ * error)
*/
public static final int U_USING_DEFAULT_ERROR = -127;
/**
- * A SafeClone operation required allocating memory (informational
- * only
+ * A SafeClone operation required allocating memory (informational
+ * only
*/
public static final int U_SAFECLONE_ALLOCATED_ERROR = -126;
/**
- * This must always be the last warning value to indicate the limit for
- * UErrorCode warnings (last warning code +1)
+ * This must always be the last warning value to indicate the limit for
+ * UErrorCode warnings (last warning code +1)
*/
public static final int U_ERROR_INFO_LIMIT = -125;
-
+
/**
* No error, no warning
*/
@@ -98,17 +98,17 @@
*/
public static final int U_PARSE_ERROR = 9;
/**
- * In the Character conversion routines: Invalid character or sequence was
+ * In the Character conversion routines: Invalid character or sequence was
* encountered
*/
public static final int U_INVALID_CHAR_FOUND = 10;
/**
- * In the Character conversion routines: More bytes are required to complete
+ * In the Character conversion routines: More bytes are required to complete
* the conversion successfully
*/
public static final int U_TRUNCATED_CHAR_FOUND = 11;
/**
- * In codeset conversion: a sequence that does NOT belong in the codepage has
+ * In codeset conversion: a sequence that does NOT belong in the codepage has
* been encountered
*/
public static final int U_ILLEGAL_CHAR_FOUND = 12;
@@ -133,40 +133,40 @@
*/
public static final int U_RESOURCE_TYPE_MISMATCH = 17;
/**
- * ISO-2022 illlegal escape sequence
+ * ISO-2022 illlegal escape sequence
*/
public static final int U_ILLEGAL_ESCAPE_SEQUENCE = 18;
/**
* ISO-2022 unsupported escape sequence
*/
public static final int U_UNSUPPORTED_ESCAPE_SEQUENCE = 19;
- /**
- * No space available for in-buffer expansion for Arabic shaping
+ /**
+ * No space available for in-buffer expansion for Arabic shaping
*/
public static final int U_NO_SPACE_AVAILABLE = 20;
/**
- * This must always be the last value to indicate the limit for UErrorCode
- * (last error code +1)
+ * This must always be the last value to indicate the limit for UErrorCode
+ * (last error code +1)
*/
public static final int U_ERROR_LIMIT = 21;
/**
* Load library flag
*/
public static boolean LIBRARY_LOADED = false;
-
+
// private data member ----------------------------------------------------
-
+
/**
* Array of error code names corresponding to the errorcodes.
* ie ERROR_NAMES_[0] = name of U_ZERO_ERROR
*/
- private static final String ERROR_NAMES_[] = {
- "U_ZERO_ERROR", "U_ILLEGAL_ARGUMENT_ERROR",
- "U_MISSING_RESOURCE_ERROR", "U_INVALID_FORMAT_ERROR",
- "U_FILE_ACCESS_ERROR", "U_INTERNAL_PROGRAM_ERROR",
+ private static final String ERROR_NAMES_[] = {
+ "U_ZERO_ERROR", "U_ILLEGAL_ARGUMENT_ERROR",
+ "U_MISSING_RESOURCE_ERROR", "U_INVALID_FORMAT_ERROR",
+ "U_FILE_ACCESS_ERROR", "U_INTERNAL_PROGRAM_ERROR",
"U_MESSAGE_PARSE_ERROR", "U_MEMORY_ALLOCATION_ERROR",
"U_INDEX_OUTOFBOUNDS_ERROR", "U_PARSE_ERROR",
- "U_INVALID_CHAR_FOUND", "U_TRUNCATED_CHAR_FOUND",
+ "U_INVALID_CHAR_FOUND", "U_TRUNCATED_CHAR_FOUND",
"U_ILLEGAL_CHAR_FOUND", "U_INVALID_TABLE_FORMAT",
"U_INVALID_TABLE_FILE", "U_BUFFER_OVERFLOW_ERROR",
"U_UNSUPPORTED_ERROR", "U_RESOURCE_TYPE_MISMATCH",
@@ -181,17 +181,17 @@
public static String getErrorName(int ec){
return ERROR_NAMES_[ec];
}
-
+
/**
* Returns true if the input error code denotes success
* @param ec int value of the error code
- * @return boolean
+ * @return boolean
* @stable ICU 2.4
- */
+ */
public static boolean isSuccess(int ec){
return (ec<=U_ZERO_ERROR);
}
-
+
/**
* Returns true if the input error code denotes failure
* @param ec int value of the error code
diff --git a/luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java b/luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
index 08fe26a..2e06a53 100644
--- a/luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
+++ b/luni/src/main/java/com/ibm/icu4jni/lang/UCharacter.java
@@ -50,7 +50,7 @@
* The indices of the entries of this table correspond with the value
* of the ICU enum UBlockCode. When updating ICU it's necessary
* to check if there where any changes for the properties
- * used by java.lang.Character.
+ * used by java.lang.Character.
* The enum is defined in common/unicode/uchar.h
*/
UnicodeBlock[] result = new UnicodeBlock[] { null,
diff --git a/luni/src/main/java/com/ibm/icu4jni/regex/NativeRegEx.java b/luni/src/main/java/com/ibm/icu4jni/regex/NativeRegEx.java
index a8ce8a6..ee157a5 100644
--- a/luni/src/main/java/com/ibm/icu4jni/regex/NativeRegEx.java
+++ b/luni/src/main/java/com/ibm/icu4jni/regex/NativeRegEx.java
@@ -24,16 +24,16 @@
* Opens (compiles) an ICU regular expression.
*/
public static native int open(String pattern, int flags);
-
+
/**
* Makes a copy of a compiled regular expression.
*/
public static native int clone(int regex);
-
+
/**
* Closes the regular expression, recovering all resources (memory) it was
- * holding.
- */
+ * holding.
+ */
public static native void close(int regex);
/**
@@ -41,89 +41,89 @@
* for matches.
*/
public static native void setText(int regex, String text);
-
+
/**
* Attempts to match the input string, beginning at startIndex, against the
- * pattern.
+ * pattern.
*/
public static native boolean matches(int regex, int startIndex);
-
+
/**
* Attempts to match the input string, starting from the specified index,
- * against the pattern.
+ * against the pattern.
*/
public static native boolean lookingAt(int regex, int startIndex);
/**
* Finds the first matching substring of the input string that matches the
- * pattern.
+ * pattern.
*/
public static native boolean find(int regex, int startIndex);
-
+
/**
* Finds the first matching substring of the input string that matches the
- * pattern.
+ * pattern.
*/
public static native boolean findNext(int regex);
-
+
/**
- * Gets the number of capturing groups in this regular expression's pattern.
+ * Gets the number of capturing groups in this regular expression's pattern.
*/
public static native int groupCount(int regex);
-
+
/**
* Gets all the group information for the current match of the pattern.
*/
public static native void startEnd(int regex, int[] startEnd);
-
+
/**
* Sets the region of the input to be considered during matching.
*/
public static native void setRegion(int regex, int start, int end);
-
+
/**
* Queries the start of the region of the input to be considered during
* matching.
*/
public static native int regionStart(int regex);
-
+
/**
* Queries the end of the region of the input to be considered during
* matching.
*/
public static native int regionEnd(int regex);
-
+
/**
* Controls the transparency of the region bounds.
*/
public static native void useTransparentBounds(int regex, boolean value);
-
+
/**
* Queries the transparency of the region bounds.
*/
public static native boolean hasTransparentBounds(int regex);
-
+
/**
* Controls the anchoring property of the region bounds.
*/
public static native void useAnchoringBounds(int regex, boolean value);
-
+
/**
* Queries the anchoring property of the region bounds.
*/
public static native boolean hasAnchoringBounds(int regex);
-
+
/**
* Queries whether we hit the end of the input during the last match.
*/
public static native boolean hitEnd(int regex);
-
+
/**
* Queries whether more input might change a current match, but wouldn't
* destroy it.
*/
public static native boolean requireEnd(int regex);
-
+
/**
* Resets the matcher, cause a current match to be lost, and sets the
* position at which a subsequent findNext() would start.
diff --git a/luni/src/main/java/com/ibm/icu4jni/text/CollationElementIterator.java b/luni/src/main/java/com/ibm/icu4jni/text/CollationElementIterator.java
index 0f5bae4..b054b6c 100644
--- a/luni/src/main/java/com/ibm/icu4jni/text/CollationElementIterator.java
+++ b/luni/src/main/java/com/ibm/icu4jni/text/CollationElementIterator.java
@@ -15,12 +15,12 @@
/**
* Collation element iterator JNI wrapper.
* Iterates over the collation elements of a data string.
-* The iterator supports both forward and backwards full iteration, ie if
-* backwards iteration is performed in the midst of a forward iteration, the
-* result is undefined.
-* To perform a backwards iteration in the midst of a forward iteration,
-* reset() has to be called.
-* This will shift the position to either the start or the last character in the
+* The iterator supports both forward and backwards full iteration, ie if
+* backwards iteration is performed in the midst of a forward iteration, the
+* result is undefined.
+* To perform a backwards iteration in the midst of a forward iteration,
+* reset() has to be called.
+* This will shift the position to either the start or the last character in the
* data string depending on whether next() is called or previous().
* <pre>
* RuleBasedCollator coll = Collator.getInstance();
@@ -37,18 +37,18 @@
* @author syn wee quek
* @stable ICU 2.4
*/
-
+
public final class CollationElementIterator
{
// public data member -------------------------------------------
-
+
/**
* @stable ICU 2.4
*/
public static final int NULLORDER = 0xFFFFFFFF;
-
+
// public methods -----------------------------------------------
-
+
/**
* Reset the collation elements to their initial state.
* This will move the 'cursor' to the beginning of the text.
@@ -62,7 +62,7 @@
/**
* Get the ordering priority of the next collation element in the text.
* A single character may contain more than one collation element.
- * @return next collation elements ordering, or NULLORDER if the end of the
+ * @return next collation elements ordering, or NULLORDER if the end of the
* text is reached.
* @stable ICU 2.4
*/
@@ -74,7 +74,7 @@
/**
* Get the ordering priority of the previous collation element in the text.
* A single character may contain more than one collation element.
- * @return previous collation element ordering, or NULLORDER if the end of
+ * @return previous collation element ordering, or NULLORDER if the end of
* the text is reached.
* @stable ICU 2.4
*/
@@ -84,11 +84,11 @@
}
/**
- * Get the maximum length of any expansion sequences that end with the
+ * Get the maximum length of any expansion sequences that end with the
* specified comparison order.
* @param order collation order returned by previous or next.
- * @return maximum size of the expansion sequences ending with the collation
- * element or 1 if collation element does not occur at the end of
+ * @return maximum size of the expansion sequences ending with the collation
+ * element or 1 if collation element does not occur at the end of
* any expansion sequence
* @stable ICU 2.4
*/
@@ -136,14 +136,14 @@
{
NativeCollation.setOffset(m_collelemiterator_, offset);
}
-
+
/**
* Gets the primary order of a collation order.
* @param order the collation order
* @return the primary order of a collation order.
* @stable ICU 2.4
*/
- public static int primaryOrder(int order)
+ public static int primaryOrder(int order)
{
return ((order & PRIMARY_ORDER_MASK_) >> PRIMARY_ORDER_SHIFT_) &
UNSIGNED_16_BIT_MASK_;
@@ -170,13 +170,13 @@
{
return order & TERTIARY_ORDER_MASK_;
}
-
+
// protected constructor ----------------------------------------
-
+
/**
- * CollationElementIteratorJNI constructor.
- * The only caller of this class should be
- * RuleBasedCollator.getCollationElementIterator().
+ * CollationElementIteratorJNI constructor.
+ * The only caller of this class should be
+ * RuleBasedCollator.getCollationElementIterator().
* @param collelemiteratoraddress address of C collationelementiterator
*/
CollationElementIterator(int collelemiteratoraddress)
@@ -185,7 +185,7 @@
}
// protected methods --------------------------------------------
-
+
/**
* Garbage collection.
* Close C collator and reclaim memory.
@@ -195,32 +195,32 @@
{
NativeCollation.closeElements(m_collelemiterator_);
}
-
+
// private data members -----------------------------------------
-
+
/**
* C collator
*/
private int m_collelemiterator_;
-
- /**
- * ICU constant primary order mask for collation elements
+
+ /**
+ * ICU constant primary order mask for collation elements
*/
private static final int PRIMARY_ORDER_MASK_ = 0xffff0000;
- /**
- * ICU constant secondary order mask for collation elements
+ /**
+ * ICU constant secondary order mask for collation elements
*/
private static final int SECONDARY_ORDER_MASK_ = 0x0000ff00;
- /**
- * ICU constant tertiary order mask for collation elements
+ /**
+ * ICU constant tertiary order mask for collation elements
*/
private static final int TERTIARY_ORDER_MASK_ = 0x000000ff;
- /**
- * ICU constant primary order shift for collation elements
+ /**
+ * ICU constant primary order shift for collation elements
*/
private static final int PRIMARY_ORDER_SHIFT_ = 16;
- /**
- * ICU constant secondary order shift for collation elements
+ /**
+ * ICU constant secondary order shift for collation elements
*/
private static final int SECONDARY_ORDER_SHIFT_ = 8;
/**
diff --git a/luni/src/main/java/com/ibm/icu4jni/text/NativeCollation.java b/luni/src/main/java/com/ibm/icu4jni/text/NativeCollation.java
index d481790..878c0e0 100644
--- a/luni/src/main/java/com/ibm/icu4jni/text/NativeCollation.java
+++ b/luni/src/main/java/com/ibm/icu4jni/text/NativeCollation.java
@@ -15,13 +15,13 @@
* @author syn wee quek
* @internal ICU 2.4
*/
-
+
final class NativeCollation
{
// collator methods ---------------------------------------------
-
+
public NativeCollation() {
-
+
}
/**
@@ -31,7 +31,7 @@
* @internal ICU 2.4
*/
static native int openCollator(String locale);
-
+
/**
* Method to create a new C Collator using the argument rules.
* @param rules , set of collation rules
@@ -44,14 +44,14 @@
int normalizationmode,
int collationstrength);
- /**
+ /**
* Close a C collator
* Once closed, a UCollatorOld should not be used.
* @param collatoraddress The UCollatorOld to close
* @internal ICU 2.4
*/
static native void closeCollator(int collatoraddress);
-
+
/**
* Compare two strings.
* The strings will be compared using the normalization mode and options
@@ -59,17 +59,17 @@
* @param collatoraddress address of the c collator
* @param source The source string.
* @param target The target string.
- * @return result of the comparison, Collation.EQUAL,
+ * @return result of the comparison, Collation.EQUAL,
* Collation.GREATER or Collation.LESS
* @internal ICU 2.4
*/
- static native int compare(int collatoraddress, String source,
+ static native int compare(int collatoraddress, String source,
String target);
-
+
/**
* Get the normalization mode for this object.
* The normalization mode influences how strings are compared.
- * @param collatoraddress
+ * @param collatoraddress
* @return normalization mode; one of the values from Normalization
* @internal ICU 2.4
*/
@@ -79,11 +79,11 @@
* Set the normalization mode used int this object
* The normalization mode influences how strings are compared.
* @param collatoraddress the address of the C collator
- * @param normalizationmode desired normalization mode; one of the values
+ * @param normalizationmode desired normalization mode; one of the values
* from Normalization
* @internal ICU 2.4
*/
- static native void setNormalization(int collatoraddress,
+ static native void setNormalization(int collatoraddress,
int normalizationmode);
/**
@@ -104,9 +104,9 @@
* @internal ICU 2.4
*/
static native byte[] getSortKey(int collatoraddress, String source);
-
+
/**
- * Gets the version information for collation.
+ * Gets the version information for collation.
* @param collatoraddress address of the C collator
* @return version information
* @internal ICU 2.4
@@ -141,22 +141,22 @@
* @internal ICU 2.4
*/
static native int safeClone(int collatoraddress);
-
- /**
- * Create a CollationElementIterator object that will iterator over the
- * elements in a string, using the collation rules defined in this
+
+ /**
+ * Create a CollationElementIterator object that will iterator over the
+ * elements in a string, using the collation rules defined in this
* RuleBasedCollator
* @param collatoraddress address of C collator
* @param source string to iterate over
* @return address of C collationelementiterator
* @internal ICU 2.4
*/
- static native int getCollationElementIterator(int collatoraddress,
+ static native int getCollationElementIterator(int collatoraddress,
String source);
-
+
// collationelementiterator methods -------------------------------------
-
+
/**
* Close a C collation element iterator.
* @param address of C collation element iterator to close.
@@ -176,7 +176,7 @@
* Get the ordering priority of the next collation element in the text.
* A single character may contain more than one collation element.
* @param address if C collation elements containing the text.
- * @return next collation elements ordering, or NULLORDER if the end of the
+ * @return next collation elements ordering, or NULLORDER if the end of the
* text is reached.
* @internal ICU 2.4
*/
@@ -186,18 +186,18 @@
* Get the ordering priority of the previous collation element in the text.
* A single character may contain more than one collation element.
* @param address of the C collation element iterator containing the text.
- * @return previous collation element ordering, or NULLORDER if the end of
+ * @return previous collation element ordering, or NULLORDER if the end of
* the text is reached.
* @internal ICU 2.4
*/
static native int previous(int address);
/**
- * Get the maximum length of any expansion sequences that end with the
+ * Get the maximum length of any expansion sequences that end with the
* specified comparison order.
* @param address of the C collation element iterator containing the text.
* @param order collation order returned by previous or next.
- * @return maximum length of any expansion sequences ending with the
+ * @return maximum length of any expansion sequences ending with the
* specified order.
* @internal ICU 2.4
*/
diff --git a/luni/src/main/java/com/ibm/icu4jni/text/NativeDecimalFormat.java b/luni/src/main/java/com/ibm/icu4jni/text/NativeDecimalFormat.java
index 6f751d5..4573fae 100644
--- a/luni/src/main/java/com/ibm/icu4jni/text/NativeDecimalFormat.java
+++ b/luni/src/main/java/com/ibm/icu4jni/text/NativeDecimalFormat.java
@@ -164,9 +164,9 @@
* native DecimalFormatSymbols objects are equal. It is assumed that the
* caller (DecimalFormat) will check the DecimalFormatSymbols objects
* instead, for performance.
- *
+ *
* This is also unreasonably expensive, calling down to JNI multiple times.
- *
+ *
* TODO: remove this and just have DecimalFormat.equals do the right thing itself.
*/
@Override
@@ -214,7 +214,7 @@
// Get new value by multiplying multiplier.
return valBigDecimal.multiply(multiplierBigDecimal);
}
-
+
public StringBuffer formatBigDecimal(BigDecimal value, StringBuffer buffer, FieldPosition field) {
if (buffer == null || field == null) {
throw new NullPointerException();
@@ -230,7 +230,7 @@
String result = format(this.addr, val.toString(), field, fieldType, null, scale);
return buffer.append(result);
}
-
+
public StringBuffer formatBigInteger(BigInteger value, StringBuffer buffer, FieldPosition field) {
if (buffer == null || field == null) {
throw new NullPointerException();
diff --git a/luni/src/main/java/com/ibm/icu4jni/text/NativeNormalizer.java b/luni/src/main/java/com/ibm/icu4jni/text/NativeNormalizer.java
index f14b6c1..1ece170 100644
--- a/luni/src/main/java/com/ibm/icu4jni/text/NativeNormalizer.java
+++ b/luni/src/main/java/com/ibm/icu4jni/text/NativeNormalizer.java
@@ -1,12 +1,12 @@
/*
* Copyright (C) 2010 The Android Open Source Project
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/awt/font/NumericShaper.java b/luni/src/main/java/java/awt/font/NumericShaper.java
index 11ca477..1de06aa 100644
--- a/luni/src/main/java/java/awt/font/NumericShaper.java
+++ b/luni/src/main/java/java/awt/font/NumericShaper.java
@@ -27,32 +27,32 @@
/**
* The Class NumericShaper provides methods to convert latin character codes
* to unicode character codes.
- * For tables of the character codes used,
+ * For tables of the character codes used,
* see <a href="http://www.unicode.org/Public/UNIDATA/">unicode.org</a>.
*/
public final class NumericShaper implements Serializable {
-
+
/** The Constant serialVersionUID. */
private static final long serialVersionUID = -8022764705923730308L;
- /**
- * The Constant EUROPEAN indicates the latin and extended range,
- * and latin decimal base.
+ /**
+ * The Constant EUROPEAN indicates the latin and extended range,
+ * and latin decimal base.
*/
public static final int EUROPEAN = 1;
/** The Constant ARABIC indicates the ARABIC range and decimal base. */
public static final int ARABIC = 2;
- /**
- * The Constant EASTERN_ARABIC indicates the ARABIC range and
- * ARABIC_EXTENDED decimal base.
+ /**
+ * The Constant EASTERN_ARABIC indicates the ARABIC range and
+ * ARABIC_EXTENDED decimal base.
*/
public static final int EASTERN_ARABIC = 4;
- /**
- * The Constant DEVANAGARI indicates the DEVANAGARI range and
- * decimal base.
+ /**
+ * The Constant DEVANAGARI indicates the DEVANAGARI range and
+ * decimal base.
*/
public static final int DEVANAGARI = 8;
@@ -77,7 +77,7 @@
/** The Constant KANNADA indicates the KANNADA range and decimal base. */
public static final int KANNADA = 1024;
- /**
+ /**
* The Constant MALAYALAM indicates the MALAYALAM range and decimal base.
*/
public static final int MALAYALAM = 2048;
@@ -94,17 +94,17 @@
/** The Constant MYANMAR indicates the MYANMAR range and decimal base. */
public static final int MYANMAR = 32768;
- /**
- * The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.
+ /**
+ * The Constant ETHIOPIC indicates the ETHIOPIC range and decimal base.
*/
public static final int ETHIOPIC = 65536;
/** The Constant KHMER indicates the KHMER range and decimal base. */
public static final int KHMER = 131072;
- /**
- * The Constant MONGOLIAN indicates the MONGOLIAN range and
- * decimal base.
+ /**
+ * The Constant MONGOLIAN indicates the MONGOLIAN range and
+ * decimal base.
*/
public static final int MONGOLIAN = 262144;
@@ -112,84 +112,84 @@
public static final int ALL_RANGES = 524287;
/* Further one can find the set of script indices.
- * Index is the power you need the 2 to raise to to get corresponding
+ * Index is the power you need the 2 to raise to to get corresponding
* range constant value. Also script ranges, context names and digits low
* ranges are indexed with these indices.
*/
- // Index of the EUROPEAN range
+ // Index of the EUROPEAN range
/** The Constant INDEX_EUROPEAN. */
private static final int INDEX_EUROPEAN = 0;
- // Index of the ARABIC range
+ // Index of the ARABIC range
/** The Constant INDEX_ARABIC. */
private static final int INDEX_ARABIC = 1;
- // Index of the EASTERN_ARABIC range
+ // Index of the EASTERN_ARABIC range
/** The Constant INDEX_EASTERN_ARABIC. */
private static final int INDEX_EASTERN_ARABIC = 2;
- // Index of the DEVANAGARI range
+ // Index of the DEVANAGARI range
/** The Constant INDEX_DEVANAGARI. */
private static final int INDEX_DEVANAGARI = 3;
- // Index of the BENGALI range
+ // Index of the BENGALI range
/** The Constant INDEX_BENGALI. */
private static final int INDEX_BENGALI = 4;
- // Index of the GURMUKHI range
+ // Index of the GURMUKHI range
/** The Constant INDEX_GURMUKHI. */
private static final int INDEX_GURMUKHI = 5;
- // Index of the GUJARTI range
+ // Index of the GUJARTI range
/** The Constant INDEX_GUJARATI. */
private static final int INDEX_GUJARATI = 6;
- // Index of the ORIYA range
+ // Index of the ORIYA range
/** The Constant INDEX_ORIYA. */
private static final int INDEX_ORIYA = 7;
- // Index of the TAMIL range
+ // Index of the TAMIL range
/** The Constant INDEX_TAMIL. */
private static final int INDEX_TAMIL = 8;
- // Index of the TELUGU range
+ // Index of the TELUGU range
/** The Constant INDEX_TELUGU. */
private static final int INDEX_TELUGU = 9;
- // Index of the KANNADA range
+ // Index of the KANNADA range
/** The Constant INDEX_KANNADA. */
private static final int INDEX_KANNADA = 10;
- // Index of the MALAYALAM range
+ // Index of the MALAYALAM range
/** The Constant INDEX_MALAYALAM. */
private static final int INDEX_MALAYALAM = 11;
- // Index of the THAI range
+ // Index of the THAI range
/** The Constant INDEX_THAI. */
private static final int INDEX_THAI = 12;
- // Index of the LAO range
+ // Index of the LAO range
/** The Constant INDEX_LAO. */
private static final int INDEX_LAO = 13;
- // Index of the TIBETAN range
+ // Index of the TIBETAN range
/** The Constant INDEX_TIBETAN. */
private static final int INDEX_TIBETAN = 14;
- // Index of the MYANMAR range
+ // Index of the MYANMAR range
/** The Constant INDEX_MYANMAR. */
private static final int INDEX_MYANMAR = 15;
- // Index of the ETHIOPIC range
+ // Index of the ETHIOPIC range
/** The Constant INDEX_ETHIOPIC. */
private static final int INDEX_ETHIOPIC = 16;
- // Index of the KHMER range
+ // Index of the KHMER range
/** The Constant INDEX_KHMER. */
private static final int INDEX_KHMER = 17;
- // Index of the MONGOLIAN range
+ // Index of the MONGOLIAN range
/** The Constant INDEX_MONGOLIAN. */
private static final int INDEX_MONGOLIAN = 18;
@@ -200,8 +200,8 @@
/*
* Scripts ranges array. Array represents ranges as pairs of
* lowest and highest range bounds.
- * Data is taken from the UnicodeData.txt file from
- * http://www.unicode.org/Public/UNIDATA/
+ * Data is taken from the UnicodeData.txt file from
+ * http://www.unicode.org/Public/UNIDATA/
*/
/** The scripts ranges. */
private final int[] scriptsRanges = {
@@ -227,14 +227,14 @@
};
/*
- * Digit low ranges values decreased by 0x0030. Each low range
- * value decreased by 0x0030 for easy obtaing unicode value of the
+ * Digit low ranges values decreased by 0x0030. Each low range
+ * value decreased by 0x0030 for easy obtaing unicode value of the
* context dependent digit. European digits starts from 0x0030 hence
- * context dependent unicode digit value equals to
+ * context dependent unicode digit value equals to
* digitsLowRanges[script index] + european digit char unicode value.
- * !! the only exception is ETHIOPIC script where there is no '0' digit
- * Data is taken from the UnicodeData.txt file from
- * http://www.unicode.org/Public/UNIDATA/
+ * !! the only exception is ETHIOPIC script where there is no '0' digit
+ * Data is taken from the UnicodeData.txt file from
+ * http://www.unicode.org/Public/UNIDATA/
*/
/** The digits low ranges. */
private final int[] digitsLowRanges = {
@@ -262,34 +262,34 @@
// Set of context names used in toString method
/** The contexts. */
private final String[] contexts = {
- "EUROPEAN",
- "ARABIC",
- "EASTERN_ARABIC",
- "DEVANAGARI",
- "BENGALI",
- "GURMUKHI",
- "GUJARATI",
- "ORIYA",
- "TAMIL",
- "TELUGU",
- "KANNADA",
- "MALAYALAM",
- "THAI",
- "LAO",
- "TIBETAN",
- "MYANMAR",
- "ETHIOPIC",
- "KHMER",
- "MONGOLIAN"
+ "EUROPEAN",
+ "ARABIC",
+ "EASTERN_ARABIC",
+ "DEVANAGARI",
+ "BENGALI",
+ "GURMUKHI",
+ "GUJARATI",
+ "ORIYA",
+ "TAMIL",
+ "TELUGU",
+ "KANNADA",
+ "MALAYALAM",
+ "THAI",
+ "LAO",
+ "TIBETAN",
+ "MYANMAR",
+ "ETHIOPIC",
+ "KHMER",
+ "MONGOLIAN"
};
/*
- * Strong characters flags array is to determine if the
- * unicode bidirectional category of the character is strong,
- * according to Unicode specification. If the bit with index equals to
- * character's unicode value is 1 - the character is strong.
- * This array was generated using UnicodeData.txt file from
- * http://www.unicode.org/Public/UNIDATA/
+ * Strong characters flags array is to determine if the
+ * unicode bidirectional category of the character is strong,
+ * according to Unicode specification. If the bit with index equals to
+ * character's unicode value is 1 - the character is strong.
+ * This array was generated using UnicodeData.txt file from
+ * http://www.unicode.org/Public/UNIDATA/
*/
/** The Constant STRONG_TEXT_FLAGS. */
@@ -416,7 +416,7 @@
// index of context range (Serialization support)
/** The key. */
private int key;
-
+
// flag, true if shaping contextual (Serialization support)
/** The mask. */
private int mask;
@@ -439,11 +439,11 @@
/**
* Creates NumericShaper with specified parameters.
- *
+ *
* @param ranges specified ranges to be shaped
* @param defaultContext default context range
* @param isContextual specifies if the instance is contextual
- */
+ */
private NumericShaper(int ranges, int defaultContext, boolean isContextual){
this.fRanges = ranges;
this.fDefaultContextIndex = getIndexFromRange(defaultContext);
@@ -453,12 +453,12 @@
fSingleRangeIndex = getIndexFromRange(ranges);
}
}
-
+
/**
* Returns script index of the specified context range.
- *
+ *
* @param range specified range
- *
+ *
* @return one of the script indices according to the specified range.
*/
private int getIndexFromRange(int range){
@@ -479,9 +479,9 @@
/**
* Returns range corresponding to the specified script index.
- *
+ *
* @param index specified script index
- *
+ *
* @return one of the range constants according to the specified script index.
*/
private int getRangeFromIndex(int index){
@@ -532,32 +532,32 @@
@Override
public String toString() {
/* !! There is no description in the documentation what this method must
- * return. Thus format of toString method is based on 1.5 release
+ * return. Thus format of toString method is based on 1.5 release
* behavior and can be obtained using next test sample:
- *
- * // Simple shapers toString format
+ *
+ * // Simple shapers toString format
* System.out.println(NumericShaper.getShaper(NumericShaper.EASTERN_ARABIC));
- *
+ *
* // Context shapers with default context toString format
* System.out.println(NumericShaper.getContextualShaper(
* NumericShaper.ARABIC | NumericShaper.TAMIL));
- *
- * // Context shapers with context
+ *
+ * // Context shapers with context
* System.out.println(NumericShaper.getContextualShaper(
- * NumericShaper.ARABIC | NumericShaper.TAMIL,
+ * NumericShaper.ARABIC | NumericShaper.TAMIL,
* NumericShaper.EASTERN_ARABIC));
*/
StringBuffer sb = new StringBuffer(super.toString());
- sb.append("[contextual:");
+ sb.append("[contextual:");
sb.append(fContextual);
if (fContextual){
- sb.append(", context:");
+ sb.append(", context:");
sb.append(contexts[fDefaultContextIndex]);
}
- sb.append(", range(s): ");
+ sb.append(", range(s): ");
if (fContextual) {
int index = 0;
boolean isFirst = true;
@@ -566,7 +566,7 @@
if (isFirst){
isFirst = false;
} else {
- sb.append(", ");
+ sb.append(", ");
}
sb.append(contexts[index]);
}
@@ -575,7 +575,7 @@
} else {
sb.append(contexts[fSingleRangeIndex]);
}
- sb.append("]");
+ sb.append("]");
return sb.toString();
}
@@ -583,20 +583,20 @@
/**
* Gets the NumericShaper for the specified unicode ranges
* and default unicode range. The defaultContext parameter
- * is used as the starting context (which indicates the
- * language/script being used). The OR logical operation
+ * is used as the starting context (which indicates the
+ * language/script being used). The OR logical operation
* should be used for multiple ranges:
* NumericShaper.DEVANAGARI | NumericShaper.BENGALI.
- * The NumericShaper returned by this method is contextual
+ * The NumericShaper returned by this method is contextual
* in that it supports multiple character ranges, depending
* on the context.
- *
+ *
* @param ranges the unicode ranges.
* @param defaultContext the default, starting context.
- *
+ *
* @return the NumericShaper for the specified ranges.
*/
- public static NumericShaper getContextualShaper(int ranges,
+ public static NumericShaper getContextualShaper(int ranges,
int defaultContext) {
ranges &= ALL_RANGES;
defaultContext &= ALL_RANGES;
@@ -604,15 +604,15 @@
}
/**
- * Gets the NumericShaper for the specified unicode ranges.
+ * Gets the NumericShaper for the specified unicode ranges.
* The OR logical operation should be used for multiple ranges:
* NumericShaper.DEVANAGARI | NumericShaper.BENGALI.
- * The NumericShaper returned by this method is contextual
+ * The NumericShaper returned by this method is contextual
* in that it supports multiple character ranges, depending
* on the context.
- *
+ *
* @param ranges the unicode ranges.
- *
+ *
* @return the NumericShaper for the specified ranges.
*/
public static NumericShaper getContextualShaper(int ranges) {
@@ -621,11 +621,11 @@
}
/**
- * Gets the masks for all of the ranges supported by this NumericShaper,
+ * Gets the masks for all of the ranges supported by this NumericShaper,
* packed into an int value using the logical OR logical operation
* for multiple ranges:
* NumericShaper.DEVANAGARI | NumericShaper.BENGALI.
- *
+ *
* @return all ranges of this NumericShaper.
*/
public int getRanges() {
@@ -634,11 +634,11 @@
/**
* Gets a NumericShaper for the specified unicode range.
- * The NumericShaper supports only a single range and
+ * The NumericShaper supports only a single range and
* hence is not contextual.
- *
+ *
* @param singleRange the specified unicode single range.
- *
+ *
* @return the NumericShaper for the specified unicode range.
*/
public static NumericShaper getShaper(int singleRange) {
@@ -647,9 +647,9 @@
}
/**
- * Checks if this NumericShaper is contextual (supporting
+ * Checks if this NumericShaper is contextual (supporting
* multiple script ranges) or not.
- *
+ *
* @return true, if this NumericShaper is contextual, false otherwise.
*/
public boolean isContextual() {
@@ -657,10 +657,10 @@
}
/**
- * Transforms the encoding of the text, starting from the character
- * at index start and transforming count characters,
+ * Transforms the encoding of the text, starting from the character
+ * at index start and transforming count characters,
* using the specified context.
- *
+ *
* @param text the text to be shaped.
* @param start the start offset of the text.
* @param count the number of characters to be shaped.
@@ -675,9 +675,9 @@
}
/**
- * Transforms the encoding of the text, starting from the character
+ * Transforms the encoding of the text, starting from the character
* at index start and transforming count characters.
- *
+ *
* @param text the text to be shaped.
* @param start the start offset of the text.
* @param count the number of characters to be shaped.
@@ -695,13 +695,13 @@
* index using specified context. This method is applied for the contextual
* shaping, if the shaper instance is not contextual use nonContextualShape
* method.
- *
+ *
* @param text an array of chars
* @param start index of the first character to convert
* @param count a number of characters to convert
* @param contextIndex index of the script index to use in shaper
*/
- private void contextualShape(char[] text, int start, int count,
+ private void contextualShape(char[] text, int start, int count,
int contextIndex){
char maxDigit = (char)0x0039;
char minDigit = (char)0x0030;
@@ -737,7 +737,7 @@
/**
* Converts count of digits of the given array of characters from the start
* index. Method is applied for non-contextual shaper.
- *
+ *
* @param text an array of chars
* @param start index of the first character to convert
* @param count a number of characters to convert
@@ -755,11 +755,11 @@
/**
* Returns the index of the script of the specified char.
- *
+ *
* @param ch specified unicode character
- *
+ *
* @return script index corresponding to the given char
- */
+ */
private int getCharIndex(char ch){
int index = INDEX_EUROPEAN;
for (int i=0; i < MAX_INDEX; i++){
@@ -775,11 +775,11 @@
/**
* Returns true if the bidirectional category of the character
* is strong.
- *
+ *
* @param chr the chr
- *
+ *
* @return true, if the character is strong, false otherwise
- */
+ */
private boolean isCharStrong(int chr) {
return (STRONG_TEXT_FLAGS[chr >> 5] & (1 << (chr % 32))) != 0;
}
@@ -815,12 +815,12 @@
key = fSingleRangeIndex;
}
}
-
+
/**
* Write object.
- *
+ *
* @param out the out
- *
+ *
* @throws IOException Signals that an I/O exception has occurred.
*/
private void writeObject(java.io.ObjectOutputStream out)
@@ -831,9 +831,9 @@
/**
* Read object.
- *
+ *
* @param in the in
- *
+ *
* @throws IOException Signals that an I/O exception has occurred.
* @throws ClassNotFoundException the class not found exception
*/
diff --git a/luni/src/main/java/java/awt/font/TextAttribute.java b/luni/src/main/java/java/awt/font/TextAttribute.java
index fe53b78..7124cbf 100644
--- a/luni/src/main/java/java/awt/font/TextAttribute.java
+++ b/luni/src/main/java/java/awt/font/TextAttribute.java
@@ -26,7 +26,7 @@
import java.util.Map;
/**
- * The TextAttribute class defines attribute keys and attribute values
+ * The TextAttribute class defines attribute keys and attribute values
* for text rendering. Each TextAttributes should have the following
* information:
* <ul>
@@ -38,7 +38,7 @@
* </ul>
*/
public final class TextAttribute extends Attribute {
-
+
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 7744112784117861702L;
@@ -48,7 +48,7 @@
/**
* Instantiates a new TextAttribute with the specified name.
- *
+ *
* @param name the name of TextAttribute.
*/
protected TextAttribute(String name) {
@@ -58,9 +58,9 @@
/**
* Resolves the instance being deserialized.
- *
+ *
* @return the Object.
- *
+ *
* @throws InvalidObjectException the InvalidObjectException.
*/
@Override
@@ -72,51 +72,51 @@
throw new InvalidObjectException("Unknown attribute name");
}
- /**
- * The BACKGROUND text attribute.
+ /**
+ * The BACKGROUND text attribute.
*/
- public static final TextAttribute BACKGROUND = new TextAttribute("background");
+ public static final TextAttribute BACKGROUND = new TextAttribute("background");
/** The BIDI_EMBEDDING text attribute key. */
- public static final TextAttribute BIDI_EMBEDDING = new TextAttribute("bidi_embedding");
+ public static final TextAttribute BIDI_EMBEDDING = new TextAttribute("bidi_embedding");
/** The CHAR_REPLACEMENT text attribute key. */
- public static final TextAttribute CHAR_REPLACEMENT = new TextAttribute("char_replacement");
+ public static final TextAttribute CHAR_REPLACEMENT = new TextAttribute("char_replacement");
/** The FAMILY text attribute key. */
- public static final TextAttribute FAMILY = new TextAttribute("family");
+ public static final TextAttribute FAMILY = new TextAttribute("family");
/** The FONT text attribute key. */
- public static final TextAttribute FONT = new TextAttribute("font");
+ public static final TextAttribute FONT = new TextAttribute("font");
/** The FOREGROUND text attribute key. */
- public static final TextAttribute FOREGROUND = new TextAttribute("foreground");
+ public static final TextAttribute FOREGROUND = new TextAttribute("foreground");
/** The INPUT_METHOD_HIGHLIGHT text attribute key. */
public static final TextAttribute INPUT_METHOD_HIGHLIGHT = new TextAttribute(
- "input method highlight");
+ "input method highlight");
/** The INPUT_METHOD_UNDERLINE text attribute key. */
public static final TextAttribute INPUT_METHOD_UNDERLINE = new TextAttribute(
- "input method underline");
+ "input method underline");
/** The JUSTIFICATION text attribute key. */
- public static final TextAttribute JUSTIFICATION = new TextAttribute("justification");
+ public static final TextAttribute JUSTIFICATION = new TextAttribute("justification");
/** The Constant JUSTIFICATION_indicates the full requested width. */
public static final Float JUSTIFICATION_FULL = new Float(1.0f);
- /**
- * The Constant JUSTIFICATION_NONE indicates that line is not
- * allowed for justification.
+ /**
+ * The Constant JUSTIFICATION_NONE indicates that line is not
+ * allowed for justification.
*/
public static final Float JUSTIFICATION_NONE = new Float(0.0f);
/** The NUMERIC_SHAPING text attribute. */
- public static final TextAttribute NUMERIC_SHAPING = new TextAttribute("numeric_shaping");
+ public static final TextAttribute NUMERIC_SHAPING = new TextAttribute("numeric_shaping");
/** The POSTURE text attribute. */
- public static final TextAttribute POSTURE = new TextAttribute("posture");
+ public static final TextAttribute POSTURE = new TextAttribute("posture");
/** The Constant POSTURE_REGULAR indicates regular posture. */
public static final Float POSTURE_REGULAR = new Float(0.0f);
@@ -125,31 +125,31 @@
public static final Float POSTURE_OBLIQUE = new Float(0.20f);
/** The RUN_DIRECTION text attribute. */
- public static final TextAttribute RUN_DIRECTION = new TextAttribute("run_direction");
+ public static final TextAttribute RUN_DIRECTION = new TextAttribute("run_direction");
- /**
- * The Constant RUN_DIRECTION_LTR indicates left-to-right run
- * direction.
+ /**
+ * The Constant RUN_DIRECTION_LTR indicates left-to-right run
+ * direction.
*/
public static final Boolean RUN_DIRECTION_LTR = false;
- /**
+ /**
* The Constant RUN_DIRECTION_RTL indicates right-to-left run
- * direction.
+ * direction.
*/
public static final Boolean RUN_DIRECTION_RTL = true;
/** The SIZE text attribute. */
- public static final TextAttribute SIZE = new TextAttribute("size");
+ public static final TextAttribute SIZE = new TextAttribute("size");
/** The STRIKETHROUGH text attribute. */
- public static final TextAttribute STRIKETHROUGH = new TextAttribute("strikethrough");
+ public static final TextAttribute STRIKETHROUGH = new TextAttribute("strikethrough");
/** The Constant STRIKETHROUGH_ON indicates a single strikethrough. */
public static final Boolean STRIKETHROUGH_ON = true;
/** The SUPERSCRIPT text attribute. */
- public static final TextAttribute SUPERSCRIPT = new TextAttribute("superscript");
+ public static final TextAttribute SUPERSCRIPT = new TextAttribute("superscript");
/** The Constant SUPERSCRIPT_SUB indicates a standard subscript. */
public static final Integer SUPERSCRIPT_SUB = -1;
@@ -158,92 +158,92 @@
public static final Integer SUPERSCRIPT_SUPER = 1;
/** The SWAP_COLORS text attribute. */
- public static final TextAttribute SWAP_COLORS = new TextAttribute("swap_colors");
+ public static final TextAttribute SWAP_COLORS = new TextAttribute("swap_colors");
- /**
- * The Constant SWAP_COLORS_ON indicates a swap of foreground
+ /**
+ * The Constant SWAP_COLORS_ON indicates a swap of foreground
* and background.
*/
public static final Boolean SWAP_COLORS_ON = true;
/** The TRANSFORM text attribute. */
- public static final TextAttribute TRANSFORM = new TextAttribute("transform");
+ public static final TextAttribute TRANSFORM = new TextAttribute("transform");
/** The Constant UNDERLINE text attribute. */
- public static final TextAttribute UNDERLINE = new TextAttribute("underline");
+ public static final TextAttribute UNDERLINE = new TextAttribute("underline");
- /**
- * The Constant UNDERLINE_ON indicates a standard underline
+ /**
+ * The Constant UNDERLINE_ON indicates a standard underline
* at the roman baseline for roman text.
*/
public static final Integer UNDERLINE_ON = 0;
- /**
- * The Constant UNDERLINE_LOW_ONE_PIXEL indicates a single
- * pixel solid low underline.
+ /**
+ * The Constant UNDERLINE_LOW_ONE_PIXEL indicates a single
+ * pixel solid low underline.
*/
public static final Integer UNDERLINE_LOW_ONE_PIXEL = 1;
- /**
- * The Constant UNDERLINE_LOW_TWO_PIXEL indicates a double
- * pixel solid low underline.
+ /**
+ * The Constant UNDERLINE_LOW_TWO_PIXEL indicates a double
+ * pixel solid low underline.
*/
public static final Integer UNDERLINE_LOW_TWO_PIXEL = 2;
- /**
- * The Constant UNDERLINE_LOW_DOTTED indicates a
- * single pixel dotted low underline.
+ /**
+ * The Constant UNDERLINE_LOW_DOTTED indicates a
+ * single pixel dotted low underline.
*/
public static final Integer UNDERLINE_LOW_DOTTED = 3;
- /**
- * The Constant UNDERLINE_LOW_GRAY indicates double pixel
- * gray low underline.
+ /**
+ * The Constant UNDERLINE_LOW_GRAY indicates double pixel
+ * gray low underline.
*/
public static final Integer UNDERLINE_LOW_GRAY = 4;
- /**
- * The Constant UNDERLINE_LOW_DASHED indicates single pixel dashed
- * low underline.
+ /**
+ * The Constant UNDERLINE_LOW_DASHED indicates single pixel dashed
+ * low underline.
*/
public static final Integer UNDERLINE_LOW_DASHED = 5;
/** The WEIGHT text attribute. */
- public static final TextAttribute WEIGHT = new TextAttribute("weight");
+ public static final TextAttribute WEIGHT = new TextAttribute("weight");
- /**
- * The Constant WEIGHT_EXTRA_LIGHT indicates the lightest
- * predefined weight.
+ /**
+ * The Constant WEIGHT_EXTRA_LIGHT indicates the lightest
+ * predefined weight.
*/
public static final Float WEIGHT_EXTRA_LIGHT = new Float(0.5f);
- /**
- * The Constant WEIGHT_LIGHT indicates the standard light weight.
+ /**
+ * The Constant WEIGHT_LIGHT indicates the standard light weight.
*/
public static final Float WEIGHT_LIGHT = new Float(0.75f);
- /**
- * The Constant WEIGHT_DEMILIGHT indicates an intermediate weight
- * between LIGHT and STANDARD.
+ /**
+ * The Constant WEIGHT_DEMILIGHT indicates an intermediate weight
+ * between LIGHT and STANDARD.
*/
public static final Float WEIGHT_DEMILIGHT = new Float(0.875f);
- /**
- * The Constant WEIGHT_REGULAR indicates the standart weight.
+ /**
+ * The Constant WEIGHT_REGULAR indicates the standart weight.
*/
public static final Float WEIGHT_REGULAR = new Float(1.0f);
- /**
- * The Constant WEIGHT_SEMIBOLD indicates a semi weight
- * of REGULAR.
+ /**
+ * The Constant WEIGHT_SEMIBOLD indicates a semi weight
+ * of REGULAR.
*/
public static final Float WEIGHT_SEMIBOLD = new Float(1.25f);
- /** The Constant WEIGHT_MEDIUM indicates average weight
+ /** The Constant WEIGHT_MEDIUM indicates average weight
* between the REGULAR and BOLD. */
public static final Float WEIGHT_MEDIUM = new Float(1.5f);
- /** The Constant WEIGHT_DEMIBOLD indicates
+ /** The Constant WEIGHT_DEMIBOLD indicates
* a lighter weight than BOLD. */
public static final Float WEIGHT_DEMIBOLD = new Float(1.75f);
@@ -256,39 +256,39 @@
/** The Constant WEIGHT_EXTRABOLD indicates an extra heavy weight. */
public static final Float WEIGHT_EXTRABOLD = new Float(2.5f);
- /**
- * The Constant WEIGHT_ULTRABOLD indicates the heaviest predefined
+ /**
+ * The Constant WEIGHT_ULTRABOLD indicates the heaviest predefined
* weight.
*/
public static final Float WEIGHT_ULTRABOLD = new Float(2.75f);
/** The WIDTH text attribute. */
- public static final TextAttribute WIDTH = new TextAttribute("width");
+ public static final TextAttribute WIDTH = new TextAttribute("width");
- /**
- * The Constant WIDTH_CONDENSED indicates the most condensed
+ /**
+ * The Constant WIDTH_CONDENSED indicates the most condensed
* predefined width.
*/
public static final Float WIDTH_CONDENSED = new Float(0.75f);
- /**
- * The Constant WIDTH_SEMI_CONDENSED indicates
- * a semi condensed width.
+ /**
+ * The Constant WIDTH_SEMI_CONDENSED indicates
+ * a semi condensed width.
*/
public static final Float WIDTH_SEMI_CONDENSED = new Float(0.875f);
- /**
- * The Constant WIDTH_REGULAR indicates the standard width.
+ /**
+ * The Constant WIDTH_REGULAR indicates the standard width.
*/
public static final Float WIDTH_REGULAR = new Float(1.0f);
- /**
- * The Constant WIDTH_SEMI_EXTENDED indicates semi extended width.
+ /**
+ * The Constant WIDTH_SEMI_EXTENDED indicates semi extended width.
*/
public static final Float WIDTH_SEMI_EXTENDED = new Float(1.25f);
- /**
- * The Constant WIDTH_EXTENDED indicates extended width.
+ /**
+ * The Constant WIDTH_EXTENDED indicates extended width.
*/
public static final Float WIDTH_EXTENDED = new Float(1.5f);
diff --git a/luni/src/main/java/java/beans/IndexedPropertyChangeEvent.java b/luni/src/main/java/java/beans/IndexedPropertyChangeEvent.java
index f52d6e6..c78f31c 100644
--- a/luni/src/main/java/java/beans/IndexedPropertyChangeEvent.java
+++ b/luni/src/main/java/java/beans/IndexedPropertyChangeEvent.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -30,7 +30,7 @@
/**
* Creates a new property changed event with an indication of the property
* index.
- *
+ *
* @param source
* the changed bean.
* @param propertyName
@@ -55,7 +55,7 @@
/**
* Answer the index of the property that was changed in this event.
- *
+ *
* @return the property element index.
*/
public int getIndex() {
diff --git a/luni/src/main/java/java/beans/PropertyChangeEvent.java b/luni/src/main/java/java/beans/PropertyChangeEvent.java
index d614be3..6e0455f 100644
--- a/luni/src/main/java/java/beans/PropertyChangeEvent.java
+++ b/luni/src/main/java/java/beans/PropertyChangeEvent.java
@@ -37,7 +37,7 @@
/**
* The constructor used to create a new {@code PropertyChangeEvent}.
- *
+ *
* @param source
* the changed bean.
* @param propertyName
@@ -64,7 +64,7 @@
/**
* Returns the name of the property that has changed. If an unspecified set
* of properties has changed it returns null.
- *
+ *
* @return the name of the property that has changed, or null.
*/
public String getPropertyName() {
@@ -73,7 +73,7 @@
/**
* Sets the propagationId object.
- *
+ *
* @see #getPropagationId()
*/
public void setPropagationId(Object propagationId) {
@@ -85,7 +85,7 @@
* 1.0 demands that a listener receiving this property and then sending its
* own PropertyChangeEvent sets the received propagationId on the new
* PropertyChangeEvent's propagationId field.
- *
+ *
* @return the propagationId object.
*/
public Object getPropagationId() {
@@ -95,7 +95,7 @@
/**
* Returns the old value that the property had. If the old value is unknown
* this method returns null.
- *
+ *
* @return the old property value or null.
*/
public Object getOldValue() {
@@ -105,7 +105,7 @@
/**
* Returns the new value that the property now has. If the new value is
* unknown this method returns null.
- *
+ *
* @return the old property value or null.
*/
public Object getNewValue() {
diff --git a/luni/src/main/java/java/beans/PropertyChangeListener.java b/luni/src/main/java/java/beans/PropertyChangeListener.java
index a0a4201..f08a006 100644
--- a/luni/src/main/java/java/beans/PropertyChangeListener.java
+++ b/luni/src/main/java/java/beans/PropertyChangeListener.java
@@ -27,7 +27,7 @@
/**
* The source bean calls this method when an event is raised.
- *
+ *
* @param event
* the {@link PropertyChangeEvent} object which contains the name
* and the old and new value of the property that has changed.
diff --git a/luni/src/main/java/java/beans/PropertyChangeListenerProxy.java b/luni/src/main/java/java/beans/PropertyChangeListenerProxy.java
index 4841b72..7db29e2 100644
--- a/luni/src/main/java/java/beans/PropertyChangeListenerProxy.java
+++ b/luni/src/main/java/java/beans/PropertyChangeListenerProxy.java
@@ -31,7 +31,7 @@
/**
* Creates a new listener proxy that associates a listener with a property
* name.
- *
+ *
* @param propertyName
* the name of the associated property.
* @param listener
@@ -45,7 +45,7 @@
/**
* Returns the name of the property associated with this listener proxy.
- *
+ *
* @return the name of the associated property.
*/
public String getPropertyName() {
diff --git a/luni/src/main/java/java/beans/PropertyChangeSupport.java b/luni/src/main/java/java/beans/PropertyChangeSupport.java
index 0e8e1e4..94bea92 100644
--- a/luni/src/main/java/java/beans/PropertyChangeSupport.java
+++ b/luni/src/main/java/java/beans/PropertyChangeSupport.java
@@ -29,7 +29,7 @@
import java.util.Map;
/**
- * This utility class
+ * This utility class
*
*/
public class PropertyChangeSupport implements Serializable {
@@ -54,7 +54,7 @@
/**
* Creates a new instance that uses the source bean as source for any event.
- *
+ *
* @param sourceBean
* the bean used as source for all events.
*/
@@ -70,7 +70,7 @@
* new value. As source the bean used to initialize this instance is used.
* If the old value and the new value are not null and equal the event will
* not be fired.
- *
+ *
* @param propertyName
* the name of the property
* @param oldValue
@@ -90,7 +90,7 @@
* value, new value and index. As source the bean used to initialize this
* instance is used. If the old value and the new value are not null and
* equal the event will not be fired.
- *
+ *
* @param propertyName
* the name of the property
* @param index
@@ -113,7 +113,7 @@
* was registered to this property. Nothing happens if it was not
* registered with this property or if the property name or the listener is
* null.
- *
+ *
* @param propertyName
* the property name the listener is listening to
* @param listener
@@ -134,7 +134,7 @@
/**
* Adds a listener to a specific property. Nothing happens if the property
* name or the listener is null.
- *
+ *
* @param propertyName
* the name of the property
* @param listener
@@ -168,7 +168,7 @@
/**
* Returns an array of listeners that registered to the property with the
* given name. If the property name is null an empty array is returned.
- *
+ *
* @param propertyName
* the name of the property whose listeners should be returned
* @return the array of listeners to the property with the given name.
@@ -190,7 +190,7 @@
* Fires a property change of a boolean property with the given name. If the
* old value and the new value are not null and equal the event will not be
* fired.
- *
+ *
* @param propertyName
* the property name
* @param oldValue
@@ -209,7 +209,7 @@
* Fires a property change of a boolean property with the given name. If the
* old value and the new value are not null and equal the event will not be
* fired.
- *
+ *
* @param propertyName
* the property name
* @param index
@@ -232,7 +232,7 @@
* Fires a property change of an integer property with the given name. If
* the old value and the new value are not null and equal the event will not
* be fired.
- *
+ *
* @param propertyName
* the property name
* @param oldValue
@@ -251,7 +251,7 @@
* Fires a property change of an integer property with the given name. If
* the old value and the new value are not null and equal the event will not
* be fired.
- *
+ *
* @param propertyName
* the property name
* @param index
@@ -273,7 +273,7 @@
/**
* Returns true if there are listeners registered to the property with the
* given name.
- *
+ *
* @param propertyName
* the name of the property
* @return true if there are listeners registered to that property, false
@@ -293,7 +293,7 @@
/**
* removes a property change listener that was registered to all properties.
- *
+ *
* @param listener
* the listener to remove
*/
@@ -315,7 +315,7 @@
/**
* Registers a listener with all properties.
- *
+ *
* @param listener
* the listener to register
*/
@@ -336,7 +336,7 @@
/**
* Returns an array with the listeners that registered to all properties.
- *
+ *
* @return the array of listeners
*/
public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
@@ -397,7 +397,7 @@
children = new Hashtable<String, List<PropertyChangeListener>>(
selectedSerializedPropertiesChangeListeners);
- children.put("", allSerializedPropertiesChangeListeners);
+ children.put("", allSerializedPropertiesChangeListeners);
oos.writeObject(children);
Object source = null;
@@ -418,7 +418,7 @@
selectedPropertiesChangeListeners = new HashMap<String, List<PropertyChangeListener>>(
children);
allPropertiesChangeListeners = selectedPropertiesChangeListeners
- .remove("");
+ .remove("");
if (allPropertiesChangeListeners == null) {
allPropertiesChangeListeners = new ArrayList<PropertyChangeListener>();
}
@@ -429,7 +429,7 @@
/**
* Fires a property change event to all listeners of that property.
- *
+ *
* @param event
* the event to fire
*/
diff --git a/luni/src/main/java/java/io/BufferedInputStream.java b/luni/src/main/java/java/io/BufferedInputStream.java
index 7d207ed..d335988 100644
--- a/luni/src/main/java/java/io/BufferedInputStream.java
+++ b/luni/src/main/java/java/io/BufferedInputStream.java
@@ -88,7 +88,7 @@
super(in);
if (size <= 0) {
// K0058=size must be > 0
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
buf = new byte[size];
}
@@ -107,7 +107,7 @@
InputStream localIn = in; // 'in' could be invalidated by close()
if (buf == null || localIn == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
return count - pos + localIn.available();
}
@@ -215,7 +215,7 @@
InputStream localIn = in;
if (localBuf == null || localIn == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
/* Are there buffered bytes available? */
@@ -227,7 +227,7 @@
localBuf = buf;
if (localBuf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
}
@@ -271,7 +271,7 @@
byte[] localBuf = buf;
if (localBuf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
// avoid int overflow
// BEGIN android-changed
@@ -280,10 +280,10 @@
// made implicit null check explicit, used (offset | length) < 0
// instead of (offset < 0) || (length < 0) to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | length) < 0 || offset > buffer.length - length) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (length == 0) {
@@ -292,7 +292,7 @@
InputStream localIn = in;
if (localIn == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
int required;
@@ -330,7 +330,7 @@
localBuf = buf;
if (localBuf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
}
@@ -396,14 +396,14 @@
InputStream localIn = in;
if (localBuf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (amount < 1) {
return 0;
}
if (localIn == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (count - pos >= amount) {
diff --git a/luni/src/main/java/java/io/BufferedOutputStream.java b/luni/src/main/java/java/io/BufferedOutputStream.java
index 43013da..91a6e89 100644
--- a/luni/src/main/java/java/io/BufferedOutputStream.java
+++ b/luni/src/main/java/java/io/BufferedOutputStream.java
@@ -72,7 +72,7 @@
super(out);
if (size <= 0) {
// K0058=size must be > 0
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
buf = new byte[size];
}
@@ -87,7 +87,7 @@
@Override
public synchronized void flush() throws IOException {
if (buf == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
flushInternal();
@@ -124,28 +124,28 @@
throws IOException {
byte[] internalBuffer = buf;
if (internalBuffer == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (buffer == null) {
// K0047=buffer is null
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
-
+
if (length >= internalBuffer.length) {
flushInternal();
out.write(buffer, offset, length);
return;
}
-
+
if (offset < 0 || offset > buffer.length - length) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
-
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+
}
if (length < 0) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
// flush the internal buffer first if we have not enough space left
@@ -162,7 +162,7 @@
if (buf == null) {
return;
}
-
+
try {
super.close();
} finally {
@@ -186,7 +186,7 @@
public synchronized void write(int oneByte) throws IOException {
byte[] internalBuffer = buf;
if (internalBuffer == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (count == internalBuffer.length) {
diff --git a/luni/src/main/java/java/io/BufferedReader.java b/luni/src/main/java/java/io/BufferedReader.java
index a062884..cbe88e6 100644
--- a/luni/src/main/java/java/io/BufferedReader.java
+++ b/luni/src/main/java/java/io/BufferedReader.java
@@ -30,13 +30,13 @@
* some extra space is required to hold the buffer and that copying takes place
* when filling that buffer, but this is usually outweighed by the performance
* benefits.
- *
+ *
* <p/>A typical application pattern for the class looks like this:<p/>
*
* <pre>
* BufferedReader buf = new BufferedReader(new FileReader("file.java"));
* </pre>
- *
+ *
* @see BufferedWriter
* @since 1.1
*/
@@ -95,7 +95,7 @@
public BufferedReader(Reader in, int size) {
super(in);
if (size <= 0) {
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
this.in = in;
buf = new char[size];
@@ -105,7 +105,7 @@
* Closes this reader. This implementation closes the buffered source reader
* and releases the buffer. Nothing is done if this reader has already been
* closed.
- *
+ *
* @throws IOException
* if an error occurs while closing this reader.
*/
@@ -167,7 +167,7 @@
/**
* Indicates whether or not this reader is closed.
- *
+ *
* @return {@code true} if this reader is closed, {@code false}
* otherwise.
*/
@@ -180,7 +180,7 @@
* indicates how many characters can be read before the mark is invalidated.
* Calling {@code reset()} will reposition the reader back to the marked
* position if {@code markLimit} has not been surpassed.
- *
+ *
* @param markLimit
* the number of characters that can be read before the mark is
* invalidated.
@@ -198,7 +198,7 @@
}
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
this.markLimit = markLimit;
mark = pos;
@@ -208,7 +208,7 @@
/**
* Indicates whether this reader supports the {@code mark()} and
* {@code reset()} methods. This implementation returns {@code true}.
- *
+ *
* @return {@code true} for {@code BufferedReader}.
* @see #mark(int)
* @see #reset()
@@ -234,7 +234,7 @@
public int read() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
/* Are there buffered characters available? */
if (pos < end || fillBuf() != -1) {
@@ -252,7 +252,7 @@
* has not been set and the requested number of characters is larger than
* this readers buffer size, BufferedReader bypasses the buffer and simply
* places the results directly into {@code buffer}.
- *
+ *
* @param buffer
* the character array to store the characters read.
* @param offset
@@ -274,7 +274,7 @@
public int read(char[] buffer, int offset, int length) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
if (offset < 0 || offset > buffer.length - length || length < 0) {
throw new IndexOutOfBoundsException();
@@ -350,7 +350,7 @@
* represented by zero or more characters followed by {@code '\n'},
* {@code '\r'}, {@code "\r\n"} or the end of the reader. The string does
* not include the newline sequence.
- *
+ *
* @return the contents of the line or {@code null} if no characters were
* read before the end of the reader has been reached.
* @throws IOException
@@ -359,7 +359,7 @@
public String readLine() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
/* has the underlying stream been exhausted? */
if (pos == end && fillBuf() == -1) {
@@ -452,7 +452,7 @@
public boolean ready() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
return ((end - pos) > 0) || in.ready();
}
@@ -462,7 +462,7 @@
* Resets this reader's position to the last {@code mark()} location.
* Invocations of {@code read()} and {@code skip()} will occur from this new
* location.
- *
+ *
* @throws IOException
* if this reader is closed or no mark has been set.
* @see #mark(int)
@@ -472,10 +472,10 @@
public void reset() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
if (mark == -1) {
- throw new IOException(Msg.getString("K005c"));
+ throw new IOException(Msg.getString("K005c"));
}
pos = mark;
}
@@ -486,7 +486,7 @@
* {@code read()}s will not return these characters unless {@code reset()}
* is used. Skipping characters may invalidate a mark if {@code markLimit}
* is surpassed.
- *
+ *
* @param amount
* the maximum number of characters to skip.
* @return the number of characters actually skipped.
@@ -505,7 +505,7 @@
}
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005b"));
+ throw new IOException(Msg.getString("K005b"));
}
if (amount < 1) {
return 0;
diff --git a/luni/src/main/java/java/io/BufferedWriter.java b/luni/src/main/java/java/io/BufferedWriter.java
index 51a6bb5..bbbce7e 100644
--- a/luni/src/main/java/java/io/BufferedWriter.java
+++ b/luni/src/main/java/java/io/BufferedWriter.java
@@ -52,7 +52,7 @@
private int pos;
private final String lineSeparator = AccessController
- .doPrivileged(new PriviAction<String>("line.separator"));
+ .doPrivileged(new PriviAction<String>("line.separator"));
/**
* Constructs a new {@code BufferedWriter}, providing {@code out} with a buffer
@@ -75,7 +75,7 @@
public BufferedWriter(Writer out, int size) {
super(out);
if (size <= 0) {
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
this.out = out;
this.buf = new char[size];
@@ -130,7 +130,7 @@
public void flush() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005d"));
+ throw new IOException(Msg.getString("K005d"));
}
flushInternal();
out.flush();
@@ -191,7 +191,7 @@
public void write(char[] cbuf, int offset, int count) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005d"));
+ throw new IOException(Msg.getString("K005d"));
}
// BEGIN android-changed
// Exception priorities (in case of multiple errors) differ from
@@ -199,10 +199,10 @@
// made implicit null check explicit, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if (cbuf == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || offset > cbuf.length - count) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (pos == 0 && count >= this.buf.length) {
@@ -249,7 +249,7 @@
public void write(int oneChar) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005d"));
+ throw new IOException(Msg.getString("K005d"));
}
if (pos >= buf.length) {
out.write(buf, 0, buf.length);
@@ -283,7 +283,7 @@
public void write(String str, int offset, int count) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K005d"));
+ throw new IOException(Msg.getString("K005d"));
}
if (count <= 0) {
return;
diff --git a/luni/src/main/java/java/io/ByteArrayInputStream.java b/luni/src/main/java/java/io/ByteArrayInputStream.java
index cf9f745..6dbfd69 100644
--- a/luni/src/main/java/java/io/ByteArrayInputStream.java
+++ b/luni/src/main/java/java/io/ByteArrayInputStream.java
@@ -174,7 +174,7 @@
// END android-note
// BEGIN android-changed
if (b == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// avoid int overflow
// Exception priorities (in case of multiple errors) differ from
@@ -182,7 +182,7 @@
// removed redundant check, used (offset | length) < 0 instead of
// (offset < 0) || (length < 0) to safe one operation
if ((offset | length) < 0 || length > b.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
// Are there any bytes available?
diff --git a/luni/src/main/java/java/io/ByteArrayOutputStream.java b/luni/src/main/java/java/io/ByteArrayOutputStream.java
index 213e74d..970252c 100644
--- a/luni/src/main/java/java/io/ByteArrayOutputStream.java
+++ b/luni/src/main/java/java/io/ByteArrayOutputStream.java
@@ -64,7 +64,7 @@
if (size >= 0) {
buf = new byte[size];
} else {
- throw new IllegalArgumentException(Msg.getString("K005e"));
+ throw new IllegalArgumentException(Msg.getString("K005e"));
}
}
@@ -204,10 +204,10 @@
// used (offset | len) < 0 instead of (offset < 0) || (len < 0)
// to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | len) < 0 || len > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (len == 0) {
diff --git a/luni/src/main/java/java/io/CharArrayReader.java b/luni/src/main/java/java/io/CharArrayReader.java
index 1185e59..ecd6658 100644
--- a/luni/src/main/java/java/io/CharArrayReader.java
+++ b/luni/src/main/java/java/io/CharArrayReader.java
@@ -139,7 +139,7 @@
public void mark(int readLimit) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
markedPos = pos;
}
@@ -172,7 +172,7 @@
public int read() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
if (pos == count) {
return -1;
@@ -211,16 +211,16 @@
if (offset < 0 || offset > buffer.length) {
// K002e=Offset out of bounds \: {0}
throw new ArrayIndexOutOfBoundsException(
- Msg.getString("K002e", offset));
+ Msg.getString("K002e", offset));
}
if (len < 0 || len > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
throw new ArrayIndexOutOfBoundsException(
- Msg.getString("K0031", len));
+ Msg.getString("K0031", len));
}
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
if (pos < this.count) {
int bytesRead = pos + len > this.count ? this.count - pos : len;
@@ -248,7 +248,7 @@
public boolean ready() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
return pos != count;
}
@@ -267,7 +267,7 @@
public void reset() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
pos = markedPos != -1 ? markedPos : 0;
}
@@ -288,7 +288,7 @@
public long skip(long n) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0060"));
+ throw new IOException(Msg.getString("K0060"));
}
if (n <= 0) {
return 0;
diff --git a/luni/src/main/java/java/io/CharArrayWriter.java b/luni/src/main/java/java/io/CharArrayWriter.java
index 1e6fd3f..d0d9a28 100644
--- a/luni/src/main/java/java/io/CharArrayWriter.java
+++ b/luni/src/main/java/java/io/CharArrayWriter.java
@@ -63,7 +63,7 @@
public CharArrayWriter(int initialSize) {
super();
if (initialSize < 0) {
- throw new IllegalArgumentException(Msg.getString("K005e"));
+ throw new IllegalArgumentException(Msg.getString("K005e"));
}
buf = new char[initialSize];
lock = buf;
@@ -175,10 +175,10 @@
// added null check, used (offset | len) < 0 instead of
// (offset < 0) || (len < 0) to safe one operation
if (c == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | len) < 0 || len > c.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
synchronized (lock) {
@@ -224,7 +224,7 @@
@Override
public void write(String str, int offset, int len) {
if (str == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// avoid int overflow
// BEGIN android-changed
@@ -233,7 +233,7 @@
// removed redundant check, used (offset | len) < 0
// instead of (offset < 0) || (len < 0) to safe one operation
if ((offset | len) < 0 || len > str.length() - offset) {
- throw new StringIndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new StringIndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
synchronized (lock) {
diff --git a/luni/src/main/java/java/io/Closeable.java b/luni/src/main/java/java/io/Closeable.java
index 94b6bd8..623b656 100644
--- a/luni/src/main/java/java/io/Closeable.java
+++ b/luni/src/main/java/java/io/Closeable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/io/DataInput.java b/luni/src/main/java/java/io/DataInput.java
index 02a28d9..b6f3c72 100644
--- a/luni/src/main/java/java/io/DataInput.java
+++ b/luni/src/main/java/java/io/DataInput.java
@@ -48,7 +48,7 @@
public interface DataInput {
/**
* Reads a boolean.
- *
+ *
* @return the next boolean value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -60,7 +60,7 @@
/**
* Reads an 8-bit byte value.
- *
+ *
* @return the next byte value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -72,7 +72,7 @@
/**
* Reads a 16-bit character value.
- *
+ *
* @return the next char value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -84,7 +84,7 @@
/**
* Reads a 64-bit double value.
- *
+ *
* @return the next double value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -96,7 +96,7 @@
/**
* Reads a 32-bit float value.
- *
+ *
* @return the next float value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -109,7 +109,7 @@
/**
* Reads bytes into the byte array {@code buffer}. This method will block
* until {@code buffer.length} number of bytes have been read.
- *
+ *
* @param buffer
* the buffer to read bytes into.
* @throws EOFException if the end of the input is reached before the read
@@ -125,7 +125,7 @@
* Reads bytes and stores them in the byte array {@code buffer} starting at
* offset {@code offset}. This method blocks until {@code count} number of
* bytes have been read.
- *
+ *
* @param buffer
* the byte array in which to store the bytes read.
* @param offset
@@ -145,7 +145,7 @@
/**
* Reads a 32-bit integer value.
- *
+ *
* @return the next int value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -160,7 +160,7 @@
* stream. A line is made of zero or more characters followed by {@code
* '\n'}, {@code '\r'}, {@code "\r\n"} or the end of the stream. The string
* does not include the newline sequence.
- *
+ *
* @return the contents of the line or null if no characters have been read
* before the end of the stream.
* @throws EOFException if the end of the input is reached before the read
@@ -172,7 +172,7 @@
/**
* Reads a 64-bit long value.
- *
+ *
* @return the next long value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -184,7 +184,7 @@
/**
* Reads a 16-bit short value.
- *
+ *
* @return the next short value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -196,7 +196,7 @@
/**
* Reads an unsigned 8-bit byte value and returns it as an int.
- *
+ *
* @return the next unsigned byte value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -208,7 +208,7 @@
/**
* Reads a 16-bit unsigned short value and returns it as an int.
- *
+ *
* @return the next unsigned short value.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -220,7 +220,7 @@
/**
* Reads a string encoded with {@link DataInput modified UTF-8}.
- *
+ *
* @return the next string encoded with {@link DataInput modified UTF-8}.
* @throws EOFException if the end of the input is reached before the read
* request can be satisfied.
@@ -234,7 +234,7 @@
* Skips {@code count} number of bytes. This method will not throw an
* {@link EOFException} if the end of the input is reached before
* {@code count} bytes where skipped.
- *
+ *
* @param count
* the number of bytes to skip.
* @return the number of bytes actually skipped.
diff --git a/luni/src/main/java/java/io/DataInputStream.java b/luni/src/main/java/java/io/DataInputStream.java
index 8b16cb6..55bc380 100644
--- a/luni/src/main/java/java/io/DataInputStream.java
+++ b/luni/src/main/java/java/io/DataInputStream.java
@@ -246,10 +246,10 @@
return;
}
if (in == null) {
- throw new NullPointerException(Msg.getString("KA00b"));
+ throw new NullPointerException(Msg.getString("KA00b"));
}
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// BEGIN android-changed
// Exception priorities (in case of multiple errors) differ from
@@ -257,7 +257,7 @@
// used (offset | length) < 0 instead of separate (offset < 0) and
// (length < 0) check to safe one operation
if ((offset | length) < 0 || offset > buffer.length - length) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
while (length > 0) {
diff --git a/luni/src/main/java/java/io/DataOutputStream.java b/luni/src/main/java/java/io/DataOutputStream.java
index dcc7eef..72b038c 100644
--- a/luni/src/main/java/java/io/DataOutputStream.java
+++ b/luni/src/main/java/java/io/DataOutputStream.java
@@ -96,7 +96,7 @@
// changed array notation to be consistent with the rest of harmony
// END android-note
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
out.write(buffer, offset, count);
written += count;
@@ -335,7 +335,7 @@
public final void writeUTF(String str) throws IOException {
long utfCount = countUTFBytes(str);
if (utfCount > 65535) {
- throw new UTFDataFormatException(Msg.getString("K0068"));
+ throw new UTFDataFormatException(Msg.getString("K0068"));
}
byte[] buffer = new byte[(int)utfCount + 2];
int offset = 0;
diff --git a/luni/src/main/java/java/io/EOFException.java b/luni/src/main/java/java/io/EOFException.java
index 7999f43..0103469 100644
--- a/luni/src/main/java/java/io/EOFException.java
+++ b/luni/src/main/java/java/io/EOFException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new {@code EOFException} with its stack trace and detail
* message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/EmulatedFields.java b/luni/src/main/java/java/io/EmulatedFields.java
index f6dbdfc..580cfe3 100644
--- a/luni/src/main/java/java/io/EmulatedFields.java
+++ b/luni/src/main/java/java/io/EmulatedFields.java
@@ -21,7 +21,7 @@
* An EmulatedFields is an object that represents a set of emulated fields for
* an object being dumped or loaded. It allows objects to be dumped with a shape
* different than the fields they were declared to have.
- *
+ *
* @see ObjectInputStream.GetField
* @see ObjectOutputStream.PutField
* @see EmulatedFieldsForLoading
@@ -44,7 +44,7 @@
/**
* Returns the descriptor for this emulated field.
- *
+ *
* @return the field descriptor
*/
public ObjectStreamField getField() {
@@ -53,7 +53,7 @@
/**
* Returns the value held by this emulated field.
- *
+ *
* @return the field value
*/
public Object getFieldValue() {
@@ -68,7 +68,7 @@
/**
* Constructs a new instance of EmulatedFields.
- *
+ *
* @param fields
* an array of ObjectStreamFields, which describe the fields to
* be emulated (names, types, etc).
@@ -87,7 +87,7 @@
/**
* Build emulated slots that correspond to emulated fields. A slot is a
* field descriptor (ObjectStreamField) plus the actual value it holds.
- *
+ *
* @param fields
* an array of ObjectStreamField, which describe the fields to be
* emulated (names, types, etc).
@@ -107,12 +107,12 @@
* a value explicitly assigned and that it still holds a default value for
* its type, or {@code false} indicating that the field named has been
* assigned a value explicitly.
- *
+ *
* @param name
* the name of the field to test.
* @return {@code true} if {@code name} still holds its default value,
* {@code false} otherwise
- *
+ *
* @throws IllegalArgumentException
* if {@code name} is {@code null}
*/
@@ -133,7 +133,7 @@
* terms of assignment, or null is returned. If {@code fieldType} is {@code
* null}, no such compatibility checking is performed and the slot is
* returned.
- *
+ *
* @param fieldName
* the name of the field to find
* @param fieldType
@@ -191,14 +191,14 @@
* Finds and returns the byte value of a given field named {@code name}
* in the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -217,14 +217,14 @@
* Finds and returns the char value of a given field named {@code name} in the
* receiver. If the field has not been assigned any value yet, the default
* value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -243,14 +243,14 @@
* Finds and returns the double value of a given field named {@code name}
* in the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -269,14 +269,14 @@
* Finds and returns the float value of a given field named {@code name} in
* the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -295,14 +295,14 @@
* Finds and returns the int value of a given field named {@code name} in the
* receiver. If the field has not been assigned any value yet, the default
* value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -321,14 +321,14 @@
* Finds and returns the long value of a given field named {@code name} in the
* receiver. If the field has not been assigned any value yet, the default
* value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -347,14 +347,14 @@
* Finds and returns the Object value of a given field named {@code name} in
* the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -372,14 +372,14 @@
* Finds and returns the short value of a given field named {@code name} in
* the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -398,14 +398,14 @@
* Finds and returns the boolean value of a given field named {@code name} in
* the receiver. If the field has not been assigned any value yet, the
* default value {@code defaultValue} is returned instead.
- *
+ *
* @param name
* the name of the field to find.
* @param defaultValue
* return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, the default
* value otherwise.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -423,12 +423,12 @@
/**
* Find and set the byte value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -444,12 +444,12 @@
/**
* Find and set the char value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -465,12 +465,12 @@
/**
* Find and set the double value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -486,12 +486,12 @@
/**
* Find and set the float value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -507,12 +507,12 @@
/**
* Find and set the int value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -528,12 +528,12 @@
/**
* Find and set the long value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -549,12 +549,12 @@
/**
* Find and set the Object value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -574,12 +574,12 @@
/**
* Find and set the short value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -595,12 +595,12 @@
/**
* Find and set the boolean value of a given field named {@code name} in the
* receiver.
- *
+ *
* @param name
* the name of the field to set.
* @param value
* new value for the field.
- *
+ *
* @throws IllegalArgumentException
* if the corresponding field can not be found.
*/
@@ -615,7 +615,7 @@
/**
* Return the array of ObjectSlot the receiver represents.
- *
+ *
* @return array of ObjectSlot the receiver represents.
*/
public ObjectSlot[] slots() {
diff --git a/luni/src/main/java/java/io/EmulatedFieldsForDumping.java b/luni/src/main/java/java/io/EmulatedFieldsForDumping.java
index c3743dd..8903537 100644
--- a/luni/src/main/java/java/io/EmulatedFieldsForDumping.java
+++ b/luni/src/main/java/java/io/EmulatedFieldsForDumping.java
@@ -21,8 +21,8 @@
* An EmulatedFieldsForDumping is an object that represents a set of emulated
* fields for an object being dumped. It is a concrete implementation for
* ObjectOutputStream.PutField
- *
- *
+ *
+ *
* @see ObjectOutputStream.PutField
* @see EmulatedFieldsForLoading
*/
@@ -33,7 +33,7 @@
/**
* Constructs a new instance of EmulatedFieldsForDumping.
- *
+ *
* @param streamClass
* a ObjectStreamClass, which describe the fields to be emulated
* (names, types, etc).
@@ -48,7 +48,7 @@
* Return the actual EmulatedFields instance used by the receiver. We have
* the actual work in a separate class so that the code can be shared. The
* receiver has to be of a subclass of PutField.
- *
+ *
* @return array of ObjectSlot the receiver represents.
*/
EmulatedFields emulatedFields() {
@@ -58,7 +58,7 @@
/**
* Find and set the byte value of a given field named <code>name</code> in
* the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -72,7 +72,7 @@
/**
* Find and set the char value of a given field named <code>name</code> in
* the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -86,7 +86,7 @@
/**
* Find and set the double value of a given field named <code>name</code>
* in the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -100,7 +100,7 @@
/**
* Find and set the float value of a given field named <code>name</code>
* in the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -114,7 +114,7 @@
/**
* Find and set the int value of a given field named <code>name</code> in
* the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -128,7 +128,7 @@
/**
* Find and set the long value of a given field named <code>name</code> in
* the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -142,7 +142,7 @@
/**
* Find and set the Object value of a given field named <code>name</code>
* in the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -156,7 +156,7 @@
/**
* Find and set the short value of a given field named <code>name</code>
* in the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -170,7 +170,7 @@
/**
* Find and set the boolean value of a given field named <code>name</code>
* in the receiver.
- *
+ *
* @param name
* A String, the name of the field to set
* @param value
@@ -183,10 +183,10 @@
/**
* Write the field values to the specified ObjectOutput.
- *
+ *
* @param output
* the ObjectOutput
- *
+ *
* @throws IOException
* If an IO exception happened when writing the field values.
*/
diff --git a/luni/src/main/java/java/io/EmulatedFieldsForLoading.java b/luni/src/main/java/java/io/EmulatedFieldsForLoading.java
index e07ba0f..d92f650 100644
--- a/luni/src/main/java/java/io/EmulatedFieldsForLoading.java
+++ b/luni/src/main/java/java/io/EmulatedFieldsForLoading.java
@@ -21,7 +21,7 @@
* An EmulatedFieldsForLoading is an object that represents a set of emulated
* fields for an object being loaded. It is a concrete implementation for
* ObjectInputStream.GetField
- *
+ *
* @see ObjectInputStream.GetField
* @see EmulatedFieldsForDumping
*/
@@ -35,7 +35,7 @@
/**
* Constructs a new instance of EmulatedFieldsForDumping.
- *
+ *
* @param streamClass
* an ObjectStreamClass, defining the class for which to emulate
* fields.
@@ -51,12 +51,12 @@
* Return a boolean indicating if the field named <code>name</code> has
* been assigned a value explicitly (false) or if it still holds a default
* value for the type (true) because it hasn't been assigned to yet.
- *
+ *
* @param name
* A String, the name of the field to test
* @return <code>true</code> if the field holds it default value,
* <code>false</code> otherwise.
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -72,7 +72,7 @@
* Return the actual EmulatedFields instance used by the receiver. We have
* the actual work in a separate class so that the code can be shared. The
* receiver has to be of a subclass of GetField.
- *
+ *
* @return array of ObjectSlot the receiver represents.
*/
EmulatedFields emulatedFields() {
@@ -83,14 +83,14 @@
* Find and return the byte value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -106,14 +106,14 @@
* Find and return the char value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -129,14 +129,14 @@
* Find and return the double value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -152,14 +152,14 @@
* Find and return the float value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -175,14 +175,14 @@
* Find and return the int value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -198,14 +198,14 @@
* Find and return the long value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -221,14 +221,14 @@
* Find and return the Object value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -244,14 +244,14 @@
* Find and return the short value of a given field named <code>name</code>
* in the receiver. If the field has not been assigned any value yet, the
* default value <code>defaultValue</code> is returned instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -268,14 +268,14 @@
* <code>name</code> in the receiver. If the field has not been assigned
* any value yet, the default value <code>defaultValue</code> is returned
* instead.
- *
+ *
* @param name
* A String, the name of the field to find
* @param defaultValue
* Return value in case the field has not been assigned to yet.
* @return the value of the given field if it has been assigned, or the
* default value otherwise
- *
+ *
* @throws IOException
* If an IO error occurs
* @throws IllegalArgumentException
@@ -289,7 +289,7 @@
/**
* Return the class descriptor for which the emulated fields are defined.
- *
+ *
* @return ObjectStreamClass The class descriptor for which the emulated
* fields are defined.
*/
diff --git a/luni/src/main/java/java/io/Externalizable.java b/luni/src/main/java/java/io/Externalizable.java
index d07f0b7..1597ded 100644
--- a/luni/src/main/java/java/io/Externalizable.java
+++ b/luni/src/main/java/java/io/Externalizable.java
@@ -24,7 +24,7 @@
public interface Externalizable extends Serializable {
/**
* Reads the next object from the ObjectInput <code>input</code>.
- *
+ *
* @param input
* the ObjectInput from which the next object is read.
* @throws IOException
@@ -37,7 +37,7 @@
/**
* Writes the receiver to the ObjectOutput <code>output</code>.
- *
+ *
* @param output
* the ObjectOutput to write the object to.
* @throws IOException
diff --git a/luni/src/main/java/java/io/File.java b/luni/src/main/java/java/io/File.java
index c651ba0..e706282 100644
--- a/luni/src/main/java/java/io/File.java
+++ b/luni/src/main/java/java/io/File.java
@@ -68,7 +68,7 @@
private static final long serialVersionUID = 301077366599181567L;
- private static final String EMPTY_STRING = "";
+ private static final String EMPTY_STRING = "";
// Caches the UTF-8 Charset for newCString.
private static final Charset UTF8 = Charset.forName("UTF-8");
@@ -122,8 +122,8 @@
static {
// The default protection domain grants access to these properties.
- separatorChar = System.getProperty("file.separator", "/").charAt(0);
- pathSeparatorChar = System.getProperty("path.separator", ":").charAt(0);
+ separatorChar = System.getProperty("file.separator", "/").charAt(0);
+ pathSeparatorChar = System.getProperty("path.separator", ":").charAt(0);
separator = String.valueOf(separatorChar);
pathSeparator = String.valueOf(pathSeparatorChar);
}
@@ -206,7 +206,7 @@
return;
}
String userDir = AccessController.doPrivileged(
- new PriviAction<String>("user.dir"));
+ new PriviAction<String>("user.dir"));
this.pathBytes = newCString(path.isEmpty() ? userDir : join(userDir, path));
}
@@ -906,7 +906,7 @@
return false;
}
if (time < 0) {
- throw new IllegalArgumentException(Msg.getString("K006a"));
+ throw new IllegalArgumentException(Msg.getString("K006a"));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -1320,7 +1320,7 @@
security.checkWrite(path);
}
if (path.isEmpty()) {
- throw new IOException(Msg.getString("KA012"));
+ throw new IOException(Msg.getString("KA012"));
}
return createNewFileImpl(pathBytes);
}
@@ -1494,7 +1494,7 @@
if (!name.startsWith("/")) {
// start with sep.
return new URL(
- "file", EMPTY_STRING, -1, new StringBuilder(name.length() + 1)
+ "file", EMPTY_STRING, -1, new StringBuilder(name.length() + 1)
.append('/').append(name).toString(), null);
} else if (name.startsWith("//")) {
return new URL("file:" + name); // UNC path
diff --git a/luni/src/main/java/java/io/FileNotFoundException.java b/luni/src/main/java/java/io/FileNotFoundException.java
index 2ab9e89..970e972 100644
--- a/luni/src/main/java/java/io/FileNotFoundException.java
+++ b/luni/src/main/java/java/io/FileNotFoundException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new {@code FileNotFoundException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/FileOutputStream.java b/luni/src/main/java/java/io/FileOutputStream.java
index 88b1d11..0e58092 100644
--- a/luni/src/main/java/java/io/FileOutputStream.java
+++ b/luni/src/main/java/java/io/FileOutputStream.java
@@ -116,7 +116,7 @@
public FileOutputStream(FileDescriptor fd) {
super();
if (fd == null) {
- throw new NullPointerException(Msg.getString("K006c"));
+ throw new NullPointerException(Msg.getString("K006c"));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -280,10 +280,10 @@
// used (offset | count) < 0 instead of (offset < 0) || (count < 0)
// to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((count | offset) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
diff --git a/luni/src/main/java/java/io/FilePermission.java b/luni/src/main/java/java/io/FilePermission.java
index a6a450b..99f7a1d 100644
--- a/luni/src/main/java/java/io/FilePermission.java
+++ b/luni/src/main/java/java/io/FilePermission.java
@@ -47,15 +47,15 @@
* </ul>
*/
public final class FilePermission extends Permission implements Serializable {
-
+
private static final long serialVersionUID = 7930732926638008763L;
// canonical path of this permission
private transient String canonPath;
// list of actions permitted for socket permission in order
- private static final String[] actionList = { "read", "write", "execute",
- "delete" };
+ private static final String[] actionList = { "read", "write", "execute",
+ "delete" };
// "canonicalized" action list
private String actions;
@@ -73,7 +73,7 @@
/**
* Constructs a new FilePermission with the path and actions specified.
- *
+ *
* @param path
* the pathname of the file or directory to apply the actions to.
* @param actions
@@ -92,15 +92,15 @@
}
private void init(final String path, String pathActions) {
- if (pathActions == null || pathActions.equals("")) {
- throw new IllegalArgumentException(Msg.getString("K006d"));
+ if (pathActions == null || pathActions.equals("")) {
+ throw new IllegalArgumentException(Msg.getString("K006d"));
}
this.actions = toCanonicalActionString(pathActions);
if (path == null) {
- throw new NullPointerException(Msg.getString("K006e"));
+ throw new NullPointerException(Msg.getString("K006e"));
}
- if (path.equals("<<ALL FILES>>")) {
+ if (path.equals("<<ALL FILES>>")) {
includeAll = true;
} else {
canonPath = AccessController
@@ -113,10 +113,10 @@
}
}
});
- if (path.equals("*") || path.endsWith(File.separator + "*")) {
+ if (path.equals("*") || path.endsWith(File.separator + "*")) {
allDir = true;
}
- if (path.equals("-") || path.endsWith(File.separator + "-")) {
+ if (path.equals("-") || path.endsWith(File.separator + "-")) {
allSubdir = true;
}
}
@@ -126,7 +126,7 @@
* Returns the string representing this permission's actions. It must be of
* the form "read,write,execute,delete", all lower case and in the correct
* order if there is more than one action.
- *
+ *
* @param action
* the action name
* @return the string representing this permission's actions
@@ -149,7 +149,7 @@
for (int i = 0; i < len; i++) {
if ((highestBitMask & mask) != 0) {
if (addedItem) {
- result.append(",");
+ result.append(",");
}
result.append(actionList[i]);
addedItem = true;
@@ -161,7 +161,7 @@
/**
* Returns the numerical representation of the argument.
- *
+ *
* @param actionNames
* the action names
* @return the action mask
@@ -169,20 +169,20 @@
private int getMask(String actionNames) {
int actionInt = 0, head = 0, tail = 0;
do {
- tail = actionNames.indexOf(",", head);
+ tail = actionNames.indexOf(",", head);
String action = tail > 0 ? actionNames.substring(head, tail).trim()
: actionNames.substring(head).trim();
- if (action.equals("read")) {
+ if (action.equals("read")) {
actionInt |= 8;
- } else if (action.equals("write")) {
+ } else if (action.equals("write")) {
actionInt |= 4;
- } else if (action.equals("execute")) {
+ } else if (action.equals("execute")) {
actionInt |= 2;
- } else if (action.equals("delete")) {
+ } else if (action.equals("delete")) {
actionInt |= 1;
} else {
throw new IllegalArgumentException(Msg.getString(
- "K006f", action));
+ "K006f", action));
}
head = tail + 1;
} while (tail > 0);
@@ -191,7 +191,7 @@
/**
* Returns the actions associated with this file permission.
- *
+ *
* @return the actions associated with this file permission.
*/
@Override
@@ -203,7 +203,7 @@
* Indicates if this file permission is equal to another. The two are equal
* if {@code obj} is a FilePermission, they have the same path, and they
* have the same actions.
- *
+ *
* @param obj
* the object to check equality with.
* @return {@code true} if this file permission is equal to {@code obj},
@@ -234,7 +234,7 @@
* {@code FilePermission}, if {@code p}'s actions are a subset of this
* file permission's actions and if {@code p}'s path is implied by this
* file permission's path.
- *
+ *
* @param p
* the permission to check.
* @return {@code true} if the argument permission is implied by the
@@ -249,7 +249,7 @@
/**
* Returns an int describing what masks are implied by a specific
* permission.
- *
+ *
* @param p
* the permission
* @return the mask applied to the given permission
@@ -351,7 +351,7 @@
/**
* Returns a new PermissionCollection in which to place FilePermission
* objects.
- *
+ *
* @return A new PermissionCollection object suitable for storing
* FilePermission objects.
*/
@@ -362,7 +362,7 @@
/**
* Calculates the hash code value for this file permission.
- *
+ *
* @return the hash code value for this file permission.
*/
@Override
diff --git a/luni/src/main/java/java/io/FilePermissionCollection.java b/luni/src/main/java/java/io/FilePermissionCollection.java
index 3049442..fb36855 100644
--- a/luni/src/main/java/java/io/FilePermissionCollection.java
+++ b/luni/src/main/java/java/io/FilePermissionCollection.java
@@ -42,7 +42,7 @@
/**
* Add a permission object to the permission collection.
- *
+ *
* @param permission
* the FilePermission object to add to the collection.
* @throws IllegalArgumentException
@@ -66,7 +66,7 @@
/**
* Returns an enumeration for the collection of permissions.
- *
+ *
* @return a permission enumeration for this permission collection.
* @see java.security.PermissionCollection#elements()
*/
@@ -78,7 +78,7 @@
/**
* Indicates whether this permissions collection implies a specific
* {@code permission}.
- *
+ *
* @param permission
* the permission to check.
* @see java.security.PermissionCollection#implies(java.security.Permission)
diff --git a/luni/src/main/java/java/io/FileReader.java b/luni/src/main/java/java/io/FileReader.java
index c62fdeb..6cb82b6 100644
--- a/luni/src/main/java/java/io/FileReader.java
+++ b/luni/src/main/java/java/io/FileReader.java
@@ -24,7 +24,7 @@
* Since this may induce some performance penalty, in particular if many small
* read requests are made, a FileReader is often wrapped by a
* BufferedReader.
- *
+ *
* @see BufferedReader
* @see FileWriter
*/
@@ -32,7 +32,7 @@
/**
* Constructs a new FileReader on the given {@code file}.
- *
+ *
* @param file
* a File to be opened for reading characters from.
* @throws FileNotFoundException
@@ -46,7 +46,7 @@
* Construct a new FileReader on the given FileDescriptor {@code fd}. Since
* a previously opened FileDescriptor is passed as an argument, no
* FileNotFoundException can be thrown.
- *
+ *
* @param fd
* the previously opened file descriptor.
*/
@@ -56,7 +56,7 @@
/**
* Construct a new FileReader on the given file named {@code filename}.
- *
+ *
* @param filename
* an absolute or relative path specifying the file to open.
* @throws FileNotFoundException
diff --git a/luni/src/main/java/java/io/FileWriter.java b/luni/src/main/java/java/io/FileWriter.java
index 86a9af8..c232328 100644
--- a/luni/src/main/java/java/io/FileWriter.java
+++ b/luni/src/main/java/java/io/FileWriter.java
@@ -24,7 +24,7 @@
* Since this may induce some performance penalty, in particular if many small
* write requests are made, a FileWriter is often wrapped by a
* BufferedWriter.
- *
+ *
* @see BufferedWriter
* @see FileReader
*/
@@ -32,7 +32,7 @@
/**
* Creates a FileWriter using the File {@code file}.
- *
+ *
* @param file
* the non-null File to write bytes to.
* @throws IOException
@@ -46,7 +46,7 @@
* Creates a FileWriter using the File {@code file}. The parameter
* {@code append} determines whether or not the file is opened and appended
* to or just opened and overwritten.
- *
+ *
* @param file
* the non-null File to write bytes to.
* @param append
@@ -60,7 +60,7 @@
/**
* Creates a FileWriter using the existing FileDescriptor {@code fd}.
- *
+ *
* @param fd
* the non-null FileDescriptor to write bytes to.
*/
@@ -70,7 +70,7 @@
/**
* Creates a FileWriter using the platform dependent {@code filename}.
- *
+ *
* @param filename
* the non-null name of the file to write bytes to.
* @throws IOException
@@ -84,7 +84,7 @@
* Creates a FileWriter using the platform dependent {@code filename}. The
* parameter {@code append} determines whether or not the file is opened and
* appended to or just opened and overwritten.
- *
+ *
* @param filename
* the non-null name of the file to write bytes to.
* @param append
diff --git a/luni/src/main/java/java/io/FilenameFilter.java b/luni/src/main/java/java/io/FilenameFilter.java
index a51bcc6..35381b9 100644
--- a/luni/src/main/java/java/io/FilenameFilter.java
+++ b/luni/src/main/java/java/io/FilenameFilter.java
@@ -20,7 +20,7 @@
/**
* An interface for filtering {@link File} objects based on their names
* or the directory they reside in.
- *
+ *
* @see File
* @see File#list(FilenameFilter)
*/
@@ -28,7 +28,7 @@
/**
* Indicates if a specific filename matches this filter.
- *
+ *
* @param dir
* the directory in which the {@code filename} was found.
* @param filename
diff --git a/luni/src/main/java/java/io/FilterInputStream.java b/luni/src/main/java/java/io/FilterInputStream.java
index 9891cdb..375fff4 100644
--- a/luni/src/main/java/java/io/FilterInputStream.java
+++ b/luni/src/main/java/java/io/FilterInputStream.java
@@ -24,7 +24,7 @@
* decompression of the underlying stream. Input streams that wrap another input
* stream and provide some additional functionality on top of it usually inherit
* from this class.
- *
+ *
* @see FilterOutputStream
*/
public class FilterInputStream extends InputStream {
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code FilterInputStream} with the specified input
* stream as source.
- *
+ *
* @param in
* the non-null InputStream to filter reads on.
*/
@@ -53,7 +53,7 @@
/**
* Closes this stream. This implementation closes the filtered stream.
- *
+ *
* @throws IOException
* if an error occurs while closing this stream.
*/
@@ -85,7 +85,7 @@
* Indicates whether this stream supports {@code mark()} and {@code reset()}.
* This implementation returns whether or not the filtered stream supports
* marking.
- *
+ *
* @return {@code true} if {@code mark()} and {@code reset()} are supported,
* {@code false} otherwise.
* @see #mark(int)
@@ -101,7 +101,7 @@
* Reads a single byte from the filtered stream and returns it as an integer
* in the range from 0 to 255. Returns -1 if the end of this stream has been
* reached.
- *
+ *
* @return the byte read or -1 if the end of the filtered stream has been
* reached.
* @throws IOException
@@ -117,7 +117,7 @@
* {@code buffer}. Returns the number of bytes actually read or -1 if no
* bytes were read and the end of this stream was encountered. This
* implementation reads bytes from the filtered stream.
- *
+ *
* @param buffer
* the byte array in which to store the read bytes.
* @return the number of bytes actually read or -1 if the end of the
@@ -136,7 +136,7 @@
* of bytes actually read or -1 if no bytes have been read and the end of
* this stream has been reached. This implementation reads bytes from the
* filtered stream.
- *
+ *
* @param buffer
* the byte array in which to store the bytes read.
* @param offset
@@ -157,7 +157,7 @@
/**
* Resets this stream to the last marked location. This implementation
* resets the target stream.
- *
+ *
* @throws IOException
* if this stream is already closed, no mark has been set or the
* mark is no longer valid because more than {@code readlimit}
@@ -175,7 +175,7 @@
* {@code read()}'s will not return these bytes unless {@code reset()} is
* used. This implementation skips {@code count} number of bytes in the
* filtered stream.
- *
+ *
* @param count
* the number of bytes to skip.
* @return the number of bytes actually skipped.
diff --git a/luni/src/main/java/java/io/FilterOutputStream.java b/luni/src/main/java/java/io/FilterOutputStream.java
index d3a9585..be11a24 100644
--- a/luni/src/main/java/java/io/FilterOutputStream.java
+++ b/luni/src/main/java/java/io/FilterOutputStream.java
@@ -131,11 +131,11 @@
// Force null buffer check first!
if (offset > buffer.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || length > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
for (int i = 0; i < length; i++) {
// Call write() instead of out.write() since subclasses could
diff --git a/luni/src/main/java/java/io/FilterReader.java b/luni/src/main/java/java/io/FilterReader.java
index e8e06dd..09ace31 100644
--- a/luni/src/main/java/java/io/FilterReader.java
+++ b/luni/src/main/java/java/io/FilterReader.java
@@ -24,7 +24,7 @@
* decompression of the underlying reader. Readers that wrap another reader and
* provide some additional functionality on top of it usually inherit from this
* class.
- *
+ *
* @see FilterWriter
*/
public abstract class FilterReader extends Reader {
@@ -36,7 +36,7 @@
/**
* Constructs a new FilterReader on the Reader {@code in}.
- *
+ *
* @param in
* The non-null Reader to filter reads on.
*/
@@ -47,7 +47,7 @@
/**
* Closes this reader. This implementation closes the filtered reader.
- *
+ *
* @throws IOException
* if an error occurs while closing this reader.
*/
@@ -65,7 +65,7 @@
* position, provided that {@code readlimit} has not been surpassed.
* <p>
* This implementation sets a mark in the filtered reader.
- *
+ *
* @param readlimit
* the number of bytes that can be read from this reader before
* the mark is invalidated.
@@ -84,7 +84,7 @@
/**
* Indicates whether this reader supports {@code mark()} and {@code reset()}.
* This implementation returns whether the filtered reader supports marking.
- *
+ *
* @return {@code true} if {@code mark()} and {@code reset()} are supported
* by the filtered reader, {@code false} otherwise.
* @see #mark(int)
@@ -102,7 +102,7 @@
* Reads a single character from the filtered reader and returns it as an
* integer with the two higher-order bytes set to 0. Returns -1 if the end
* of the filtered reader has been reached.
- *
+ *
* @return The character read or -1 if the end of the filtered reader has
* been reached.
* @throws IOException
@@ -120,7 +120,7 @@
* in the byte array {@code buffer} starting at {@code offset}. Returns the
* number of characters actually read or -1 if no characters were read and
* the end of the filtered reader was encountered.
- *
+ *
* @param buffer
* the char array in which to store the characters read.
* @param offset
@@ -145,7 +145,7 @@
* the result is {@code true}, the next {@code read()} will not block. If
* the result is {@code false}, this reader may or may not block when
* {@code read()} is sent.
- *
+ *
* @return {@code true} if this reader will not block when {@code read()}
* is called, {@code false} if unknown or blocking will occur.
* @throws IOException
@@ -164,7 +164,7 @@
* this reader was not marked, the behavior depends on the implementation of
* {@code reset()} in the Reader subclass that is filtered by this reader.
* The default behavior for Reader is to throw an {@code IOException}.
- *
+ *
* @throws IOException
* if a problem occurred or the filtered reader does not support
* {@code mark()} and {@code reset()}.
@@ -182,7 +182,7 @@
* Skips {@code count} characters in this reader. Subsequent {@code read()}'s
* will not return these characters unless {@code reset()} is used. The
* default implementation is to skip characters in the filtered reader.
- *
+ *
* @param count
* the maximum number of characters to skip.
* @return the number of characters actually skipped.
diff --git a/luni/src/main/java/java/io/Flushable.java b/luni/src/main/java/java/io/Flushable.java
index c36de30..adf2a11 100644
--- a/luni/src/main/java/java/io/Flushable.java
+++ b/luni/src/main/java/java/io/Flushable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/io/IOError.java b/luni/src/main/java/java/io/IOError.java
index d47b93c..244a3fa 100644
--- a/luni/src/main/java/java/io/IOError.java
+++ b/luni/src/main/java/java/io/IOError.java
@@ -19,7 +19,7 @@
/**
* This error is thrown when a severe I/O error has happened.
- *
+ *
* @since 1.6
* @hide
*/
@@ -28,7 +28,7 @@
/**
* Constructs a new instance with its cause filled in.
- *
+ *
* @param cause
* The detail cause for the error.
*/
diff --git a/luni/src/main/java/java/io/InputStream.java b/luni/src/main/java/java/io/InputStream.java
index 6907d20..14f7f65 100644
--- a/luni/src/main/java/java/io/InputStream.java
+++ b/luni/src/main/java/java/io/InputStream.java
@@ -186,11 +186,11 @@
// Force null check for b first!
if (offset > b.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
- }
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ }
if (length < 0 || length > b.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
for (int i = 0; i < length; i++) {
int c;
diff --git a/luni/src/main/java/java/io/InputStreamReader.java b/luni/src/main/java/java/io/InputStreamReader.java
index 07c5901..de08acc 100644
--- a/luni/src/main/java/java/io/InputStreamReader.java
+++ b/luni/src/main/java/java/io/InputStreamReader.java
@@ -64,7 +64,7 @@
this.in = in;
String encoding = AccessController
.doPrivileged(new PriviAction<String>(
- "file.encoding", "ISO8859_1"));
+ "file.encoding", "ISO8859_1"));
decoder = Charset.forName(encoding).newDecoder().onMalformedInput(
CodingErrorAction.REPLACE).onUnmappableCharacter(
CodingErrorAction.REPLACE);
@@ -193,7 +193,7 @@
synchronized (lock) {
if (!isOpen()) {
// K0070=InputStreamReader is closed.
- throw new IOException(Msg.getString("K0070"));
+ throw new IOException(Msg.getString("K0070"));
}
char buf[] = new char[1];
@@ -230,7 +230,7 @@
synchronized (lock) {
if (!isOpen()) {
// K0070=InputStreamReader is closed.
- throw new IOException(Msg.getString("K0070"));
+ throw new IOException(Msg.getString("K0070"));
}
// BEGIN android-changed
// Exception priorities (in case of multiple errors) differ from
@@ -238,10 +238,10 @@
// made implicit null check explicit, used (offset | length) < 0
// instead of (offset < 0) || (length < 0) to safe one operation
if (buf == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | length) < 0 || offset > buf.length - length) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (length == 0) {
@@ -259,7 +259,7 @@
// fill the buffer if needed
if (needInput) {
try {
- if ((in.available() == 0)
+ if ((in.available() == 0)
&& (out.position() > offset)) {
// we could return the result without blocking read
break;
@@ -339,7 +339,7 @@
synchronized (lock) {
if (in == null) {
// K0070=InputStreamReader is closed.
- throw new IOException(Msg.getString("K0070"));
+ throw new IOException(Msg.getString("K0070"));
}
try {
return bytes.hasRemaining() || in.available() > 0;
diff --git a/luni/src/main/java/java/io/InterruptedIOException.java b/luni/src/main/java/java/io/InterruptedIOException.java
index 4d537fc..c5dabb1 100644
--- a/luni/src/main/java/java/io/InterruptedIOException.java
+++ b/luni/src/main/java/java/io/InterruptedIOException.java
@@ -42,7 +42,7 @@
/**
* Constructs a new {@code InterruptedIOException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/InvalidClassException.java b/luni/src/main/java/java/io/InvalidClassException.java
index bd44259..3863f24 100644
--- a/luni/src/main/java/java/io/InvalidClassException.java
+++ b/luni/src/main/java/java/io/InvalidClassException.java
@@ -27,7 +27,7 @@
* deserializing) because the no-arg constructor that needs to be run is not
* visible or fails.</li>
* </ul>
- *
+ *
* @see ObjectInputStream #readObject()
* @see ObjectInputValidation#validateObject()
*/
@@ -43,7 +43,7 @@
/**
* Constructs a new {@code InvalidClassException} with its stack trace and
* detailed message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
@@ -55,7 +55,7 @@
* Constructs a new {@code InvalidClassException} with its stack trace,
* detail message and the fully qualified name of the class which caused the
* exception filled in.
- *
+ *
* @param className
* the name of the class that caused the exception.
* @param detailMessage
@@ -71,7 +71,7 @@
* created. {@code null} is returned if no message was provided at creation
* time. If a detail message as well as a class name are provided, then the
* values are concatenated and returned.
- *
+ *
* @return the detail message, possibly concatenated with the name of the
* class that caused the problem.
*/
@@ -79,7 +79,7 @@
public String getMessage() {
String msg = super.getMessage();
if (classname != null) {
- msg = classname + "; " + msg;
+ msg = classname + "; " + msg;
}
return msg;
}
diff --git a/luni/src/main/java/java/io/InvalidObjectException.java b/luni/src/main/java/java/io/InvalidObjectException.java
index 365209d..433176e 100644
--- a/luni/src/main/java/java/io/InvalidObjectException.java
+++ b/luni/src/main/java/java/io/InvalidObjectException.java
@@ -19,7 +19,7 @@
/**
* Signals that, during deserialization, the validation of an object has failed.
- *
+ *
* @see ObjectInputStream#registerValidation(ObjectInputValidation, int)
* @see ObjectInputValidation#validateObject()
*/
@@ -30,7 +30,7 @@
/**
* Constructs an {@code InvalidObjectException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/LineNumberInputStream.java b/luni/src/main/java/java/io/LineNumberInputStream.java
index 6dac368..2f1c5ed 100644
--- a/luni/src/main/java/java/io/LineNumberInputStream.java
+++ b/luni/src/main/java/java/io/LineNumberInputStream.java
@@ -167,11 +167,11 @@
// Force buffer null check first!
if (offset > buffer.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
- }
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ }
if (length < 0 || length > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
for (int i = 0; i < length; i++) {
diff --git a/luni/src/main/java/java/io/NotActiveException.java b/luni/src/main/java/java/io/NotActiveException.java
index 51f4d3f..63f286c 100644
--- a/luni/src/main/java/java/io/NotActiveException.java
+++ b/luni/src/main/java/java/io/NotActiveException.java
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code NotActiveException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/NotSerializableException.java b/luni/src/main/java/java/io/NotSerializableException.java
index d85586a..3bbe736 100644
--- a/luni/src/main/java/java/io/NotSerializableException.java
+++ b/luni/src/main/java/java/io/NotSerializableException.java
@@ -23,7 +23,7 @@
* does not implement {@code Serializable} or {@code Externalizable}, or if it
* is serializable but it overrides {@code writeObject(ObjectOutputStream)} and
* explicitly prevents serialization by throwing this type of exception.
- *
+ *
* @see ObjectOutput#writeObject(Object)
* @see ObjectOutputStream#writeObject(Object)
*/
@@ -42,7 +42,7 @@
/**
* Constructs a new {@link NotSerializableException} with its stack trace
* and detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/ObjectInput.java b/luni/src/main/java/java/io/ObjectInput.java
index 3b32553..a86a6a4 100644
--- a/luni/src/main/java/java/io/ObjectInput.java
+++ b/luni/src/main/java/java/io/ObjectInput.java
@@ -19,7 +19,7 @@
/**
* Defines an interface for classes that allow reading serialized objects.
- *
+ *
* @see ObjectInputStream
* @see ObjectOutput
*/
@@ -27,7 +27,7 @@
/**
* Indicates the number of bytes of primitive data that can be read without
* blocking.
- *
+ *
* @return the number of bytes available.
* @throws IOException
* if an I/O error occurs.
@@ -37,7 +37,7 @@
/**
* Closes this stream. Implementations of this method should free any
* resources used by the stream.
- *
+ *
* @throws IOException
* if an I/O error occurs while closing the input stream.
*/
@@ -47,7 +47,7 @@
* Reads a single byte from this stream and returns it as an integer in the
* range from 0 to 255. Returns -1 if the end of this stream has been
* reached. Blocks if no input is available.
- *
+ *
* @return the byte read or -1 if the end of this stream has been reached.
* @throws IOException
* if this stream is closed or another I/O error occurs.
@@ -57,7 +57,7 @@
/**
* Reads bytes from this stream into the byte array {@code buffer}. Blocks
* while waiting for input.
- *
+ *
* @param buffer
* the array in which to store the bytes read.
* @return the number of bytes read or -1 if the end of this stream has been
@@ -71,7 +71,7 @@
* Reads at most {@code count} bytes from this stream and stores them in
* byte array {@code buffer} starting at offset {@code count}. Blocks while
* waiting for input.
- *
+ *
* @param buffer
* the array in which to store the bytes read.
* @param offset
@@ -88,9 +88,9 @@
/**
* Reads the next object from this stream.
- *
+ *
* @return the object read.
- *
+ *
* @throws ClassNotFoundException
* if the object's class cannot be found.
* @throws IOException
@@ -102,11 +102,11 @@
* Skips {@code toSkip} bytes on this stream. Less than {@code toSkip} byte are
* skipped if the end of this stream is reached before the operation
* completes.
- *
+ *
* @param toSkip
* the number of bytes to skip.
* @return the number of bytes actually skipped.
- *
+ *
* @throws IOException
* if this stream is closed or another I/O error occurs.
*/
diff --git a/luni/src/main/java/java/io/ObjectInputValidation.java b/luni/src/main/java/java/io/ObjectInputValidation.java
index 3dce15e..925dff3 100644
--- a/luni/src/main/java/java/io/ObjectInputValidation.java
+++ b/luni/src/main/java/java/io/ObjectInputValidation.java
@@ -21,13 +21,13 @@
* A callback interface for post-deserialization checks on objects. Allows, for
* example, the validation of a whole graph of objects after all of them have
* been loaded.
- *
+ *
* @see ObjectInputStream#registerValidation(ObjectInputValidation, int)
*/
public interface ObjectInputValidation {
/**
* Validates this object.
- *
+ *
* @throws InvalidObjectException
* if this object fails to validate itself.
*/
diff --git a/luni/src/main/java/java/io/ObjectOutput.java b/luni/src/main/java/java/io/ObjectOutput.java
index 6680457..e7d92c5 100644
--- a/luni/src/main/java/java/io/ObjectOutput.java
+++ b/luni/src/main/java/java/io/ObjectOutput.java
@@ -19,7 +19,7 @@
/**
* Defines an interface for classes that allow reading serialized objects.
- *
+ *
* @see ObjectOutputStream
* @see ObjectInput
*/
@@ -27,7 +27,7 @@
/**
* Closes the target stream. Implementations of this method should free any
* resources used by the stream.
- *
+ *
* @throws IOException
* if an error occurs while closing the target stream.
*/
@@ -36,7 +36,7 @@
/**
* Flushes the target stream. Implementations of this method should ensure
* that any pending writes are written out to the target stream.
- *
+ *
* @throws IOException
* if an error occurs while flushing the target stream.
*/
@@ -45,7 +45,7 @@
/**
* Writes the entire contents of the byte array {@code buffer} to the output
* stream. Blocks until all bytes are written.
- *
+ *
* @param buffer
* the buffer to write.
* @throws IOException
@@ -57,7 +57,7 @@
* Writes {@code count} bytes from the byte array {@code buffer} starting at
* position {@code offset} to the target stream. Blocks until all bytes are
* written.
- *
+ *
* @param buffer
* the buffer to write.
* @param offset
@@ -74,7 +74,7 @@
* Writes a single byte to the target stream. Only the least significant
* byte of the integer {@code value} is written to the stream. Blocks until
* the byte is actually written.
- *
+ *
* @param value
* the byte to write.
* @throws IOException
@@ -84,7 +84,7 @@
/**
* Writes the specified object {@code obj} to the target stream.
- *
+ *
* @param obj
* the object to write.
* @throws IOException
diff --git a/luni/src/main/java/java/io/ObjectOutputStream.java b/luni/src/main/java/java/io/ObjectOutputStream.java
index eebface..cc081f9 100644
--- a/luni/src/main/java/java/io/ObjectOutputStream.java
+++ b/luni/src/main/java/java/io/ObjectOutputStream.java
@@ -293,7 +293,7 @@
if (implementationClass != thisClass) {
boolean mustCheck = false;
try {
- Method method = implementationClass.getMethod("putFields",
+ Method method = implementationClass.getMethod("putFields",
ObjectStreamClass.EMPTY_CONSTRUCTOR_PARAM_TYPES);
mustCheck = method.getDeclaringClass() != thisClass;
} catch (NoSuchMethodException e) {
@@ -301,7 +301,7 @@
if (!mustCheck) {
try {
Method method = implementationClass.getMethod(
- "writeUnshared",
+ "writeUnshared",
ObjectStreamClass.UNSHARED_PARAM_TYPES);
mustCheck = method.getDeclaringClass() != thisClass;
} catch (NoSuchMethodException e) {
@@ -720,12 +720,12 @@
public void useProtocolVersion(int version) throws IOException {
if (!objectsWritten.isEmpty()) {
// KA028=Cannot set protocol version when stream in use
- throw new IllegalStateException(Msg.getString("KA028"));
+ throw new IllegalStateException(Msg.getString("KA028"));
}
if (version != ObjectStreamConstants.PROTOCOL_VERSION_1
&& version != ObjectStreamConstants.PROTOCOL_VERSION_2) {
// K00b3=Unknown protocol\: {0}
- throw new IllegalArgumentException(Msg.getString("K00b3", version));
+ throw new IllegalArgumentException(Msg.getString("K00b3", version));
}
protocolVersion = version;
}
@@ -1141,7 +1141,7 @@
default:
throw new IOException(
org.apache.harmony.luni.util.Msg.getString(
- "K00d5", fieldDesc.getTypeCode()));
+ "K00d5", fieldDesc.getTypeCode()));
}
} else {
// Object type (array included).
@@ -1370,7 +1370,7 @@
} else {
throw new InvalidClassException(
org.apache.harmony.luni.util.Msg.getString(
- "K00d7", arrayClass.getName()));
+ "K00d7", arrayClass.getName()));
}
} else {
// Array of Objects
diff --git a/luni/src/main/java/java/io/ObjectStreamClass.java b/luni/src/main/java/java/io/ObjectStreamClass.java
index 322e30d..abb8137 100644
--- a/luni/src/main/java/java/io/ObjectStreamClass.java
+++ b/luni/src/main/java/java/io/ObjectStreamClass.java
@@ -53,7 +53,7 @@
private static final long serialVersionUID = -6120832682080437368L;
// Name of the field that contains the SUID value (if present)
- private static final String UID_FIELD_NAME = "serialVersionUID";
+ private static final String UID_FIELD_NAME = "serialVersionUID";
static final long CONSTRUCTOR_IS_NOT_RESOLVED = -1;
@@ -106,18 +106,18 @@
static {
try {
- ARRAY_OF_FIELDS = Class.forName("[Ljava.io.ObjectStreamField;");
+ ARRAY_OF_FIELDS = Class.forName("[Ljava.io.ObjectStreamField;");
} catch (ClassNotFoundException e) {
// This should not happen
throw new AssertionError(e);
}
}
- private static final String CLINIT_NAME = "<clinit>";
+ private static final String CLINIT_NAME = "<clinit>";
private static final int CLINIT_MODIFIERS = Modifier.STATIC;
- private static final String CLINIT_SIGNATURE = "()V";
+ private static final String CLINIT_SIGNATURE = "()V";
// Used to determine if an object is Serializable or Externalizable
private static final Class<Serializable> SERIALIZABLE = Serializable.class;
@@ -292,14 +292,14 @@
} else if (serializable) {
flags |= ObjectStreamConstants.SC_SERIALIZABLE;
}
- result.methodWriteReplace = findMethod(cl, "writeReplace");
- result.methodReadResolve = findMethod(cl, "readResolve");
- result.methodWriteObject = findPrivateMethod(cl, "writeObject",
+ result.methodWriteReplace = findMethod(cl, "writeReplace");
+ result.methodReadResolve = findMethod(cl, "readResolve");
+ result.methodWriteObject = findPrivateMethod(cl, "writeObject",
WRITE_PARAM_TYPES);
- result.methodReadObject = findPrivateMethod(cl, "readObject",
+ result.methodReadObject = findPrivateMethod(cl, "readObject",
READ_PARAM_TYPES);
result.methodReadObjectNoData = findPrivateMethod(cl,
- "readObjectNoData", EMPTY_CONSTRUCTOR_PARAM_TYPES);
+ "readObjectNoData", EMPTY_CONSTRUCTOR_PARAM_TYPES);
if (result.hasMethodWriteObject()) {
flags |= ObjectStreamConstants.SC_WRITE_METHOD;
}
@@ -415,7 +415,7 @@
return field.getLong(null);
} catch (IllegalAccessException iae) {
throw new RuntimeException(Msg.getString(
- "K0071", iae));
+ "K0071", iae));
}
}
}
@@ -424,7 +424,7 @@
MessageDigest digest;
try {
- digest = MessageDigest.getInstance("SHA");
+ digest = MessageDigest.getInstance("SHA");
} catch (NoSuchAlgorithmException e) {
throw new Error(e);
}
@@ -545,7 +545,7 @@
* constructor.getName() returns the constructor name as
* typed, not the VM name
*/
- output.writeUTF("<init>");
+ output.writeUTF("<init>");
output.writeInt(modifiers);
output.writeUTF(descriptorForSignature(
getConstructorSignature(constructor)).replace('/',
@@ -616,7 +616,7 @@
* @return containing the descriptor
*/
private static String descriptorForSignature(String signature) {
- return signature.substring(signature.indexOf("("));
+ return signature.substring(signature.indexOf("("));
}
/**
@@ -631,7 +631,7 @@
*/
static Field fieldSerialPersistentFields(Class<?> cl) {
try {
- Field f = cl.getDeclaredField("serialPersistentFields");
+ Field f = cl.getDeclaredField("serialPersistentFields");
int modifiers = f.getModifiers();
if (Modifier.isStatic(modifiers) && Modifier.isPrivate(modifiers)
&& Modifier.isFinal(modifiers)) {
@@ -955,7 +955,7 @@
/**
* Returns the descriptor for any class, whether or not the class
* implements Serializable or Externalizable.
- *
+ *
* @param cl
* a java.lang.Class for which to obtain the corresponding
* descriptor
@@ -1196,8 +1196,8 @@
*/
@Override
public String toString() {
- return getName() + ": static final long serialVersionUID ="
- + getSerialVersionUID() + "L;";
+ return getName() + ": static final long serialVersionUID ="
+ + getSerialVersionUID() + "L;";
}
static class OSCThreadLocalCache extends ThreadLocalCache {
diff --git a/luni/src/main/java/java/io/ObjectStreamConstants.java b/luni/src/main/java/java/io/ObjectStreamConstants.java
index 33734c5..8228b33 100644
--- a/luni/src/main/java/java/io/ObjectStreamConstants.java
+++ b/luni/src/main/java/java/io/ObjectStreamConstants.java
@@ -137,14 +137,14 @@
* ObjectOutputStream.
*/
public static final SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION = new SerializablePermission(
- "enableSubclassImplementation");
+ "enableSubclassImplementation");
/**
* Permission constant to enable object substitution during serialization
* and deserialization.
*/
public static final SerializablePermission SUBSTITUTION_PERMISSION = new SerializablePermission(
- "enableSubstitution");
+ "enableSubstitution");
// Flags that indicate if the object was serializable, externalizable
// and had a writeObject method when dumped.
diff --git a/luni/src/main/java/java/io/ObjectStreamException.java b/luni/src/main/java/java/io/ObjectStreamException.java
index c3ad7dc..996ee5e 100644
--- a/luni/src/main/java/java/io/ObjectStreamException.java
+++ b/luni/src/main/java/java/io/ObjectStreamException.java
@@ -21,7 +21,7 @@
* Signals some sort of problem during either serialization or deserialization
* of objects. This is actually the superclass of several other, more specific
* exception classes.
- *
+ *
* @see InvalidObjectException
* @see NotActiveException
* @see NotSerializableException
@@ -44,7 +44,7 @@
/**
* Constructs a new {@code ObjectStreamException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/ObjectStreamField.java b/luni/src/main/java/java/io/ObjectStreamField.java
index 1e79011..686ea15 100644
--- a/luni/src/main/java/java/io/ObjectStreamField.java
+++ b/luni/src/main/java/java/io/ObjectStreamField.java
@@ -290,7 +290,7 @@
if (typeString == null) {
Class<?> t = getTypeInternal();
String typeName = t.getName().replace('.', '/');
- String str = (t.isArray()) ? typeName : ("L" + typeName + ';');
+ String str = (t.isArray()) ? typeName : ("L" + typeName + ';');
typeString = str.intern();
}
return typeString;
@@ -381,7 +381,7 @@
public boolean isUnshared() {
return unshared;
}
-
+
void setUnshared(boolean unshared) {
this.unshared = unshared;
}
diff --git a/luni/src/main/java/java/io/OptionalDataException.java b/luni/src/main/java/java/io/OptionalDataException.java
index 39d3d5d..c99c5cc 100644
--- a/luni/src/main/java/java/io/OptionalDataException.java
+++ b/luni/src/main/java/java/io/OptionalDataException.java
@@ -21,7 +21,7 @@
* Signals that the {@link ObjectInputStream} class encountered a primitive type
* ({@code int}, {@code char} etc.) instead of an object instance in the input
* stream.
- *
+ *
* @see ObjectInputStream#available()
* @see ObjectInputStream#readObject()
* @see ObjectInputStream#skipBytes(int)
@@ -52,7 +52,7 @@
/**
* Constructs a new {@code OptionalDataException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/OutputStream.java b/luni/src/main/java/java/io/OutputStream.java
index ca059c2..1897fc9 100644
--- a/luni/src/main/java/java/io/OutputStream.java
+++ b/luni/src/main/java/java/io/OutputStream.java
@@ -112,10 +112,10 @@
// used (offset | count) < 0 instead of (offset < 0) || (count < 0)
// to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
for (int i = offset; i < offset + count; i++) {
diff --git a/luni/src/main/java/java/io/OutputStreamWriter.java b/luni/src/main/java/java/io/OutputStreamWriter.java
index d745870..f0a4625 100644
--- a/luni/src/main/java/java/io/OutputStreamWriter.java
+++ b/luni/src/main/java/java/io/OutputStreamWriter.java
@@ -60,7 +60,7 @@
this.out = out;
String encoding = AccessController
.doPrivileged(new PriviAction<String>(
- "file.encoding", "ISO8859_1"));
+ "file.encoding", "ISO8859_1"));
encoder = Charset.forName(encoding).newEncoder();
encoder.onMalformedInput(CodingErrorAction.REPLACE);
encoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
@@ -182,7 +182,7 @@
private void checkStatus() throws IOException {
if (encoder == null) {
// K005d=Writer is closed.
- throw new IOException(Msg.getString("K005d"));
+ throw new IOException(Msg.getString("K005d"));
}
}
@@ -231,10 +231,10 @@
// used (offset | count) < 0 instead of (offset < 0) || (count < 0)
// to safe one operation
if (buf == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || offset > buf.length - count) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
CharBuffer chars = CharBuffer.wrap(buf, offset, count);
@@ -307,10 +307,10 @@
// made implicit null check explicit, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if (str == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || offset > str.length() - count) {
- throw new StringIndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new StringIndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
checkStatus();
diff --git a/luni/src/main/java/java/io/PipedInputStream.java b/luni/src/main/java/java/io/PipedInputStream.java
index 5095eda..66be979 100644
--- a/luni/src/main/java/java/io/PipedInputStream.java
+++ b/luni/src/main/java/java/io/PipedInputStream.java
@@ -106,7 +106,7 @@
* Constructs a new unconnected {@code PipedInputStream} with the given
* buffer size. The resulting stream must be connected to a
* {@code PipedOutputStream} before data may be read from it.
- *
+ *
* @param pipeSize the size of the buffer in bytes.
* @throws IllegalArgumentException if pipeSize is less than or equal to zero.
* @since 1.6
@@ -123,7 +123,7 @@
* Constructs a new {@code PipedInputStream} connected to the given {@code PipedOutputStream},
* with the given buffer size. Any data written to the output stream can be read from this
* input stream.
- *
+ *
* @param out the {@code PipedOutputStream} to connect to.
* @param pipeSize the size of the buffer in bytes.
* @throws IOException if an I/O error occurs.
@@ -188,7 +188,7 @@
*/
synchronized void establishConnection() throws IOException {
if (isConnected) {
- throw new IOException(Msg.getString("K007a"));
+ throw new IOException(Msg.getString("K007a"));
}
if (buffer == null) { // We may already have allocated the buffer.
buffer = new byte[PipedInputStream.PIPE_SIZE];
@@ -218,18 +218,18 @@
public synchronized int read() throws IOException {
if (!isConnected) {
// K0074=Not connected
- throw new IOException(Msg.getString("K0074"));
+ throw new IOException(Msg.getString("K0074"));
}
if (buffer == null) {
// K0075=InputStream is closed
- throw new IOException(Msg.getString("K0075"));
+ throw new IOException(Msg.getString("K0075"));
}
// BEGIN android-removed
// eagerly throwing prevents checking isClosed and returning normally
// if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
// // KA030=Write end dead
- // throw new IOException(Msg.getString("KA030"));
+ // throw new IOException(Msg.getString("KA030"));
// }
// END android-removed
@@ -248,7 +248,7 @@
}
if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
// K0076=Pipe broken
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
// Notify callers of receive()
notifyAll();
@@ -312,7 +312,7 @@
throws IOException {
// BEGIN android-changed
if (bytes == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// Exception priorities (in case of multiple errors) differ from
@@ -320,7 +320,7 @@
// removed redundant check, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if ((offset | count) < 0 || count > bytes.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
@@ -330,19 +330,19 @@
if (!isConnected) {
// K0074=Not connected
- throw new IOException(Msg.getString("K0074"));
+ throw new IOException(Msg.getString("K0074"));
}
if (buffer == null) {
// K0075=InputStream is closed
- throw new IOException(Msg.getString("K0075"));
+ throw new IOException(Msg.getString("K0075"));
}
// BEGIN android-removed
// eagerly throwing prevents checking isClosed and returning normally
// if (lastWriter != null && !lastWriter.isAlive() && (in < 0)) {
// // KA030=Write end dead
- // throw new IOException(Msg.getString("KA030"));
+ // throw new IOException(Msg.getString("KA030"));
// }
// END android-removed
@@ -361,7 +361,7 @@
}
if ((attempts-- <= 0) && lastWriter != null && !lastWriter.isAlive()) {
// K0076=Pipe broken
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
// Notify callers of receive()
notifyAll();
@@ -432,12 +432,12 @@
*/
protected synchronized void receive(int oneByte) throws IOException {
if (buffer == null || isClosed) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
// BEGIN android-removed
// eagerly throwing causes us to fail even if the buffer's not full
// if (lastReader != null && !lastReader.isAlive()) {
- // throw new IOException(Msg.getString("K0076"));
+ // throw new IOException(Msg.getString("K0076"));
// }
// END android-removed
/**
@@ -451,7 +451,7 @@
// BEGIN android-changed
// moved has-last-reader-died check to be before wait()
if (lastReader != null && !lastReader.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
notifyAll();
wait(1000);
@@ -461,7 +461,7 @@
throw new InterruptedIOException();
}
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
if (in == -1) {
in = 0;
diff --git a/luni/src/main/java/java/io/PipedOutputStream.java b/luni/src/main/java/java/io/PipedOutputStream.java
index 97b3e0c..31a8c88 100644
--- a/luni/src/main/java/java/io/PipedOutputStream.java
+++ b/luni/src/main/java/java/io/PipedOutputStream.java
@@ -95,10 +95,10 @@
}
synchronized (stream) {
if (this.dest != null) {
- throw new IOException(Msg.getString("K0079"));
+ throw new IOException(Msg.getString("K0079"));
}
if (stream.isConnected) {
- throw new IOException(Msg.getString("K007a"));
+ throw new IOException(Msg.getString("K007a"));
}
stream.establishConnection();
this.dest = stream;
@@ -182,7 +182,7 @@
PipedInputStream stream = dest;
if (stream == null) {
// K007b=Pipe Not Connected
- throw new IOException(Msg.getString("K007b"));
+ throw new IOException(Msg.getString("K007b"));
}
stream.receive(oneByte);
}
diff --git a/luni/src/main/java/java/io/PipedReader.java b/luni/src/main/java/java/io/PipedReader.java
index 9227e7d..5214507 100644
--- a/luni/src/main/java/java/io/PipedReader.java
+++ b/luni/src/main/java/java/io/PipedReader.java
@@ -106,7 +106,7 @@
* Constructs a new unconnected {@code PipedReader} with the given buffer size.
* The resulting reader must be connected to a {@code PipedWriter} before
* data may be read from it.
- *
+ *
* @param pipeSize the size of the buffer in chars.
* @throws IllegalArgumentException if pipeSize is less than or equal to zero.
* @since 1.6
@@ -123,7 +123,7 @@
* Constructs a new {@code PipedReader} connected to the given {@code PipedWriter},
* with the given buffer size. Any data written to the writer can be read from
* this reader.
- *
+ *
* @param out the {@code PipedWriter} to connect to.
* @param pipeSize the size of the buffer in chars.
* @throws IOException if an I/O error occurs
@@ -172,7 +172,7 @@
*/
synchronized void establishConnection() throws IOException {
if (isConnected) {
- throw new IOException(Msg.getString("K007a"));
+ throw new IOException(Msg.getString("K007a"));
}
if (buffer == null) { // We may already have allocated the buffer.
buffer = new char[PIPE_SIZE];
@@ -236,10 +236,10 @@
@Override
public synchronized int read(char[] buffer, int offset, int count) throws IOException {
if (!isConnected) {
- throw new IOException(Msg.getString("K007b"));
+ throw new IOException(Msg.getString("K007b"));
}
if (this.buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
// avoid int overflow
// BEGIN android-changed
@@ -249,10 +249,10 @@
// used (offset | count) < 0 instead of (offset < 0) || (count < 0)
// to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (count == 0) {
@@ -272,7 +272,7 @@
return -1;
}
if (!first && lastWriter != null && !lastWriter.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
first = false;
// Notify callers of receive()
@@ -340,10 +340,10 @@
@Override
public synchronized boolean ready() throws IOException {
if (!isConnected) {
- throw new IOException(Msg.getString("K007b"));
+ throw new IOException(Msg.getString("K007b"));
}
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
return in != -1;
}
@@ -364,10 +364,10 @@
*/
synchronized void receive(char oneChar) throws IOException {
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
if (lastReader != null && !lastReader.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
/*
* Set the last thread to be writing on this PipedWriter. If
@@ -382,14 +382,14 @@
wait(1000);
// END android-changed
if (lastReader != null && !lastReader.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
}
} catch (InterruptedException e) {
throw new InterruptedIOException();
}
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
if (in == -1) {
in = 0;
@@ -420,16 +420,16 @@
*/
synchronized void receive(char[] chars, int offset, int count) throws IOException {
if (chars == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > chars.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
if (lastReader != null && !lastReader.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
/**
* Set the last thread to be writing on this PipedWriter. If
@@ -445,14 +445,14 @@
wait(1000);
// END android-changed
if (lastReader != null && !lastReader.isAlive()) {
- throw new IOException(Msg.getString("K0076"));
+ throw new IOException(Msg.getString("K0076"));
}
}
} catch (InterruptedException e) {
throw new InterruptedIOException();
}
if (buffer == null) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
if (in == -1) {
in = 0;
diff --git a/luni/src/main/java/java/io/PipedWriter.java b/luni/src/main/java/java/io/PipedWriter.java
index 4ee24fd..a61f9c5 100644
--- a/luni/src/main/java/java/io/PipedWriter.java
+++ b/luni/src/main/java/java/io/PipedWriter.java
@@ -99,10 +99,10 @@
}
synchronized (reader) {
if (this.dest != null) {
- throw new IOException(Msg.getString("K0079"));
+ throw new IOException(Msg.getString("K0079"));
}
if (reader.isConnected) {
- throw new IOException(Msg.getString("K0078"));
+ throw new IOException(Msg.getString("K0078"));
}
reader.establishConnection();
this.lock = reader;
@@ -165,7 +165,7 @@
PipedReader reader = dest;
if (reader == null) {
// K007b=Pipe Not Connected
- throw new IOException(Msg.getString("K007b"));
+ throw new IOException(Msg.getString("K007b"));
}
reader.receive(buffer, offset, count);
}
@@ -195,7 +195,7 @@
PipedReader reader = dest;
if (reader == null) {
// K007b=Pipe Not Connected
- throw new IOException(Msg.getString("K007b"));
+ throw new IOException(Msg.getString("K007b"));
}
reader.receive((char) c);
}
diff --git a/luni/src/main/java/java/io/PrintStream.java b/luni/src/main/java/java/io/PrintStream.java
index 71bedd1..8115db9 100644
--- a/luni/src/main/java/java/io/PrintStream.java
+++ b/luni/src/main/java/java/io/PrintStream.java
@@ -38,7 +38,7 @@
public class PrintStream extends FilterOutputStream implements Appendable,
Closeable {
- private static final String TOKEN_NULL = "null";
+ private static final String TOKEN_NULL = "null";
/**
* indicates whether or not this PrintStream has incurred an error.
@@ -54,7 +54,7 @@
private String encoding;
private final String lineSeparator = AccessController
- .doPrivileged(new PriviAction<String>("line.separator"));
+ .doPrivileged(new PriviAction<String>("line.separator"));
// private Formatter formatter;
@@ -328,7 +328,7 @@
*/
public PrintStream format(Locale l, String format, Object... args) {
if (format == null) {
- throw new NullPointerException(Msg.getString("K0351"));
+ throw new NullPointerException(Msg.getString("K0351"));
}
new Formatter(this, l).format(format, args);
return this;
@@ -487,7 +487,7 @@
return;
}
if (str == null) {
- print("null");
+ print("null");
return;
}
@@ -668,11 +668,11 @@
// Force buffer null check first!
if (offset > buffer.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || length > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
synchronized (this) {
if (out == null) {
@@ -712,7 +712,7 @@
out.write(oneByte);
int b = oneByte & 0xFF;
// 0x0A is ASCII newline, 0x15 is EBCDIC newline.
- boolean isNewline = b == 0x0A || b == 0x15;
+ boolean isNewline = b == 0x0A || b == 0x15;
if (autoflush && isNewline) {
flush();
}
diff --git a/luni/src/main/java/java/io/PrintWriter.java b/luni/src/main/java/java/io/PrintWriter.java
index 0f5f97e..bb4d9e6 100644
--- a/luni/src/main/java/java/io/PrintWriter.java
+++ b/luni/src/main/java/java/io/PrintWriter.java
@@ -50,7 +50,7 @@
private boolean autoflush;
private final String lineSeparator = AccessController
- .doPrivileged(new PriviAction<String>("line.separator"));
+ .doPrivileged(new PriviAction<String>("line.separator"));
/**
* Constructs a new {@code PrintWriter} with {@code out} as its target
@@ -324,7 +324,7 @@
*/
public PrintWriter format(Locale l, String format, Object... args) {
if (format == null) {
- throw new NullPointerException(Msg.getString("K0351"));
+ throw new NullPointerException(Msg.getString("K0351"));
}
new Formatter(this, l).format(format, args);
if (autoflush) {
diff --git a/luni/src/main/java/java/io/PushbackInputStream.java b/luni/src/main/java/java/io/PushbackInputStream.java
index 4a99b6d..a1e2995 100644
--- a/luni/src/main/java/java/io/PushbackInputStream.java
+++ b/luni/src/main/java/java/io/PushbackInputStream.java
@@ -67,7 +67,7 @@
public PushbackInputStream(InputStream in, int size) {
super(in);
if (size <= 0) {
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
buf = (in == null) ? null : new byte[size];
pos = size;
@@ -168,16 +168,16 @@
public int read(byte[] buffer, int offset, int length) throws IOException {
if (buf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
// Force buffer null check first!
if (offset > buffer.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || length > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
int copiedBytes = 0, copyLength = 0, newOffset = offset;
@@ -218,7 +218,7 @@
@Override
public long skip(long count) throws IOException {
if (in == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (count <= 0) {
return 0;
@@ -284,19 +284,19 @@
throws IOException {
if (length > pos) {
// K007e=Pushback buffer full
- throw new IOException(Msg.getString("K007e"));
+ throw new IOException(Msg.getString("K007e"));
}
if (offset > buffer.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || length > buffer.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
if (buf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
System.arraycopy(buffer, offset, buf, pos - length, length);
@@ -323,7 +323,7 @@
throw new IOException();
}
if (pos == 0) {
- throw new IOException(Msg.getString("K007e"));
+ throw new IOException(Msg.getString("K007e"));
}
buf[--pos] = (byte) oneByte;
}
diff --git a/luni/src/main/java/java/io/PushbackReader.java b/luni/src/main/java/java/io/PushbackReader.java
index be83dcd..9a8fd13 100644
--- a/luni/src/main/java/java/io/PushbackReader.java
+++ b/luni/src/main/java/java/io/PushbackReader.java
@@ -67,7 +67,7 @@
public PushbackReader(Reader in, int size) {
super(in);
if (size <= 0) {
- throw new IllegalArgumentException(Msg.getString("K0058"));
+ throw new IllegalArgumentException(Msg.getString("K0058"));
}
buf = new char[size];
pos = size;
@@ -101,7 +101,7 @@
*/
@Override
public void mark(int readAheadLimit) throws IOException {
- throw new IOException(Msg.getString("K007f"));
+ throw new IOException(Msg.getString("K007f"));
}
/**
@@ -136,7 +136,7 @@
public int read() throws IOException {
synchronized (lock) {
if (buf == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
/* Is there a pushback character available? */
if (pos < buf.length) {
@@ -179,7 +179,7 @@
public int read(char[] buffer, int offset, int count) throws IOException {
synchronized (lock) {
if (null == buf) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
// avoid int overflow
// BEGIN android-changed
@@ -188,10 +188,10 @@
// made implicit null check explicit, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || offset > buffer.length - count) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
@@ -240,7 +240,7 @@
public boolean ready() throws IOException {
synchronized (lock) {
if (buf == null) {
- throw new IOException(Msg.getString("K0080"));
+ throw new IOException(Msg.getString("K0080"));
}
return (buf.length - pos > 0 || in.ready());
}
@@ -256,7 +256,7 @@
*/
@Override
public void reset() throws IOException {
- throw new IOException(Msg.getString("K007f"));
+ throw new IOException(Msg.getString("K007f"));
}
/**
@@ -315,20 +315,20 @@
synchronized (lock) {
if (buf == null) {
// K0059=Stream is closed
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (length > pos) {
// K007e=Pushback buffer full
- throw new IOException(Msg.getString("K007e"));
+ throw new IOException(Msg.getString("K007e"));
}
// Force buffer null check first!
if (offset > buffer.length - length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
for (int i = offset + length - 1; i >= offset; i--) {
@@ -354,10 +354,10 @@
public void unread(int oneChar) throws IOException {
synchronized (lock) {
if (buf == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (pos == 0) {
- throw new IOException(Msg.getString("K007e"));
+ throw new IOException(Msg.getString("K007e"));
}
buf[--pos] = (char) oneChar;
}
@@ -382,7 +382,7 @@
}
synchronized (lock) {
if (buf == null) {
- throw new IOException(Msg.getString("K0059"));
+ throw new IOException(Msg.getString("K0059"));
}
if (count == 0) {
return 0;
diff --git a/luni/src/main/java/java/io/RandomAccessFile.java b/luni/src/main/java/java/io/RandomAccessFile.java
index 484b428..d852f26 100644
--- a/luni/src/main/java/java/io/RandomAccessFile.java
+++ b/luni/src/main/java/java/io/RandomAccessFile.java
@@ -110,23 +110,23 @@
fd = new FileDescriptor();
- if (mode.equals("r")) {
+ if (mode.equals("r")) {
isReadOnly = true;
fd.readOnly = true;
options = IFileSystem.O_RDONLY;
- } else if (mode.equals("rw") || mode.equals("rws") || mode.equals("rwd")) {
+ } else if (mode.equals("rw") || mode.equals("rws") || mode.equals("rwd")) {
isReadOnly = false;
options = IFileSystem.O_RDWR;
- if (mode.equals("rws")) {
+ if (mode.equals("rws")) {
// Sync file and metadata with every write
syncMetadata = true;
- } else if (mode.equals("rwd")) {
+ } else if (mode.equals("rwd")) {
// Sync file, but not necessarily metadata
options = IFileSystem.O_RDWRSYNC;
}
} else {
- throw new IllegalArgumentException(Msg.getString("K0081"));
+ throw new IllegalArgumentException(Msg.getString("K0081"));
}
SecurityManager security = System.getSecurityManager();
@@ -338,10 +338,10 @@
// made implicit null check explicit, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (0 == count) {
@@ -486,7 +486,7 @@
public final void readFully(byte[] buffer, int offset, int count)
throws IOException {
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// avoid int overflow
// BEGIN android-changed
@@ -495,7 +495,7 @@
// removed redundant check, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if ((offset | count) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
while (count > 0) {
@@ -678,7 +678,7 @@
public final String readUTF() throws IOException {
int utfSize = readUnsignedShort();
if (utfSize == 0) {
- return "";
+ return "";
}
byte[] buf = new byte[utfSize];
if (read(buf, 0, buf.length) != buf.length) {
@@ -703,7 +703,7 @@
public void seek(long pos) throws IOException {
if (pos < 0) {
// seek position is negative
- throw new IOException(Msg.getString("K0347"));
+ throw new IOException(Msg.getString("K0347"));
}
openCheck();
fileSystem.seek(fd.descriptor, pos, IFileSystem.SEEK_SET);
@@ -803,10 +803,10 @@
// removed redundant check, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to save one operation
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > buffer.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (count == 0) {
@@ -1048,7 +1048,7 @@
}
}
if (utfCount > 65535) {
- throw new UTFDataFormatException(Msg.getString("K0068"));
+ throw new UTFDataFormatException(Msg.getString("K0068"));
}
byte utfBytes[] = new byte[utfCount + 2];
int utfIndex = 2;
diff --git a/luni/src/main/java/java/io/SequenceInputStream.java b/luni/src/main/java/java/io/SequenceInputStream.java
index f350cc6..c98138d 100644
--- a/luni/src/main/java/java/io/SequenceInputStream.java
+++ b/luni/src/main/java/java/io/SequenceInputStream.java
@@ -190,7 +190,7 @@
}
// BEGIN android-changed
if (buffer == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// avoid int overflow
// Exception priorities (in case of multiple errors) differ from
@@ -198,7 +198,7 @@
// used (offset | count) < 0 instead of (offset < 0) || (count < 0)
// to safe one operation
if ((offset | count) < 0 || offset > buffer.length - count) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
while (in != null) {
diff --git a/luni/src/main/java/java/io/SerializablePermission.java b/luni/src/main/java/java/io/SerializablePermission.java
index 8e385f0..57d4421 100644
--- a/luni/src/main/java/java/io/SerializablePermission.java
+++ b/luni/src/main/java/java/io/SerializablePermission.java
@@ -33,7 +33,7 @@
* <td>Object substitution is allowed.</td>
* </tr>
* </table>
- *
+ *
* @see ObjectStreamConstants
*/
public final class SerializablePermission extends BasicPermission {
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code SerializablePermission} with the specified name.
- *
+ *
* @param permissionName
* the name of the new permission.
*/
@@ -56,7 +56,7 @@
/**
* Constructs a new {@code SerializablePermission} with the specified name.
* The action list is ignored.
- *
+ *
* @param name
* the name of the new permission.
* @param actions
diff --git a/luni/src/main/java/java/io/StreamCorruptedException.java b/luni/src/main/java/java/io/StreamCorruptedException.java
index 9d25727..a92b1bb 100644
--- a/luni/src/main/java/java/io/StreamCorruptedException.java
+++ b/luni/src/main/java/java/io/StreamCorruptedException.java
@@ -22,7 +22,7 @@
* read an object due to missing information (for example, a cyclic reference
* that doesn't match a previous instance, or a missing class descriptor for the
* object to be loaded).
- *
+ *
* @see ObjectInputStream
* @see OptionalDataException
*/
@@ -41,7 +41,7 @@
/**
* Constructs a new {@code StreamCorruptedException} with its stack trace
* and detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/StreamTokenizer.java b/luni/src/main/java/java/io/StreamTokenizer.java
index e5c00c5..7735b13 100644
--- a/luni/src/main/java/java/io/StreamTokenizer.java
+++ b/luni/src/main/java/java/io/StreamTokenizer.java
@@ -154,7 +154,7 @@
* Constructs a new {@code StreamTokenizer} with {@code is} as source input
* stream. This constructor is deprecated; instead, the constructor that
* takes a {@code Reader} as an arugment should be used.
- *
+ *
* @param is
* the source stream from which to parse tokens.
* @throws NullPointerException
@@ -185,7 +185,7 @@
* tokens.</li>
* <li>C-style and C++-style comments are not recognized.</LI>
* </ul>
- *
+ *
* @param r
* the source reader from which to parse tokens.
*/
@@ -200,7 +200,7 @@
/**
* Specifies that the character {@code ch} shall be treated as a comment
* character.
- *
+ *
* @param ch
* the character to be considered a comment character.
*/
@@ -213,7 +213,7 @@
/**
* Specifies whether the end of a line is significant and should be returned
* as {@code TT_EOF} in {@code ttype} by this tokenizer.
- *
+ *
* @param flag
* {@code true} if EOL is significant, {@code false} otherwise.
*/
@@ -223,7 +223,7 @@
/**
* Returns the current line number.
- *
+ *
* @return this tokenizer's current line number.
*/
public int lineno() {
@@ -233,7 +233,7 @@
/**
* Specifies whether word tokens should be converted to lower case when they
* are stored in {@code sval}.
- *
+ *
* @param flag
* {@code true} if {@code sval} should be converted to lower
* case, {@code false} otherwise.
@@ -246,7 +246,7 @@
* Parses the next token from this tokenizer's source stream or reader. The
* type of the token is stored in the {@code ttype} field, additional
* information may be stored in the {@code nval} or {@code sval} fields.
- *
+ *
* @return the value of {@code ttype}.
* @throws IOException
* if an I/O error occurs while parsing the next token.
@@ -481,7 +481,7 @@
* character by this tokenizer. That is, it has no special meaning as a
* comment character, word component, white space, string delimiter or
* number.
- *
+ *
* @param ch
* the character to be considered an ordinary character.
*/
@@ -496,7 +496,7 @@
* shall be treated as an ordinary character by this tokenizer. That is,
* they have no special meaning as a comment character, word component,
* white space, string delimiter or number.
- *
+ *
* @param low
* the first character in the range of ordinary characters.
* @param hi
@@ -536,7 +536,7 @@
/**
* Specifies that the character {@code ch} shall be treated as a quote
* character.
- *
+ *
* @param ch
* the character to be considered a quote character.
*/
@@ -566,7 +566,7 @@
/**
* Specifies whether "slash-slash" (C++-style) comments shall be recognized.
* This kind of comment ends at the end of the line.
- *
+ *
* @param flag
* {@code true} if {@code //} should be recognized as the start
* of a comment, {@code false} otherwise.
@@ -579,7 +579,7 @@
* Specifies whether "slash-star" (C-style) comments shall be recognized.
* Slash-star comments cannot be nested and end when a star-slash
* combination is found.
- *
+ *
* @param flag
* {@code true} if {@code /*} should be recognized as the start
* of a comment, {@code false} otherwise.
@@ -590,23 +590,23 @@
/**
* Returns the state of this tokenizer in a readable format.
- *
+ *
* @return the current state of this tokenizer.
*/
@Override
public String toString() {
// Values determined through experimentation
StringBuilder result = new StringBuilder();
- result.append("Token[");
+ result.append("Token[");
switch (ttype) {
case TT_EOF:
- result.append("EOF");
+ result.append("EOF");
break;
case TT_EOL:
- result.append("EOL");
+ result.append("EOL");
break;
case TT_NUMBER:
- result.append("n=");
+ result.append("n=");
result.append(nval);
break;
case TT_WORD:
@@ -621,7 +621,7 @@
result.append('\'');
}
}
- result.append("], line ");
+ result.append("], line ");
result.append(lineNumber);
return result.toString();
}
@@ -629,7 +629,7 @@
/**
* Specifies that the characters in the range from {@code low} to {@code hi}
* shall be treated as whitespace characters by this tokenizer.
- *
+ *
* @param low
* the first character in the range of whitespace characters.
* @param hi
@@ -651,7 +651,7 @@
* Specifies that the characters in the range from {@code low} to {@code hi}
* shall be treated as word characters by this tokenizer. A word consists of
* a word character followed by zero or more word or number characters.
- *
+ *
* @param low
* the first character in the range of word characters.
* @param hi
diff --git a/luni/src/main/java/java/io/StringBufferInputStream.java b/luni/src/main/java/java/io/StringBufferInputStream.java
index 4dca486..167c61d 100644
--- a/luni/src/main/java/java/io/StringBufferInputStream.java
+++ b/luni/src/main/java/java/io/StringBufferInputStream.java
@@ -110,16 +110,16 @@
}
if (b == null) {
// K0047=buffer is null
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
// avoid int overflow
if (offset < 0 || offset > b.length) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || length > b.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
if (length == 0) {
diff --git a/luni/src/main/java/java/io/StringReader.java b/luni/src/main/java/java/io/StringReader.java
index 62a4ac2..b4e7064 100644
--- a/luni/src/main/java/java/io/StringReader.java
+++ b/luni/src/main/java/java/io/StringReader.java
@@ -89,7 +89,7 @@
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
markpos = pos;
}
@@ -120,7 +120,7 @@
public int read() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
if (pos != count) {
return str.charAt(pos++);
@@ -158,15 +158,15 @@
synchronized (lock) {
if (isClosed()) {
// K0083=StringReader is closed.
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
if (offset < 0 || offset > buf.length) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (len < 0 || len > buf.length - offset) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", len));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", len));
}
if (len == 0) {
return 0;
@@ -196,7 +196,7 @@
public boolean ready() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
return true;
}
@@ -217,7 +217,7 @@
public void reset() throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
pos = markpos != -1 ? markpos : 0;
}
@@ -247,7 +247,7 @@
public long skip(long ns) throws IOException {
synchronized (lock) {
if (isClosed()) {
- throw new IOException(Msg.getString("K0083"));
+ throw new IOException(Msg.getString("K0083"));
}
int minSkip = -pos;
diff --git a/luni/src/main/java/java/io/StringWriter.java b/luni/src/main/java/java/io/StringWriter.java
index 45ae188..62d6b51 100644
--- a/luni/src/main/java/java/io/StringWriter.java
+++ b/luni/src/main/java/java/io/StringWriter.java
@@ -126,10 +126,10 @@
// removed redundant check, added null check, used (offset | count) < 0
// instead of (offset < 0) || (count < 0) to safe one operation
if (cbuf == null) {
- throw new NullPointerException(Msg.getString("K0047"));
+ throw new NullPointerException(Msg.getString("K0047"));
}
if ((offset | count) < 0 || count > cbuf.length - offset) {
- throw new IndexOutOfBoundsException(Msg.getString("K002f"));
+ throw new IndexOutOfBoundsException(Msg.getString("K002f"));
}
// END android-changed
if (count == 0) {
diff --git a/luni/src/main/java/java/io/SyncFailedException.java b/luni/src/main/java/java/io/SyncFailedException.java
index c4f7340..2422414 100644
--- a/luni/src/main/java/java/io/SyncFailedException.java
+++ b/luni/src/main/java/java/io/SyncFailedException.java
@@ -28,7 +28,7 @@
/**
* Constructs a new {@code SyncFailedException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/UTFDataFormatException.java b/luni/src/main/java/java/io/UTFDataFormatException.java
index 215e3e2..9fb7518 100644
--- a/luni/src/main/java/java/io/UTFDataFormatException.java
+++ b/luni/src/main/java/java/io/UTFDataFormatException.java
@@ -20,7 +20,7 @@
/**
* Signals that an incorrectly encoded UTF-8 string has been encountered, most
* likely while reading some {@link DataInputStream}.
- *
+ *
* @see DataInputStream#readUTF()
*/
public class UTFDataFormatException extends IOException {
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code UTFDataFormatException} with its stack trace and
* detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/UnsupportedEncodingException.java b/luni/src/main/java/java/io/UnsupportedEncodingException.java
index eca6c81..dea0947 100644
--- a/luni/src/main/java/java/io/UnsupportedEncodingException.java
+++ b/luni/src/main/java/java/io/UnsupportedEncodingException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code UnsupportedEncodingException} with its stack
* trace and detail message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/io/WriteAbortedException.java b/luni/src/main/java/java/io/WriteAbortedException.java
index bb42f13..2fe202f 100644
--- a/luni/src/main/java/java/io/WriteAbortedException.java
+++ b/luni/src/main/java/java/io/WriteAbortedException.java
@@ -24,7 +24,7 @@
* of the original object. It is a way to "propagate" an exception from the code
* that attempted to write the object to the code that is attempting to read the
* object.
- *
+ *
* @see ObjectInputStream#readObject()
*/
public class WriteAbortedException extends ObjectStreamException {
@@ -41,7 +41,7 @@
* Constructs a new {@code WriteAbortedException} with its stack trace,
* detail message and the exception which caused the underlying problem when
* serializing the object filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
* @param rootCause
@@ -57,21 +57,21 @@
* Gets the extra information message which was provided when this exception
* was created. Returns {@code null} if no message was provided at creation
* time.
- *
+ *
* @return the exception message.
*/
@Override
public String getMessage() {
String msg = super.getMessage();
if (detail != null) {
- msg = msg + "; " + detail.toString();
+ msg = msg + "; " + detail.toString();
}
return msg;
}
/**
* Gets the cause of this exception or {@code null} if there is no cause.
- *
+ *
* @return the exception cause.
*/
@Override
diff --git a/luni/src/main/java/java/io/Writer.java b/luni/src/main/java/java/io/Writer.java
index de553ac..b0210e0 100644
--- a/luni/src/main/java/java/io/Writer.java
+++ b/luni/src/main/java/java/io/Writer.java
@@ -36,7 +36,7 @@
*/
public abstract class Writer implements Appendable, Closeable, Flushable {
- static final String TOKEN_NULL = "null";
+ static final String TOKEN_NULL = "null";
/**
* The object used to synchronize access to the writer.
diff --git a/luni/src/main/java/java/lang/AbstractStringBuilder.java b/luni/src/main/java/java/lang/AbstractStringBuilder.java
index 3f1186d..9e759bf 100644
--- a/luni/src/main/java/java/lang/AbstractStringBuilder.java
+++ b/luni/src/main/java/java/lang/AbstractStringBuilder.java
@@ -64,7 +64,7 @@
val = new char[0];
}
if (val.length < len) {
- throw new InvalidObjectException(Msg.getString("K0199"));
+ throw new InvalidObjectException(Msg.getString("K0199"));
}
shared = false;
@@ -124,11 +124,11 @@
// Force null check of chars first!
if (offset > chars.length || offset < 0) {
// K002e=Offset out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
}
if (length < 0 || chars.length - offset < length) {
// K0031=Length out of bounds \: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
}
int newSize = count + length;
@@ -164,7 +164,7 @@
final void append0(CharSequence s, int start, int end) {
if (s == null) {
- s = "null";
+ s = "null";
}
if (start < 0 || end < 0 || start > end || end > s.length()) {
throw new IndexOutOfBoundsException();
@@ -191,7 +191,7 @@
value[j++] = s.charAt(i);
}
}
-
+
this.count = newSize;
// END android-changed
}
@@ -340,9 +340,9 @@
}
return;
}
- throw new StringIndexOutOfBoundsException("offset " + start
- + ", length " + length
- + ", char[].length " + chars.length);
+ throw new StringIndexOutOfBoundsException("offset " + start
+ + ", length " + length
+ + ", char[].length " + chars.length);
}
throw new StringIndexOutOfBoundsException(index);
}
@@ -360,7 +360,7 @@
final void insert0(int index, String string) {
if (0 <= index && index <= count) {
if (string == null) {
- string = "null";
+ string = "null";
}
int min = string.length();
if (min != 0) {
@@ -377,7 +377,7 @@
final void insert0(int index, CharSequence s, int start, int end) {
if (s == null) {
- s = "null";
+ s = "null";
}
if (index < 0 || index > count || start < 0 || end < 0 || start > end
|| end > s.length()) {
@@ -608,7 +608,7 @@
public String substring(int start) {
if (0 <= start && start <= count) {
if (start == count) {
- return "";
+ return "";
}
// Remove String sharing for more performance
@@ -633,7 +633,7 @@
public String substring(int start, int end) {
if (0 <= start && start <= end && end <= count) {
if (start == end) {
- return "";
+ return "";
}
// Remove String sharing for more performance
@@ -650,7 +650,7 @@
@Override
public String toString() {
if (count == 0) {
- return "";
+ return "";
}
// Optimize String sharing for more performance
int wasted = value.length - count;
diff --git a/luni/src/main/java/java/lang/Appendable.java b/luni/src/main/java/java/lang/Appendable.java
index ca4b532..780f8c1 100644
--- a/luni/src/main/java/java/lang/Appendable.java
+++ b/luni/src/main/java/java/lang/Appendable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
/**
* Appends the specified character.
- *
+ *
* @param c
* the character to append.
* @return this {@code Appendable}.
@@ -67,7 +67,7 @@
* to calling {@code append(csq.subSequence(start, end))}.
* <p>
* If {@code csq} is {@code null}, the characters "null" are appended.
- *
+ *
* @param csq
* the character sequence to append.
* @param start
diff --git a/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java b/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
index b91db5c..d318a32 100644
--- a/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
+++ b/luni/src/main/java/java/lang/ArrayIndexOutOfBoundsException.java
@@ -39,13 +39,13 @@
* Constructs a new {@code ArrayIndexOutOfBoundsException} with the current
* stack trace and a detail message that is based on the specified invalid
* {@code index}.
- *
+ *
* @param index
* the invalid index.
*/
public ArrayIndexOutOfBoundsException(int index) {
// K0052=Array index out of range\: {0}
- super(Msg.getString("K0052", index));
+ super(Msg.getString("K0052", index));
}
/**
diff --git a/luni/src/main/java/java/lang/AssertionError.java b/luni/src/main/java/java/lang/AssertionError.java
index e4d4ed0..d74f158 100644
--- a/luni/src/main/java/java/lang/AssertionError.java
+++ b/luni/src/main/java/java/lang/AssertionError.java
@@ -38,7 +38,7 @@
* {@link String#valueOf(Object)} with the specified object. If the object
* is an instance of {@link Throwable}, then it also becomes the cause of
* this error.
- *
+ *
* @param detailMessage
* the object to be converted into the detail message and
* optionally the cause.
@@ -52,7 +52,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(boolean)} with the specified boolean value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
@@ -63,7 +63,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(char)} with the specified character value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
@@ -74,7 +74,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(int)} with the specified integer value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
@@ -85,7 +85,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(long)} with the specified long value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
@@ -96,7 +96,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(float)} with the specified float value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
@@ -107,7 +107,7 @@
/**
* Constructs a new {@code AssertionError} with a message based on calling
* {@link String#valueOf(double)} with the specified double value.
- *
+ *
* @param detailMessage
* the value to be converted into the message.
*/
diff --git a/luni/src/main/java/java/lang/Boolean.java b/luni/src/main/java/java/lang/Boolean.java
index 9866e87..8b1cc7a 100644
--- a/luni/src/main/java/java/lang/Boolean.java
+++ b/luni/src/main/java/java/lang/Boolean.java
@@ -176,7 +176,7 @@
* @since 1.5
*/
public static boolean parseBoolean(String s) {
- return "true".equalsIgnoreCase(s);
+ return "true".equalsIgnoreCase(s);
}
/**
diff --git a/luni/src/main/java/java/lang/CaseMapper.java b/luni/src/main/java/java/lang/CaseMapper.java
index f2f5ac8..ce508df 100644
--- a/luni/src/main/java/java/lang/CaseMapper.java
+++ b/luni/src/main/java/java/lang/CaseMapper.java
@@ -1,12 +1,12 @@
/*
* Copyright (C) 2010 The Android Open Source Project
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,11 +25,11 @@
class CaseMapper {
private static final char[] upperValues = "SS\u0000\u02bcN\u0000J\u030c\u0000\u0399\u0308\u0301\u03a5\u0308\u0301\u0535\u0552\u0000H\u0331\u0000T\u0308\u0000W\u030a\u0000Y\u030a\u0000A\u02be\u0000\u03a5\u0313\u0000\u03a5\u0313\u0300\u03a5\u0313\u0301\u03a5\u0313\u0342\u1f08\u0399\u0000\u1f09\u0399\u0000\u1f0a\u0399\u0000\u1f0b\u0399\u0000\u1f0c\u0399\u0000\u1f0d\u0399\u0000\u1f0e\u0399\u0000\u1f0f\u0399\u0000\u1f08\u0399\u0000\u1f09\u0399\u0000\u1f0a\u0399\u0000\u1f0b\u0399\u0000\u1f0c\u0399\u0000\u1f0d\u0399\u0000\u1f0e\u0399\u0000\u1f0f\u0399\u0000\u1f28\u0399\u0000\u1f29\u0399\u0000\u1f2a\u0399\u0000\u1f2b\u0399\u0000\u1f2c\u0399\u0000\u1f2d\u0399\u0000\u1f2e\u0399\u0000\u1f2f\u0399\u0000\u1f28\u0399\u0000\u1f29\u0399\u0000\u1f2a\u0399\u0000\u1f2b\u0399\u0000\u1f2c\u0399\u0000\u1f2d\u0399\u0000\u1f2e\u0399\u0000\u1f2f\u0399\u0000\u1f68\u0399\u0000\u1f69\u0399\u0000\u1f6a\u0399\u0000\u1f6b\u0399\u0000\u1f6c\u0399\u0000\u1f6d\u0399\u0000\u1f6e\u0399\u0000\u1f6f\u0399\u0000\u1f68\u0399\u0000\u1f69\u0399\u0000\u1f6a\u0399\u0000\u1f6b\u0399\u0000\u1f6c\u0399\u0000\u1f6d\u0399\u0000\u1f6e\u0399\u0000\u1f6f\u0399\u0000\u1fba\u0399\u0000\u0391\u0399\u0000\u0386\u0399\u0000\u0391\u0342\u0000\u0391\u0342\u0399\u0391\u0399\u0000\u1fca\u0399\u0000\u0397\u0399\u0000\u0389\u0399\u0000\u0397\u0342\u0000\u0397\u0342\u0399\u0397\u0399\u0000\u0399\u0308\u0300\u0399\u0308\u0301\u0399\u0342\u0000\u0399\u0308\u0342\u03a5\u0308\u0300\u03a5\u0308\u0301\u03a1\u0313\u0000\u03a5\u0342\u0000\u03a5\u0308\u0342\u1ffa\u0399\u0000\u03a9\u0399\u0000\u038f\u0399\u0000\u03a9\u0342\u0000\u03a9\u0342\u0399\u03a9\u0399\u0000FF\u0000FI\u0000FL\u0000FFIFFLST\u0000ST\u0000\u0544\u0546\u0000\u0544\u0535\u0000\u0544\u053b\u0000\u054e\u0546\u0000\u0544\u053d\u0000".toCharArray();
private static final char[] upperValues2 = "\u000b\u0000\f\u0000\r\u0000\u000e\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>\u0000\u0000?@A\u0000BC\u0000\u0000\u0000\u0000D\u0000\u0000\u0000\u0000\u0000EFG\u0000HI\u0000\u0000\u0000\u0000J\u0000\u0000\u0000\u0000\u0000KL\u0000\u0000MN\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000OPQ\u0000RS\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000TUV\u0000WX\u0000\u0000\u0000\u0000Y".toCharArray();
-
+
private static final char LATIN_CAPITAL_I_WITH_DOT = '\u0130';
private static final char GREEK_CAPITAL_SIGMA = '\u03a3';
private static final char GREEK_SMALL_FINAL_SIGMA = '\u03c2';
-
+
/**
* Our current GC makes short-lived objects more expensive than we'd like. When that's fixed,
* this class should be changed so that you instantiate it with the String and its value,
@@ -37,7 +37,7 @@
*/
private CaseMapper() {
}
-
+
/**
* Implements String.toLowerCase. We need 's' so that we can return the original String instance
* if nothing changes. We need 'value', 'offset', and 'count' because they're not otherwise
@@ -49,7 +49,7 @@
if (languageCode.equals("tr") || languageCode.equals("az") || languageCode.equals("lt")) {
return UCharacter.toLowerCase(s, locale.toString());
}
-
+
char[] newValue = null;
int newCount = 0;
for (int i = offset, end = offset + count; i < end; ++i) {
@@ -74,15 +74,15 @@
}
return newValue != null ? new String(0, newCount, newValue) : s;
}
-
+
private static boolean followedBy(char[] value, int offset, int count, int index, char ch) {
return index + 1 < offset + count && value[index + 1] == ch;
}
-
+
private static boolean precededBy(char[] value, int offset, int count, int index, char ch) {
return index > offset && value[index - 1] == ch;
}
-
+
/**
* True if 'index' is preceded by a sequence consisting of a cased letter and a case-ignorable
* sequence, and 'index' is not followed by a sequence consisting of an ignorable sequence and
@@ -107,7 +107,7 @@
}
return true;
}
-
+
/**
* Return the index of the specified character into the upperValues table.
* The upperValues table contains three entries at each position. These
@@ -146,13 +146,13 @@
}
return index;
}
-
+
public static String toUpperCase(Locale locale, String s, char[] value, int offset, int count) {
String languageCode = locale.getLanguage();
if (languageCode.equals("tr") || languageCode.equals("az") || languageCode.equals("lt")) {
return UCharacter.toUpperCase(s, locale.toString());
}
-
+
char[] output = null;
int i = 0;
for (int o = offset, end = offset + count; o < end; o++) {
@@ -190,7 +190,7 @@
System.arraycopy(output, 0, newoutput, 0, output.length);
output = newoutput;
}
-
+
char val = upperValues[target];
output[i++] = val;
val = upperValues[target + 1];
diff --git a/luni/src/main/java/java/lang/Character.java b/luni/src/main/java/java/lang/Character.java
index 37410fd..7d41c45 100644
--- a/luni/src/main/java/java/lang/Character.java
+++ b/luni/src/main/java/java/lang/Character.java
@@ -50,7 +50,7 @@
* On the Java platform a {@code char} value represents either a single BMP code
* point or a UTF-16 unit that's part of a surrogate pair. The {@code int} type
* is used to represent all Unicode code points.
- *
+ *
* <a name="unicode_categories"><h3>Unicode categories</h3></a>
* <p>Here's a list of the Unicode character categories and the corresponding Java constant,
* grouped semantically to provide a convenient overview. This table is also useful in
@@ -98,7 +98,7 @@
* <tr> <td> Zp </td> <td> Paragraph separator </td> <td>{@link #PARAGRAPH_SEPARATOR}</td> </tr>
* </table>
* </span>
- *
+ *
* @since 1.0
*/
public final class Character implements Serializable, Comparable<Character> {
diff --git a/luni/src/main/java/java/lang/Class.java b/luni/src/main/java/java/lang/Class.java
index 35e47bc..5eed529 100644
--- a/luni/src/main/java/java/lang/Class.java
+++ b/luni/src/main/java/java/lang/Class.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -69,7 +69,7 @@
* called "reflection". There are basically three types of {@code Class}
* instances: those representing real classes and interfaces, those representing
* primitive types, and those representing array classes.
- *
+ *
* <h4>Class instances representing object types (classes or interfaces)</h4>
* <p>
* These represent an ordinary class or interface as found in the class
@@ -132,7 +132,7 @@
* reference
*/
private transient volatile SoftReference<ClassCache<T>> cacheRef;
-
+
private Class() {
// Prevent this class to be instantiated, instance
// should be created by JVM only
@@ -165,8 +165,8 @@
* If the class has not been loaded so far, it is being loaded and linked
* first. This is done through either the class loader of the calling class
* or one of its parent class loaders. The class is also being initialized,
- * which means that a possible static initializer block is executed.
- *
+ * which means that a possible static initializer block is executed.
+ *
* @param className
* the name of the non-primitive-type class to find.
* @return the named {@code Class} instance.
@@ -193,8 +193,8 @@
* first. This is done through either the specified class loader or one of
* its parent class loaders. The caller can also request the class to be
* initialized, which means that a possible static initializer block is
- * executed.
- *
+ * executed.
+ *
* @param className
* the name of the non-primitive-type class to find.
* @param initializeBoolean
@@ -212,7 +212,7 @@
*/
public static Class<?> forName(String className, boolean initializeBoolean,
ClassLoader classLoader) throws ClassNotFoundException {
-
+
if (classLoader == null) {
SecurityManager smgr = System.getSecurityManager();
if (smgr != null) {
@@ -221,7 +221,7 @@
smgr.checkPermission(new RuntimePermission("getClassLoader"));
}
}
-
+
classLoader = ClassLoader.getSystemClassLoader();
}
// Catch an Exception thrown by the underlying native code. It wraps
@@ -235,7 +235,7 @@
result = classForName(className, initializeBoolean,
classLoader);
} catch (ClassNotFoundException e) {
- Throwable cause = e.getCause();
+ Throwable cause = e.getCause();
if (cause instanceof ExceptionInInitializerError) {
throw (ExceptionInInitializerError) cause;
}
@@ -256,14 +256,14 @@
*/
static native Class<?> classForName(String className, boolean initializeBoolean,
ClassLoader classLoader) throws ClassNotFoundException;
-
+
/**
* Returns an array containing {@code Class} objects for all public classes
* and interfaces that are members of this class. This includes public
* members inherited from super classes and interfaces. If there are no such
* class members or if this object represents a primitive type then an array
* of length 0 is returned.
- *
+ *
* @return the public class members of the class represented by this object.
* @throws SecurityException
* if a security manager exists and it does not allow member
@@ -281,7 +281,7 @@
/**
* Returns the annotation of the given type. If there is no such annotation
* then the method returns {@code null}.
- *
+ *
* @param annotationClass
* the annotation type.
* @return the annotation of the given type, or {@code null} if there is no
@@ -295,16 +295,16 @@
return (A)list[i];
}
}
-
+
return null;
}
/**
* Returns all the annotations of this class. If there are no annotations
* then an empty array is returned.
- *
+ *
* @return a copy of the array containing this class' annotations.
- * @see #getDeclaredAnnotations()
+ * @see #getDeclaredAnnotations()
*/
public Annotation[] getAnnotations() {
/*
@@ -345,7 +345,7 @@
* Returns the canonical name of this class. If this class does not have a
* canonical name as defined in the Java Language Specification, then the
* method returns {@code null}.
- *
+ *
* @return this class' canonical name, or {@code null} if it does not have a
* canonical name.
*/
@@ -356,16 +356,16 @@
if (isArray()) {
/*
* The canonical name of an array type depends on the (existence of)
- * the component type's canonical name.
+ * the component type's canonical name.
*/
String name = getComponentType().getCanonicalName();
if (name != null) {
return name + "[]";
- }
+ }
} else if (isMemberClass()) {
/*
* The canonical name of an inner class depends on the (existence
- * of) the declaring class' canonical name.
+ * of) the declaring class' canonical name.
*/
String name = getDeclaringClass().getCanonicalName();
if (name != null) {
@@ -374,11 +374,11 @@
} else {
/*
* The canonical name of a top-level class or primitive type is
- * equal to the fully qualified name.
+ * equal to the fully qualified name.
*/
return getName();
}
-
+
/*
* Other classes don't have a canonical name.
*/
@@ -391,7 +391,7 @@
* classes that were loaded by the bootstrap class loader. The Android
* reference implementation, though, returns a reference to an actual
* representation of the bootstrap class loader.
- *
+ *
* @return the class loader for the represented class.
* @throws SecurityException
* if a security manager exists and it does not allow accessing
@@ -408,15 +408,15 @@
smgr.checkPermission(new RuntimePermission("getClassLoader"));
}
}
-
+
if (this.isPrimitive()) {
return null;
}
-
+
if (loader == null) {
loader = BootClassLoader.getInstance();
}
-
+
return loader;
}
@@ -428,7 +428,7 @@
* this Class without doing any security checks. The bootstrap ClassLoader
* is returned, unlike getClassLoader() which returns null in place of the
* bootstrap ClassLoader.
- *
+ *
* @return the ClassLoader
* @see ClassLoader#isSystemClassLoader()
*/
@@ -439,18 +439,18 @@
/*
* Returns the defining class loader for the given class.
- *
+ *
* @param clazz the class the class loader of which we want
* @return the class loader
*/
private static native ClassLoader getClassLoader(Class<?> clazz);
-
+
/**
* Returns a {@code Class} object which represents the component type if
* this class represents an array type. Returns {@code null} if this class
* does not represent an array type. The component type of an array type is
* the type of the elements of the array.
- *
+ *
* @return the component type of this class.
*/
public native Class<?> getComponentType();
@@ -458,7 +458,7 @@
/**
* Returns a {@code Constructor} object which represents the public
* constructor matching the specified parameter types.
- *
+ *
* @param parameterTypes
* the parameter types of the requested constructor.
* {@code (Class[]) null} is equivalent to the empty array.
@@ -482,7 +482,7 @@
* constructors for the class represented by this {@code Class}. If there
* are no public constructors or if this {@code Class} represents an array
* class, a primitive type or void then an empty array is returned.
- *
+ *
* @return an array with the public constructors of the class represented by
* this {@code Class}.
* @throws SecurityException
@@ -504,7 +504,7 @@
* represented by this {@code Class}. Annotations that are inherited are not
* included in the result. If there are no annotations at all, an empty
* array is returned.
- *
+ *
* @return a copy of the array containing the annotations defined for the
* class that this {@code Class} represents.
* @see #getAnnotations()
@@ -517,7 +517,7 @@
* Class} represents. If there are no classes or interfaces declared or if
* this class represents an array class, a primitive type or void, then an
* empty array is returned.
- *
+ *
* @return an array with {@code Class} objects for all the classes and
* interfaces that are used in member declarations.
* @throws SecurityException
@@ -537,13 +537,13 @@
* Returns the list of member classes without performing any security checks
* first. This includes the member classes inherited from superclasses. If no
* member classes exist at all, an empty array is returned.
- *
+ *
* @param publicOnly reflects whether we want only public members or all of them
* @return the list of classes
*/
private Class<?>[] getFullListOfClasses(boolean publicOnly) {
Class<?>[] result = getDeclaredClasses(this, publicOnly);
-
+
// Traverse all superclasses
Class<?> clazz = this.getSuperclass();
while (clazz != null) {
@@ -551,29 +551,29 @@
if (temp.length != 0) {
result = arraycopy(new Class[result.length + temp.length], result, temp);
}
-
+
clazz = clazz.getSuperclass();
}
-
+
return result;
}
/*
* Returns the list of member classes of the given class. No security checks
* are performed. If no members exist, an empty array is returned.
- *
+ *
* @param clazz the class the members of which we want
* @param publicOnly reflects whether we want only public member or all of them
* @return the class' class members
*/
native private static Class<?>[] getDeclaredClasses(Class<?> clazz,
boolean publicOnly);
-
+
/**
* Returns a {@code Constructor} object which represents the constructor
* matching the specified parameter types that is declared by the class
* represented by this {@code Class}.
- *
+ *
* @param parameterTypes
* the parameter types of the requested constructor.
* {@code (Class[]) null} is equivalent to the empty array.
@@ -597,10 +597,10 @@
* constructors declared in the class represented by this {@code Class}. If
* there are no constructors or if this {@code Class} represents an array
* class, a primitive type or void then an empty array is returned.
- *
+ *
* @return an array with the constructors declared in the class represented
* by this {@code Class}.
- *
+ *
* @throws SecurityException
* if a security manager exists and it does not allow member
* access.
@@ -627,7 +627,7 @@
/*
* Finds a constructor with a given signature.
- *
+ *
* @param list the list of constructors to search through
* @param parameterTypes the formal parameter list
* @return the matching constructor
@@ -641,7 +641,7 @@
return list[i];
}
}
-
+
// BEGIN android-changed
StringBuilder sb = new StringBuilder();
sb.append(getSimpleName());
@@ -660,11 +660,11 @@
throw new NoSuchMethodException(sb.toString());
// END android-changed
}
-
+
/**
* Returns a {@code Field} object for the field with the specified name
* which is declared in the class represented by this {@code Class}.
- *
+ *
* @param name
* the name of the requested field.
* @return the requested field in the class represented by this class.
@@ -694,7 +694,7 @@
* in the class represented by this {@code Class}. If there are no fields or
* if this {@code Class} represents an array class, a primitive type or void
* then an empty array is returned.
- *
+ *
* @return an array with the fields declared in the class represented by
* this class.
* @throws SecurityException
@@ -709,14 +709,14 @@
Field[] fields = getClassCache().getDeclaredFields();
return ClassCache.deepCopy(fields);
}
-
+
/*
* Returns the list of fields without performing any security checks
* first. If no fields exist at all, an empty array is returned.
- *
+ *
* @param clazz the class of interest
* @param publicOnly reflects whether we want only public fields or all of them
- * @return the list of fields
+ * @return the list of fields
*/
static native Field[] getDeclaredFields(Class<?> clazz, boolean publicOnly);
@@ -724,7 +724,7 @@
* Returns a {@code Method} object which represents the method matching the
* specified name and parameter types that is declared by the class
* represented by this {@code Class}.
- *
+ *
* @param name
* the requested method's name.
* @param parameterTypes
@@ -753,13 +753,13 @@
*/
return REFLECT.clone(method);
}
-
+
/**
* Returns an array containing {@code Method} objects for all methods
* declared in the class represented by this {@code Class}. If there are no
* methods or if this {@code Class} represents an array class, a primitive
* type or void then an empty array is returned.
- *
+ *
* @return an array with the methods declared in the class represented by
* this {@code Class}.
* @throws SecurityException
@@ -774,7 +774,7 @@
Method[] methods = getClassCache().getDeclaredMethods();
return ClassCache.deepCopy(methods);
}
-
+
/**
* Returns the list of methods without performing any security checks
* first. If no methods exist, an empty array is returned.
@@ -809,7 +809,7 @@
* Returns the declaring {@code Class} of this {@code Class}. Returns
* {@code null} if the class is not a member of another class or if this
* {@code Class} represents an array class, a primitive type or void.
- *
+ *
* @return the declaring {@code Class} or {@code null}.
*/
native public Class<?> getDeclaringClass();
@@ -817,7 +817,7 @@
/**
* Returns the enclosing {@code Class} of this {@code Class}. If there is no
* enclosing class the method returns {@code null}.
- *
+ *
* @return the enclosing {@code Class} or {@code null}.
*/
native public Class<?> getEnclosingClass();
@@ -825,7 +825,7 @@
/**
* Gets the enclosing {@code Constructor} of this {@code Class}, if it is an
* anonymous or local/automatic class; otherwise {@code null}.
- *
+ *
* @return the enclosing {@code Constructor} instance or {@code null}.
*/
native public Constructor<?> getEnclosingConstructor();
@@ -833,7 +833,7 @@
/**
* Gets the enclosing {@code Method} of this {@code Class}, if it is an
* anonymous or local/automatic class; otherwise {@code null}.
- *
+ *
* @return the enclosing {@code Method} instance or {@code null}.
*/
native public Method getEnclosingMethod();
@@ -842,7 +842,7 @@
* Gets the {@code enum} constants associated with this {@code Class}.
* Returns {@code null} if this {@code Class} does not represent an {@code
* enum} type.
- *
+ *
* @return an array with the {@code enum} constants or {@code null}.
*/
@SuppressWarnings("unchecked")
@@ -854,16 +854,16 @@
// Copy the private (to the package) array.
return (T[]) values.clone();
}
-
+
return null;
}
-
+
/**
* Returns a {@code Field} object which represents the public field with the
* specified name. This method first searches the class C represented by
* this {@code Class}, then the interfaces implemented by C and finally the
* superclasses of C.
- *
+ *
* @param name
* the name of the requested field.
* @return the public field specified by {@code name}.
@@ -896,7 +896,7 @@
* If there are no public fields or if this class represents an array class,
* a primitive type or {@code void} then an empty array is returned.
* </p>
- *
+ *
* @return an array with the public fields of the class represented by this
* {@code Class}.
* @throws SecurityException
@@ -916,7 +916,7 @@
* Gets the {@link Type}s of the interfaces that this {@code Class} directly
* implements. If the {@code Class} represents a primitive type or {@code
* void} then an empty array is returned.
- *
+ *
* @return an array of {@link Type} instances directly implemented by the
* class represented by this {@code class}.
*/
@@ -926,11 +926,11 @@
parser.parseForClass(this, getSignatureAttribute());
return Types.getClonedTypeArray(parser.interfaceTypes);
}
-
+
/**
* Gets the {@code Type} that represents the superclass of this {@code
* class}.
- *
+ *
* @return an instance of {@code Type} representing the superclass.
*/
public Type getGenericSuperclass() {
@@ -946,7 +946,7 @@
* by this {@code Class}. The order of the elements in the array is
* identical to the order in the original class declaration. If the class
* does not implement any interfaces, an empty array is returned.
- *
+ *
* @return an array with the interfaces of the class represented by this
* class.
*/
@@ -963,7 +963,7 @@
* class C represented by this {@code Class}, then the superclasses of C and
* finally the interfaces implemented by C and finally the superclasses of C
* for a method with matching name.
- *
+ *
* @param name
* the requested method's name.
* @param parameterTypes
@@ -977,7 +977,7 @@
* access.
* @see #getDeclaredMethod(String, Class...)
*/
- public Method getMethod(String name, Class... parameterTypes) throws NoSuchMethodException,
+ public Method getMethod(String name, Class... parameterTypes) throws NoSuchMethodException,
SecurityException {
checkPublicMemberAccess();
@@ -1000,7 +1000,7 @@
* If there are no public methods or if this {@code Class} represents a
* primitive type or {@code void} then an empty array is returned.
* </p>
- *
+ *
* @return an array with the methods of the class represented by this
* {@code Class}.
* @throws SecurityException
@@ -1015,11 +1015,11 @@
Method[] methods = getClassCache().getAllPublicMethods();
return ClassCache.deepCopy(methods);
}
-
+
/**
* Performs the security checks regarding the access of a public
* member of this {@code Class}.
- *
+ *
* <p><b>Note:</b> Because of the {@code getCallingClassLoader2()}
* check, this method must be called exactly one level deep into a
* public method on this instance.</p>
@@ -1032,7 +1032,7 @@
ClassLoader calling = VMStack.getCallingClassLoader2();
ClassLoader current = getClassLoader();
-
+
if (calling != null && !calling.isAncestorOf(current)) {
smgr.checkPackageAccess(this.getPackage().getName());
}
@@ -1042,7 +1042,7 @@
/**
* Performs the security checks regarding the access of a declared
* member of this {@code Class}.
- *
+ *
* <p><b>Note:</b> Because of the {@code getCallingClassLoader2()}
* check, this method must be called exactly one level deep into a
* public method on this instance.</p>
@@ -1051,7 +1051,7 @@
SecurityManager smgr = System.getSecurityManager();
if (smgr != null) {
smgr.checkMemberAccess(this, Member.DECLARED);
-
+
ClassLoader calling = VMStack.getCallingClassLoader2();
ClassLoader current = getClassLoader();
@@ -1060,12 +1060,12 @@
}
}
}
-
+
/**
* Returns an integer that represents the modifiers of the class represented
* by this {@code Class}. The returned value is a combination of bits
* defined by constants in the {@link Modifier} class.
- *
+ *
* @return the modifiers of the class represented by this {@code Class}.
*/
public int getModifiers() {
@@ -1074,18 +1074,18 @@
/*
* Return the modifiers for the given class.
- *
+ *
* @param clazz the class of interest
* @ignoreInnerClassesAttrib determines whether we look for and use the
* flags from an "inner class" attribute
*/
private static native int getModifiers(Class<?> clazz, boolean ignoreInnerClassesAttrib);
-
+
/**
* Returns the name of the class represented by this {@code Class}. For a
* description of the format which is used, see the class definition of
* {@link Class}.
- *
+ *
* @return the name of the class represented by this {@code Class}.
*/
public native String getName();
@@ -1096,16 +1096,16 @@
* anonymous) then an empty string is returned. If the receiver is an array
* then the name of the underlying type with square braces appended (for
* example {@code "Integer[]"}) is returned.
- *
+ *
* @return the simple name of the class represented by this {@code Class}.
*/
public String getSimpleName() {
if (isArray()) {
return getComponentType().getSimpleName() + "[]";
}
-
+
String name = getName();
-
+
if (isAnonymousClass()) {
return "";
}
@@ -1113,22 +1113,22 @@
if (isMemberClass() || isLocalClass()) {
return getInnerClassName();
}
-
+
int dot = name.lastIndexOf('.');
if (dot != -1) {
return name.substring(dot + 1);
}
-
+
return name;
}
/*
- * Returns the simple name of a member or local class, or null otherwise.
- *
+ * Returns the simple name of a member or local class, or null otherwise.
+ *
* @return The name.
*/
private native String getInnerClassName();
-
+
/**
* Returns the {@code ProtectionDomain} of the class represented by this
* class.
@@ -1139,7 +1139,7 @@
* always given full permissions (that is, AllPermission). This can not be
* changed through the {@link java.security.Policy} class.
* </p>
- *
+ *
* @return the {@code ProtectionDomain} of the class represented by this
* class.
* @throws SecurityException
@@ -1152,7 +1152,7 @@
// Security check is independent of calling class loader.
smgr.checkPermission(new RuntimePermission("getProtectionDomain"));
}
-
+
return pd;
}
@@ -1160,7 +1160,7 @@
* Returns the URL of the resource specified by {@code resName}. The mapping
* between the resource name and the URL is managed by the class' class
* loader.
- *
+ *
* @param resName
* the name of the resource.
* @return the requested resource's {@code URL} object or {@code null} if
@@ -1179,10 +1179,10 @@
} else {
pkg = "";
}
-
+
resName = pkg + "/" + resName;
}
-
+
// Delegate to proper class loader
ClassLoader loader = getClassLoader();
if (loader != null) {
@@ -1196,13 +1196,13 @@
* Returns a read-only stream for the contents of the resource specified by
* {@code resName}. The mapping between the resource name and the stream is
* managed by the class' class loader.
- *
+ *
* @param resName
* the name of the resource.
* @return a stream for the requested resource or {@code null} if no
* resource with the specified name can be found.
* @see ClassLoader
- */
+ */
public InputStream getResourceAsStream(String resName) {
// Get absolute resource name, but without the leading slash
if (resName.startsWith("/")) {
@@ -1215,10 +1215,10 @@
} else {
pkg = "";
}
-
+
resName = pkg + "/" + resName;
}
-
+
// Delegate to proper class loader
ClassLoader loader = getClassLoader();
if (loader != null) {
@@ -1233,7 +1233,7 @@
* All classes from any given dex file will have the same signers, but different dex
* files may have different signers. This does not fit well with the original
* {@code ClassLoader}-based model of {@code getSigners}.)
- *
+ *
* @return null.
*/
public Object[] getSigners() {
@@ -1247,7 +1247,7 @@
* the {@code Object} class, a primitive type, an interface or void then the
* method returns {@code null}. If this {@code Class} represents an array
* class then the {@code Object} class is returned.
- *
+ *
* @return the superclass of the class represented by this {@code Class}.
*/
public native Class<? super T> getSuperclass();
@@ -1256,7 +1256,7 @@
* Returns an array containing {@code TypeVariable} objects for type
* variables declared by the generic class represented by this {@code
* Class}. Returns an empty array if the class is not generic.
- *
+ *
* @return an array with the type variables of the class represented by this
* class.
*/
@@ -1270,7 +1270,7 @@
/**
* Indicates whether this {@code Class} represents an annotation class.
- *
+ *
* @return {@code true} if this {@code Class} represents an annotation
* class; {@code false} otherwise.
*/
@@ -1283,7 +1283,7 @@
/**
* Indicates whether the specified annotation is present for the class
* represented by this {@code Class}.
- *
+ *
* @param annotationClass
* the annotation to look for.
* @return {@code true} if the class represented by this {@code Class} is
@@ -1296,7 +1296,7 @@
/**
* Indicates whether the class represented by this {@code Class} is
* anonymously declared.
- *
+ *
* @return {@code true} if the class represented by this {@code Class} is
* anonymous; {@code false} otherwise.
*/
@@ -1305,7 +1305,7 @@
/**
* Indicates whether the class represented by this {@code Class} is an array
* class.
- *
+ *
* @return {@code true} if the class represented by this {@code Class} is an
* array class; {@code false} otherwise.
*/
@@ -1319,7 +1319,7 @@
* conversion or a widening reference conversion (if either the receiver or
* the argument represent primitive types, only the identity conversion
* applies).
- *
+ *
* @param cls
* the class to check.
* @return {@code true} if {@code cls} can be converted to the class
@@ -1332,7 +1332,7 @@
/**
* Indicates whether the class represented by this {@code Class} is an
* {@code enum}.
- *
+ *
* @return {@code true} if the class represented by this {@code Class} is an
* {@code enum}; {@code false} otherwise.
*/
@@ -1344,7 +1344,7 @@
* Indicates whether the specified object can be cast to the class
* represented by this {@code Class}. This is the runtime version of the
* {@code instanceof} operator.
- *
+ *
* @param object
* the object to check.
* @return {@code true} if {@code object} can be cast to the type
@@ -1355,7 +1355,7 @@
/**
* Indicates whether this {@code Class} represents an interface.
- *
+ *
* @return {@code true} if this {@code Class} represents an interface;
* {@code false} otherwise.
*/
@@ -1364,7 +1364,7 @@
/**
* Indicates whether the class represented by this {@code Class} is defined
* locally.
- *
+ *
* @return {@code true} if the class represented by this {@code Class} is
* defined locally; {@code false} otherwise.
*/
@@ -1377,7 +1377,7 @@
/**
* Indicates whether the class represented by this {@code Class} is a member
* class.
- *
+ *
* @return {@code true} if the class represented by this {@code Class} is a
* member class; {@code false} otherwise.
*/
@@ -1387,7 +1387,7 @@
/**
* Indicates whether this {@code Class} represents a primitive type.
- *
+ *
* @return {@code true} if this {@code Class} represents a primitive type;
* {@code false} otherwise.
*/
@@ -1395,7 +1395,7 @@
/**
* Indicates whether this {@code Class} represents a synthetic type.
- *
+ *
* @return {@code true} if this {@code Class} represents a synthetic type;
* {@code false} otherwise.
*/
@@ -1413,7 +1413,7 @@
* constructor), an {@code InstantiationException} is thrown. If the default
* constructor exists but is not accessible from the context where this
* method is invoked, an {@code IllegalAccessException} is thrown.
- *
+ *
* @return a new instance of the class represented by this {@code Class}.
* @throws IllegalAccessException
* if the default constructor is not visible.
@@ -1424,7 +1424,7 @@
* new instances.
*/
public T newInstance() throws InstantiationException, IllegalAccessException {
- checkPublicMemberAccess();
+ checkPublicMemberAccess();
return newInstanceImpl();
}
@@ -1444,7 +1444,7 @@
* Returns the {@code Package} of which the class represented by this
* {@code Class} is a member. Returns {@code null} if no {@code Package}
* object was created by the class loader of the class.
- *
+ *
* @return Package the {@code Package} of which this {@code Class} is a
* member or {@code null}.
*/
@@ -1456,7 +1456,7 @@
int dot = name.lastIndexOf('.');
return (dot != -1 ? ClassLoader.getPackage(loader, name.substring(0, dot)) : null);
}
-
+
return null;
}
@@ -1464,7 +1464,7 @@
* Returns the assertion status for the class represented by this {@code
* Class}. Assertion is enabled / disabled based on the class loader,
* package or class default at runtime.
- *
+ *
* @return the assertion status for the class represented by this {@code
* Class}.
*/
@@ -1474,7 +1474,7 @@
* Casts this {@code Class} to represent a subclass of the specified class.
* If successful, this {@code Class} is returned; otherwise a {@code
* ClassCastException} is thrown.
- *
+ *
* @param clazz
* the required type.
* @return this {@code Class} cast as a subclass of the given type.
@@ -1492,7 +1492,7 @@
/**
* Casts the specified object to the type represented by this {@code Class}.
* If the object is {@code null} then the result is also {@code null}.
- *
+ *
* @param obj
* the object to cast.
* @return the object that has been cast.
@@ -1504,7 +1504,7 @@
if (obj == null) {
return null;
} else if (this.isInstance(obj)) {
- return (T)obj;
+ return (T)obj;
}
throw new ClassCastException();
}
@@ -1512,22 +1512,22 @@
/**
* Set the "accessible" flag of the given object, without doing any
* access checks.
- *
+ *
* <p><b>Note:</b> This method is implemented in native code, and,
* as such, is less efficient than using {@link ClassCache#REFLECT}
* to achieve the same goal. This method exists solely to help
* bootstrap the reflection bridge.</p>
- *
+ *
* @param ao non-null; the object to modify
* @param flag the new value for the accessible flag
*/
/*package*/ static native void setAccessibleNoCheck(AccessibleObject ao,
boolean flag);
-
+
/**
* Copies two arrays into one. Assumes that the destination array is large
- * enough.
- *
+ * enough.
+ *
* @param result the destination array
* @param head the first source array
* @param tail the second source array
@@ -1538,7 +1538,7 @@
System.arraycopy(tail, 0, result, head.length, tail.length);
return result;
}
-
+
/**
* This must be provided by the vm vendor, as it is used by other provided
* class implementations in this package. This method is used by
@@ -1565,7 +1565,7 @@
* <li>The item at index zero in the result array describes the caller of
* the caller of this method.</li>
* </ul>
- *
+ *
* @param maxDepth
* maximum depth to walk the stack, -1 for the entire stack
* @param stopAtPrivileged
@@ -1575,5 +1575,5 @@
static final Class<?>[] getStackClasses(int maxDepth, boolean stopAtPrivileged) {
return VMStack.getClasses(maxDepth, stopAtPrivileged);
}
-
+
}
diff --git a/luni/src/main/java/java/lang/ClassCache.java b/luni/src/main/java/java/lang/ClassCache.java
index 5ea6992..2e264fe 100644
--- a/luni/src/main/java/java/lang/ClassCache.java
+++ b/luni/src/main/java/java/lang/ClassCache.java
@@ -33,7 +33,7 @@
/**
* Cache of per-class data, meant to help the performance of reflection
* methods.
- *
+ *
* <p><b>Note:</b> None of the methods perform access checks. It is up
* to the (package internal) clients of this code to perform such
* checks as necessary.</p>
@@ -45,14 +45,14 @@
*/
/*package*/ class ClassCache<T> {
// TODO: Add caching for constructors and fields.
-
+
/** non-null; comparator used for enumerated values */
private static final EnumComparator ENUM_COMPARATOR =
new EnumComparator();
/** non-null; reflection access bridge */
/*package*/ static final ReflectionAccess REFLECT = getReflectionAccess();
-
+
/** non-null; class that this instance represents */
private final Class<T> clazz;
@@ -122,7 +122,7 @@
/**
* Constructs an instance.
- *
+ *
* @param clazz non-null; class that this instance represents
*/
/*package*/ ClassCache(Class<T> clazz) {
@@ -145,7 +145,7 @@
/**
* Gets the list of all declared methods.
- *
+ *
* @return non-null; the list of all declared methods
*/
public Method[] getDeclaredMethods() {
@@ -158,7 +158,7 @@
/**
* Gets the list of all declared public methods.
- *
+ *
* @return non-null; the list of all declared public methods
*/
public Method[] getDeclaredPublicMethods() {
@@ -172,7 +172,7 @@
/**
* Gets either the list of declared methods or the list of declared
* public methods.
- *
+ *
* @param publicOnly whether to only return public methods
*/
public Method[] getDeclaredMethods(boolean publicOnly) {
@@ -182,7 +182,7 @@
/**
* Gets the list of all methods, both directly
* declared and inherited.
- *
+ *
* @return non-null; the list of all methods
*/
public Method[] getAllMethods() {
@@ -196,7 +196,7 @@
/**
* Gets the list of all public methods, both directly
* declared and inherited.
- *
+ *
* @return non-null; the list of all public methods
*/
public Method[] getAllPublicMethods() {
@@ -211,17 +211,17 @@
* Returns the list of methods without performing any security checks
* first. This includes the methods inherited from superclasses. If no
* methods exist at all, an empty array is returned.
- *
+ *
* @param publicOnly reflects whether we want only public methods
* or all of them
- * @return the list of methods
+ * @return the list of methods
*/
private Method[] getFullListOfMethods(boolean publicOnly) {
ArrayList<Method> methods = new ArrayList<Method>();
HashSet<String> seen = new HashSet<String>();
findAllMethods(clazz, methods, seen, publicOnly);
-
+
return methods.toArray(new Method[methods.size()]);
}
@@ -231,7 +231,7 @@
* all implemented interfaces. The latter may also implement multiple
* interfaces, so we (potentially) recursively walk through a whole tree of
* classes. If no methods exist at all, an empty array is returned.
- *
+ *
* @param clazz non-null; class to inspect
* @param methods non-null; the target list to add the results to
* @param seen non-null; a set of signatures we've already seen
@@ -243,7 +243,7 @@
boolean publicOnly) {
StringBuilder builder = new StringBuilder();
Class<?> origClass = clazz;
-
+
// Traverse class and superclasses, get rid of dupes by signature
while (clazz != null) {
Method[] declaredMethods =
@@ -263,7 +263,7 @@
}
}
builder.append(')');
-
+
String signature = builder.toString();
if (!seen.contains(signature)) {
methods.add(method);
@@ -271,10 +271,10 @@
}
}
}
-
+
clazz = clazz.getSuperclass();
}
-
+
// Traverse all interfaces, and do the same recursively.
Class<?>[] interfaces = origClass.getInterfaces();
for (Class<?> intf : interfaces) {
@@ -285,7 +285,7 @@
/**
* Finds and returns a method with a given name and signature. Use
* this with one of the method lists returned by instances of this class.
- *
+ *
* @param list non-null; the list of methods to search through
* @param parameterTypes non-null; the formal parameter list
* @return non-null; the matching method
@@ -298,23 +298,23 @@
}
for (int i = list.length - 1; i >= 0; i--) {
Method method = list[i];
- if (method.getName().equals(name)
+ if (method.getName().equals(name)
&& compareClassLists(
method.getParameterTypes(), parameterTypes)) {
return method;
}
}
-
+
throw new NoSuchMethodException(name);
}
-
+
/**
* Compares two class lists for equality. Empty and
* <code>null</code> lists are considered equal. This is useful
* for matching methods and constructors.
- *
+ *
* <p>TODO: Take into account assignment compatibility?</p>
- *
+ *
* @param a null-ok; the first list of types
* @param b null-ok; the second list of types
* @return true if and only if the lists are equal
@@ -325,7 +325,7 @@
}
int length = a.length;
-
+
if (b == null) {
return (length == 0);
}
@@ -339,14 +339,14 @@
return false;
}
}
-
+
return true;
}
/**
* Makes a deep copy of the given array of methods. This is useful
* when handing out arrays from the public API.
- *
+ *
* <p><b>Note:</b> In such cases, it is insufficient to just make
* a shallow copy of the array, since method objects aren't
* immutable due to the existence of {@link
@@ -368,7 +368,7 @@
/**
* Gets the list of all declared fields.
- *
+ *
* @return non-null; the list of all declared fields
*/
public Field[] getDeclaredFields() {
@@ -381,7 +381,7 @@
/**
* Gets the list of all declared public fields.
- *
+ *
* @return non-null; the list of all declared public fields
*/
public Field[] getDeclaredPublicFields() {
@@ -395,7 +395,7 @@
/**
* Gets either the list of declared fields or the list of declared
* public fields.
- *
+ *
* @param publicOnly whether to only return public fields
*/
public Field[] getDeclaredFields(boolean publicOnly) {
@@ -405,7 +405,7 @@
/**
* Gets the list of all fields, both directly
* declared and inherited.
- *
+ *
* @return non-null; the list of all fields
*/
public Field[] getAllFields() {
@@ -419,7 +419,7 @@
/**
* Gets the list of all public fields, both directly
* declared and inherited.
- *
+ *
* @return non-null; the list of all public fields
*/
public Field[] getAllPublicFields() {
@@ -434,17 +434,17 @@
* Returns the list of fields without performing any security checks
* first. This includes the fields inherited from superclasses. If no
* fields exist at all, an empty array is returned.
- *
+ *
* @param publicOnly reflects whether we want only public fields
* or all of them
- * @return the list of fields
+ * @return the list of fields
*/
private Field[] getFullListOfFields(boolean publicOnly) {
ArrayList<Field> fields = new ArrayList<Field>();
HashSet<String> seen = new HashSet<String>();
findAllfields(clazz, fields, seen, publicOnly);
-
+
return fields.toArray(new Field[fields.size()]);
}
@@ -454,7 +454,7 @@
* all implemented interfaces. The latter may also implement multiple
* interfaces, so we (potentially) recursively walk through a whole tree of
* classes. If no fields exist at all, an empty array is returned.
- *
+ *
* @param clazz non-null; class to inspect
* @param fields non-null; the target list to add the results to
* @param seen non-null; a set of signatures we've already seen
@@ -464,25 +464,25 @@
private static void findAllfields(Class<?> clazz,
ArrayList<Field> fields, HashSet<String> seen,
boolean publicOnly) {
-
+
// Traverse class and superclasses, get rid of dupes by signature
while (clazz != null) {
Field[] declaredFields =
clazz.getClassCache().getDeclaredFields(publicOnly);
- for (Field field : declaredFields) {
+ for (Field field : declaredFields) {
String signature = field.toString();
if (!seen.contains(signature)) {
fields.add(field);
seen.add(signature);
}
}
-
+
// Traverse all interfaces, and do the same recursively.
Class<?>[] interfaces = clazz.getInterfaces();
for (Class<?> intf : interfaces) {
findAllfields(intf, fields, seen, publicOnly);
}
-
+
clazz = clazz.getSuperclass();
}
}
@@ -490,7 +490,7 @@
/**
* Finds and returns a field with a given name and signature. Use
* this with one of the field lists returned by instances of this class.
- *
+ *
* @param list non-null; the list of fields to search through
* @return non-null; the matching field
* @throws NoSuchFieldException thrown if the field does not exist
@@ -506,14 +506,14 @@
return field;
}
}
-
+
throw new NoSuchFieldException(name);
}
/**
* Makes a deep copy of the given array of fields. This is useful
* when handing out arrays from the public API.
- *
+ *
* <p><b>Note:</b> In such cases, it is insufficient to just make
* a shallow copy of the array, since field objects aren't
* immutable due to the existence of {@link
@@ -535,7 +535,7 @@
/**
* Gets the enumerated value with a given name.
- *
+ *
* @param name non-null; name of the value
* @return null-ok; the named enumerated value or <code>null</code>
* if this instance's class doesn't have such a value (including
@@ -563,7 +563,7 @@
int guessIdx = min + ((max - min) >> 1);
Enum guess = values[guessIdx];
int cmp = name.compareTo(guess.name());
-
+
if (cmp < 0) {
max = guessIdx - 1;
} else if (cmp > 0) {
@@ -578,7 +578,7 @@
/**
* Gets the array of enumerated values, sorted by name.
- *
+ *
* @return null-ok; the value array, or <code>null</code> if this
* instance's class isn't in fact an enumeration
*/
@@ -604,7 +604,7 @@
/**
* Gets the array of enumerated values, in their original declared
* order.
- *
+ *
* @return null-ok; the value array, or <code>null</code> if this
* instance's class isn't in fact an enumeration
*/
@@ -620,7 +620,7 @@
* Calls the static method <code>values()</code> on this
* instance's class, which is presumed to be a properly-formed
* enumeration class, using proper privilege hygiene.
- *
+ *
* @return non-null; the array of values as reported by
* <code>value()</code>
*/
@@ -636,7 +636,7 @@
// This shouldn't happen if the class is a well-formed enum.
throw new UnsupportedOperationException(ex);
}
-
+
try {
return (T[]) method.invoke((Object[]) null);
} catch (IllegalAccessException ex) {
@@ -657,7 +657,7 @@
/**
* Gets the reflection access object. This uses reflection to do
* so. My head is spinning.
- *
+ *
* @return non-null; the reflection access object
*/
private static ReflectionAccess getReflectionAccess() {
diff --git a/luni/src/main/java/java/lang/ClassCastException.java b/luni/src/main/java/java/lang/ClassCastException.java
index c8a68af..ae38828 100644
--- a/luni/src/main/java/java/lang/ClassCastException.java
+++ b/luni/src/main/java/java/lang/ClassCastException.java
@@ -55,7 +55,7 @@
* the class being cast to.
*/
ClassCastException(Class<?> instanceClass, Class<?> castClass) {
- super(Msg.getString("K0340", instanceClass.getName(), castClass
+ super(Msg.getString("K0340", instanceClass.getName(), castClass
.getName()));
}
}
diff --git a/luni/src/main/java/java/lang/ClassLoader.java b/luni/src/main/java/java/lang/ClassLoader.java
index aae807e..6b02d6c 100644
--- a/luni/src/main/java/java/lang/ClassLoader.java
+++ b/luni/src/main/java/java/lang/ClassLoader.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -77,7 +77,7 @@
* The 'System' ClassLoader - the one that is responsible for loading
* classes from the classpath. It is not equal to the bootstrap class loader -
* that one handles the built-in classes.
- *
+ *
* @see #getSystemClassLoader()
*/
static private class SystemClassLoader {
@@ -112,7 +112,7 @@
// ex.printStackTrace();
// }
// }
- //
+ //
// return new java.net.URLClassLoader(urls, null);
// TODO Make this a java.net.URLClassLoader once we have those?
@@ -128,7 +128,7 @@
* checkPermission method with a RuntimePermission("getClassLoader")
* permission to ensure that it is ok to access the system class loader. If
* not, a {@code SecurityException} is thrown.
- *
+ *
* @return the system class loader.
* @throws SecurityException
* if a security manager exists and it does not allow access to
@@ -149,7 +149,7 @@
/**
* Finds the URL of the resource with the specified name. The system class
* loader's resource lookup algorithm is used to find the resource.
- *
+ *
* @return the {@code URL} object for the requested resource or {@code null}
* if the resource can not be found.
* @param resName
@@ -164,7 +164,7 @@
* Returns an enumeration of URLs for the resource with the specified name.
* The system class loader's resource lookup algorithm is used to find the
* resource.
- *
+ *
* @return an enumeration of {@code URL} objects containing the requested
* resources.
* @param resName
@@ -181,7 +181,7 @@
* class loader's resource lookup algorithm is used to find the resource.
* Basically, the contents of the java.class.path are searched in order,
* looking for a path which matches the specified resource.
- *
+ *
* @return a stream for the resource or {@code null}.
* @param resName
* the name of the resource to find.
@@ -194,7 +194,7 @@
/**
* Constructs a new instance of this class with the system class loader as
* its parent.
- *
+ *
* @throws SecurityException
* if a security manager exists and it does not allow the
* creation of a new {@code ClassLoader}.
@@ -206,7 +206,7 @@
/**
* Constructs a new instance of this class with the specified class loader
* as its parent.
- *
+ *
* @param parentLoader
* The {@code ClassLoader} to use as the new class loader's
* parent.
@@ -226,7 +226,7 @@
if (smgr != null) {
smgr.checkCreateClassLoader();
}
-
+
if (parentLoader == null && !nullAllowed) {
throw new NullPointerException(
"Parent ClassLoader may not be null");
@@ -238,7 +238,7 @@
/**
* Constructs a new class from an array of bytes containing a class
* definition in class file format.
- *
+ *
* @param classRep
* the memory image of a class file.
* @param offset
@@ -265,7 +265,7 @@
/**
* Constructs a new class from an array of bytes containing a class
* definition in class file format.
- *
+ *
* @param className
* the expected name of the new class, may be {@code null} if not
* known.
@@ -296,7 +296,7 @@
* definition in class file format and assigns the specified protection
* domain to the new class. If the provided protection domain is
* {@code null} then a default protection domain is assigned to the class.
- *
+ *
* @param className
* the expected name of the new class, may be {@code null} if not
* known.
@@ -333,7 +333,7 @@
* buffer and the optional protection domain. If the provided protection
* domain is {@code null} then a default protection domain is assigned to
* the class.
- *
+ *
* @param name
* the expected name of the new class, may be {@code null} if not
* known.
@@ -361,7 +361,7 @@
* Overridden by subclasses, throws a {@code ClassNotFoundException} by
* default. This method is called by {@code loadClass} after the parent
* {@code ClassLoader} has failed to find a loaded class of the same name.
- *
+ *
* @param className
* the name of the class to look for.
* @return the {@code Class} object that is found.
@@ -375,7 +375,7 @@
/**
* Returns the class with the specified name if it has already been loaded
* by the virtual machine or {@code null} if it has not yet been loaded.
- *
+ *
* @param className
* the name of the class to look for.
* @return the {@code Class} object or {@code null} if the requested class
@@ -393,7 +393,7 @@
/**
* Finds the class with the specified name, loading it using the system
* class loader if necessary.
- *
+ *
* @param className
* the name of the class to look for.
* @return the {@code Class} object with the requested {@code className}.
@@ -406,7 +406,7 @@
/**
* Returns this class loader's parent.
- *
+ *
* @return this class loader's parent or {@code null}.
* @throws SecurityException
* if a security manager exists and it does not allow to
@@ -426,7 +426,7 @@
* implementation first tries to use the parent class loader to find the
* resource; if this fails then {@link #findResource(String)} is called to
* find the requested resource.
- *
+ *
* @param resName
* the name of the resource to find.
* @return the {@code URL} object for the requested resource or {@code null}
@@ -452,7 +452,7 @@
* resource, then it calls {@link #findResources(String)} to get additional
* URLs. The returned enumeration contains the {@code URL} objects of both
* find operations.
- *
+ *
* @return an enumeration of {@code URL} objects for the requested resource.
* @param resName
* the name of the resource to find.
@@ -472,7 +472,7 @@
* Returns a stream for the resource with the specified name. See
* {@link #getResource(String)} for a description of the lookup algorithm
* used to find the resource.
- *
+ *
* @return a stream for the resource or {@code null} if either the resource
* can not be found or a security manager does not allow to access
* the resource.
@@ -501,7 +501,7 @@
* second parameter of {@link #loadClass(String, boolean)} is ignored
* anyway.
* </p>
- *
+ *
* @return the {@code Class} object.
* @param className
* the name of the class to look for.
@@ -527,7 +527,7 @@
* <strong>Note:</strong> In the Android reference implementation, the
* {@code resolve} parameter is ignored; classes are never linked.
* </p>
- *
+ *
* @return the {@code Class} object.
* @param className
* the name of the class to look for.
@@ -563,7 +563,7 @@
* <strong>Note:</strong> In the Android reference implementation, this
* method has no effect.
* </p>
- *
+ *
* @param clazz
* the class to link.
*/
@@ -585,7 +585,7 @@
* avoid the security manager check in getSystemClassLoader, which would be
* required to implement this method anywhere else.
* </p>
- *
+ *
* @return {@code true} if the receiver is a system class loader
* @see Class#getClassLoaderImpl()
*/
@@ -604,7 +604,7 @@
* implement this method anywhere else. The method is also required in other
* places where class loaders are accesses.
* </p>
- *
+ *
* @param child
* A child candidate
* @return {@code true} if the receiver is ancestor of, or equal to,
@@ -624,7 +624,7 @@
* Finds the URL of the resource with the specified name. This
* implementation just returns {@code null}; it should be overridden in
* subclasses.
- *
+ *
* @param resName
* the name of the resource to find.
* @return the {@code URL} object for the requested resource.
@@ -637,7 +637,7 @@
* Finds an enumeration of URLs for the resource with the specified name.
* This implementation just returns an empty {@code Enumeration}; it should
* be overridden in subclasses.
- *
+ *
* @param resName
* the name of the resource to find.
* @return an enumeration of {@code URL} objects for the requested resource.
@@ -659,7 +659,7 @@
* <p>
* This implementation always returns {@code null}.
* </p>
- *
+ *
* @param libName
* the name of the library to find.
* @return the absolute path of the library.
@@ -671,7 +671,7 @@
/**
* Returns the package with the specified name. Package information is
* searched in this class loader.
- *
+ *
* @param name
* the name of the package to find.
* @return the package with the requested name; {@code null} if the package
@@ -687,7 +687,7 @@
/**
* Gets the package with the specified name, searching it in the specified
* class loader.
- *
+ *
* @param loader
* the class loader to search the package in.
* @param name
@@ -701,7 +701,7 @@
/**
* Returns all the packages known to this class loader.
- *
+ *
* @return an array with all packages known to this class loader.
*/
protected Package[] getPackages() {
@@ -717,7 +717,7 @@
* Defines and returns a new {@code Package} using the specified
* information. If {@code sealBase} is {@code null}, the package is left
* unsealed. Otherwise, the package is sealed using this URL.
- *
+ *
* @param name
* the name of the package.
* @param specTitle
@@ -760,7 +760,7 @@
/**
* Gets the signers of the specified class. This implementation returns
* {@code null}.
- *
+ *
* @param c
* the {@code Class} object for which to get the signers.
* @return signers the signers of {@code c}.
@@ -772,7 +772,7 @@
/**
* Sets the signers of the specified class. This implementation does
* nothing.
- *
+ *
* @param c
* the {@code Class} object for which to set the signers.
* @param signers
@@ -788,14 +788,14 @@
* SecurityManager.checkMemberAccess() with depth = 3. Note that
* checkMemberAccess() assumes the following stack when called:<br>
* </p>
- *
+ *
* <pre>
* < user code &gt; <- want this class
* Class.getDeclared*();
* Class.checkMemberAccess();
* SecurityManager.checkMemberAccess(); <- current frame
* </pre>
- *
+ *
* <p>
* Returns the ClassLoader of the method (including natives) at the
* specified depth on the stack of the calling thread. Frames representing
@@ -807,7 +807,7 @@
* NOT the classes of receivers.</li>
* <li>The item at depth zero is the caller of this method</li>
* </ul>
- *
+ *
* @param depth
* the stack depth of the requested ClassLoader
* @return the ClassLoader at the specified depth
@@ -817,7 +817,7 @@
if(stack.length < depth + 1) {
return null;
}
- return stack[depth].getClassLoader();
+ return stack[depth].getClassLoader();
}
/**
@@ -826,7 +826,7 @@
* Runtime.loadLibrary() because this method loads the library using the
* ClassLoader of the calling method. Loads and links the library specified
* by the argument.
- *
+ *
* @param libName
* the name of the library to load
* @param loader
@@ -854,7 +854,7 @@
* <strong>Note: </strong>This method does nothing in the Android reference
* implementation.
* </p>
- *
+ *
* @param libName
* the name of the library to load
* @param loader
@@ -874,7 +874,7 @@
* <strong>Note: </strong>This method does nothing in the Android reference
* implementation.
* </p>
- *
+ *
* @param cname
* the name of the class for which to set the assertion status.
* @param enable
@@ -890,12 +890,12 @@
* <strong>Note: </strong>This method does nothing in the Android reference
* implementation.
* </p>
- *
+ *
* @param pname
* the name of the package for which to set the assertion status.
* @param enable
* the new assertion status.
- */
+ */
public void setPackageAssertionStatus(String pname, boolean enable) {
return;
}
@@ -906,7 +906,7 @@
* <strong>Note: </strong>This method does nothing in the Android reference
* implementation.
* </p>
- *
+ *
* @param enable
* the new assertion status.
*/
@@ -932,7 +932,7 @@
* the assertion status of its package or superpackage if that has been set.
* Otherwise returns the default assertion status. Returns 1 for enabled and
* 0 for disabled.
- *
+ *
* @return the assertion status.
* @param cname
* the name of class.
@@ -946,7 +946,7 @@
* status of the named package or superpackage if that has been set.
* Otherwise returns the default assertion status. Returns 1 for enabled and
* 0 for disabled.
- *
+ *
* @return the assertion status.
* @param pname
* the name of package.
@@ -957,7 +957,7 @@
/**
* Returns the default assertion status
- *
+ *
* @return the default assertion status.
*/
boolean getDefaultAssertionStatus() {
diff --git a/luni/src/main/java/java/lang/Cloneable.java b/luni/src/main/java/java/lang/Cloneable.java
index d67e070..13817ae 100644
--- a/luni/src/main/java/java/lang/Cloneable.java
+++ b/luni/src/main/java/java/lang/Cloneable.java
@@ -23,7 +23,7 @@
* support cloning. The implementation of {@code clone()} in {@code Object}
* checks if the object being cloned implements this interface and throws
* {@code CloneNotSupportedException} if it does not.
- *
+ *
* @see Object#clone
* @see CloneNotSupportedException
*/
diff --git a/luni/src/main/java/java/lang/Compiler.java b/luni/src/main/java/java/lang/Compiler.java
index 88251e7..3ce5376 100644
--- a/luni/src/main/java/java/lang/Compiler.java
+++ b/luni/src/main/java/java/lang/Compiler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
* method is the low-level interface to the JIT compiler. It may return any
* object or {@code null} if no JIT compiler is available. Returns null
* on Android, whether or not the system has a JIT.
- *
+ *
* @param cmd
* the command object for the JIT compiler.
* @return the result of executing command or {@code null}.
@@ -49,7 +49,7 @@
* Compiles the specified class using the JIT compiler and indicates if
* compilation has been successful. Does nothing and returns false on
* Android.
- *
+ *
* @param classToCompile
* java.lang.Class the class to JIT compile
* @return {@code true} if the compilation has been successful;
@@ -64,7 +64,7 @@
* Compiles all classes whose name matches the specified name using the JIT
* compiler and indicates if compilation has been successful. Does nothing
* and returns false on Android.
- *
+ *
* @param nameRoot
* the string to match class names with.
* @return {@code true} if the compilation has been successful;
diff --git a/luni/src/main/java/java/lang/Double.java b/luni/src/main/java/java/lang/Double.java
index 28f9062..30b3b0b 100644
--- a/luni/src/main/java/java/lang/Double.java
+++ b/luni/src/main/java/java/lang/Double.java
@@ -62,7 +62,7 @@
/**
* Constant for the smallest positive normal value of the {@code double} type.
- *
+ *
* @since 1.6
* @hide
*/
@@ -71,7 +71,7 @@
/**
* Maximum exponent that a finite value of the {@code double} type may have.
* Equal to {@code Math.getExponent(Double.MAX_VALUE)}.
- *
+ *
* @since 1.6
* @hide
*/
@@ -80,7 +80,7 @@
/**
* Minimum exponent that a normal value of the {@code double} type may have.
* Equal to {@code Math.getExponent(Double.MIN_NORMAL)}.
- *
+ *
* @since 1.6
* @hide
*/
@@ -203,10 +203,10 @@
* Tests this double for equality with {@code object}.
* To be equal, {@code object} must be an instance of {@code Double} and
* {@code doubleToLongBits} must give the same value for both objects.
- *
+ *
* <p>Note that, unlike {@code ==}, {@code -0.0} and {@code +0.0} compare
* unequal, and {@code NaN}s compare equal by this method.
- *
+ *
* @param object
* the object to compare this double with.
* @return {@code true} if the specified object is equal to this
@@ -423,13 +423,13 @@
* Reference: http://en.wikipedia.org/wiki/IEEE_754
*/
if (d != d) {
- return "NaN";
+ return "NaN";
}
if (d == POSITIVE_INFINITY) {
- return "Infinity";
+ return "Infinity";
}
if (d == NEGATIVE_INFINITY) {
- return "-Infinity";
+ return "-Infinity";
}
long bitValue = doubleToLongBits(d);
@@ -441,18 +441,18 @@
long significand = bitValue & 0x000FFFFFFFFFFFFFL;
if (exponent == 0 && significand == 0) {
- return (negative ? "-0x0.0p0" : "0x0.0p0");
+ return (negative ? "-0x0.0p0" : "0x0.0p0");
}
StringBuilder hexString = new StringBuilder(10);
if (negative) {
- hexString.append("-0x");
+ hexString.append("-0x");
} else {
- hexString.append("0x");
+ hexString.append("0x");
}
if (exponent == 0) { // denormal (subnormal) value
- hexString.append("0.");
+ hexString.append("0.");
// significand is 52-bits, so there can be 13 hex digits
int fractionDigits = 13;
// remove trailing hex zeros, so Integer.toHexString() won't print
@@ -472,9 +472,9 @@
}
}
hexString.append(hexSignificand);
- hexString.append("p-1022");
+ hexString.append("p-1022");
} else { // normal value
- hexString.append("1.");
+ hexString.append("1.");
// significand is 52-bits, so there can be 13 hex digits
int fractionDigits = 13;
// remove trailing hex zeros, so Integer.toHexString() won't print
diff --git a/luni/src/main/java/java/lang/EmptyEnumeration.java b/luni/src/main/java/java/lang/EmptyEnumeration.java
index f3ea777..115cf9f 100644
--- a/luni/src/main/java/java/lang/EmptyEnumeration.java
+++ b/luni/src/main/java/java/lang/EmptyEnumeration.java
@@ -48,7 +48,7 @@
public boolean hasMoreElements() {
return false;
}
-
+
public URL nextElement() {
throw new NoSuchElementException();
}
diff --git a/luni/src/main/java/java/lang/Enum.java b/luni/src/main/java/java/lang/Enum.java
index b6c78ea..43731bd 100644
--- a/luni/src/main/java/java/lang/Enum.java
+++ b/luni/src/main/java/java/lang/Enum.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -114,7 +114,7 @@
@Override
protected final Object clone() throws CloneNotSupportedException {
// KA004=Enums may not be cloned
- throw new CloneNotSupportedException(Msg.getString("KA004"));
+ throw new CloneNotSupportedException(Msg.getString("KA004"));
}
/**
@@ -168,7 +168,7 @@
public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) {
if ((enumType == null) || (name == null)) {
// KA001=Argument must not be null
- throw new NullPointerException(Msg.getString("KA001"));
+ throw new NullPointerException(Msg.getString("KA001"));
}
// BEGIN android-changed
@@ -179,10 +179,10 @@
if (result == null) {
if (!enumType.isEnum()) {
// KA005={0} is not an enum type
- throw new IllegalArgumentException(Msg.getString("KA005", enumType));
+ throw new IllegalArgumentException(Msg.getString("KA005", enumType));
} else {
// KA006={0} is not a constant in the enum type {1}
- throw new IllegalArgumentException(Msg.getString("KA006", name,
+ throw new IllegalArgumentException(Msg.getString("KA006", name,
enumType));
}
}
@@ -193,7 +193,7 @@
/**
* Enum types may not have finalizers.
- *
+ *
* @since 1.6
* @hide
*/
@@ -211,7 +211,7 @@
Method values = AccessController
.doPrivileged(new PrivilegedExceptionAction<Method>() {
public Method run() throws Exception {
- Method valsMethod = enumType.getMethod("values",
+ Method valsMethod = enumType.getMethod("values",
(Class[]) null);
valsMethod.setAccessible(true);
return valsMethod;
diff --git a/luni/src/main/java/java/lang/EnumConstantNotPresentException.java b/luni/src/main/java/java/lang/EnumConstantNotPresentException.java
index 71923bb..213e059 100644
--- a/luni/src/main/java/java/lang/EnumConstantNotPresentException.java
+++ b/luni/src/main/java/java/lang/EnumConstantNotPresentException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,7 +61,7 @@
/**
* Gets the name of the missing constant.
- *
+ *
* @return the name of the constant that has not been found in the enum
* type.
*/
diff --git a/luni/src/main/java/java/lang/Error.java b/luni/src/main/java/java/lang/Error.java
index dd284ae..790c563 100644
--- a/luni/src/main/java/java/lang/Error.java
+++ b/luni/src/main/java/java/lang/Error.java
@@ -22,7 +22,7 @@
* {@code Error} is the superclass of all classes that represent unrecoverable
* errors. When errors are thrown, they should not be caught by application
* code.
- *
+ *
* @see Throwable
* @see Exception
* @see RuntimeException
@@ -41,7 +41,7 @@
/**
* Constructs a new {@code Error} with the current stack trace and the
* specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
@@ -52,7 +52,7 @@
/**
* Constructs a new {@code Error} with the current stack trace, the
* specified detail message and the specified cause.
- *
+ *
* @param detailMessage
* the detail message for this error.
* @param throwable
@@ -65,7 +65,7 @@
/**
* Constructs a new {@code Error} with the current stack trace and the
* specified cause.
- *
+ *
* @param throwable
* the cause of this error.
*/
diff --git a/luni/src/main/java/java/lang/Exception.java b/luni/src/main/java/java/lang/Exception.java
index 7921edd..a3cd1c3 100644
--- a/luni/src/main/java/java/lang/Exception.java
+++ b/luni/src/main/java/java/lang/Exception.java
@@ -22,7 +22,7 @@
* {@code Exception} is the superclass of all classes that represent recoverable
* exceptions. When exceptions are thrown, they may be caught by application
* code.
- *
+ *
* @see Throwable
* @see Error
* @see RuntimeException
@@ -40,7 +40,7 @@
/**
* Constructs a new {@code Exception} with the current stack trace and the
* specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
@@ -51,7 +51,7 @@
/**
* Constructs a new {@code Exception} with the current stack trace, the
* specified detail message and the specified cause.
- *
+ *
* @param detailMessage
* the detail message for this exception.
* @param throwable
@@ -64,7 +64,7 @@
/**
* Constructs a new {@code Exception} with the current stack trace and the
* specified cause.
- *
+ *
* @param throwable
* the cause of this exception.
*/
diff --git a/luni/src/main/java/java/lang/ExceptionInInitializerError.java b/luni/src/main/java/java/lang/ExceptionInInitializerError.java
index 3767488..61f651d 100644
--- a/luni/src/main/java/java/lang/ExceptionInInitializerError.java
+++ b/luni/src/main/java/java/lang/ExceptionInInitializerError.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code ExceptionInInitializerError} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
@@ -51,7 +51,7 @@
* Constructs a new {@code ExceptionInInitializerError} with the current
* stack trace and the specified cause. The exception should be the one
* which originally occurred in the class initialization code.
- *
+ *
* @param exception
* the exception that caused this error.
*/
@@ -63,7 +63,7 @@
/**
* Returns the exception that is the cause of this error.
- *
+ *
* @return the exception that caused this error.
*/
public Throwable getException() {
@@ -72,7 +72,7 @@
/**
* Returns the cause of this error, or {@code null} if there is no cause.
- *
+ *
* @return the exception that caused this error.
*/
@Override
diff --git a/luni/src/main/java/java/lang/Float.java b/luni/src/main/java/java/lang/Float.java
index 16b60e1..5942cf9 100644
--- a/luni/src/main/java/java/lang/Float.java
+++ b/luni/src/main/java/java/lang/Float.java
@@ -59,7 +59,7 @@
/**
* Constant for the smallest positive normal value of the {@code float} type.
- *
+ *
* @since 1.6
* @hide
*/
@@ -68,7 +68,7 @@
/**
* Maximum exponent that a finite value of the {@code float} type may have.
* Equal to {@code Math.getExponent(Float.MAX_VALUE)}.
- *
+ *
* @since 1.6
* @hide
*/
@@ -77,7 +77,7 @@
/**
* Minimum exponent that a normal value of the {@code float} type may have.
* Equal to {@code Math.getExponent(Float.MIN_NORMAL)}.
- *
+ *
* @since 1.6
* @hide
*/
@@ -173,10 +173,10 @@
* Tests this double for equality with {@code object}.
* To be equal, {@code object} must be an instance of {@code Float} and
* {@code floatToIntBits} must give the same value for both objects.
- *
+ *
* <p>Note that, unlike {@code ==}, {@code -0.0} and {@code +0.0} compare
* unequal, and {@code NaN}s compare equal by this method.
- *
+ *
* @param object
* the object to compare this float with.
* @return {@code true} if the specified object is equal to this
@@ -429,13 +429,13 @@
* Reference: http://en.wikipedia.org/wiki/IEEE_754
*/
if (f != f) {
- return "NaN";
+ return "NaN";
}
if (f == POSITIVE_INFINITY) {
- return "Infinity";
+ return "Infinity";
}
if (f == NEGATIVE_INFINITY) {
- return "-Infinity";
+ return "-Infinity";
}
int bitValue = floatToIntBits(f);
@@ -448,18 +448,18 @@
int significand = (bitValue & 0x007FFFFF) << 1;
if (exponent == 0 && significand == 0) {
- return (negative ? "-0x0.0p0" : "0x0.0p0");
+ return (negative ? "-0x0.0p0" : "0x0.0p0");
}
StringBuilder hexString = new StringBuilder(10);
if (negative) {
- hexString.append("-0x");
+ hexString.append("-0x");
} else {
- hexString.append("0x");
+ hexString.append("0x");
}
if (exponent == 0) { // denormal (subnormal) value
- hexString.append("0.");
+ hexString.append("0.");
// significand is 23-bits, so there can be 6 hex digits
int fractionDigits = 6;
// remove trailing hex zeros, so Integer.toHexString() won't print
@@ -479,9 +479,9 @@
}
}
hexString.append(hexSignificand);
- hexString.append("p-126");
+ hexString.append("p-126");
} else { // normal value
- hexString.append("1.");
+ hexString.append("1.");
// significand is 23-bits, so there can be 6 hex digits
int fractionDigits = 6;
// remove trailing hex zeros, so Integer.toHexString() won't print
diff --git a/luni/src/main/java/java/lang/IllegalAccessError.java b/luni/src/main/java/java/lang/IllegalAccessError.java
index 7fcef85..0013b1c 100644
--- a/luni/src/main/java/java/lang/IllegalAccessError.java
+++ b/luni/src/main/java/java/lang/IllegalAccessError.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code IllegalAccessError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/IllegalAccessException.java b/luni/src/main/java/java/lang/IllegalAccessException.java
index d96fd56..0a25fda 100644
--- a/luni/src/main/java/java/lang/IllegalAccessException.java
+++ b/luni/src/main/java/java/lang/IllegalAccessException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code IllegalAccessException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/IllegalArgumentException.java b/luni/src/main/java/java/lang/IllegalArgumentException.java
index eb2ad91..c447791 100644
--- a/luni/src/main/java/java/lang/IllegalArgumentException.java
+++ b/luni/src/main/java/java/lang/IllegalArgumentException.java
@@ -36,18 +36,18 @@
/**
* Constructs a new {@code IllegalArgumentException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
public IllegalArgumentException(String detailMessage) {
super(detailMessage);
}
-
+
/**
* Constructs a new {@code IllegalArgumentException} with the current stack
* trace, the specified detail message and the specified cause.
- *
+ *
* @param message
* the detail message for this exception.
* @param cause
@@ -57,11 +57,11 @@
public IllegalArgumentException(String message, Throwable cause) {
super(message, cause);
}
-
+
/**
* Constructs a new {@code IllegalArgumentException} with the current stack
* trace and the specified cause.
- *
+ *
* @param cause
* the cause of this exception, may be {@code null}.
* @since 1.5
diff --git a/luni/src/main/java/java/lang/IllegalMonitorStateException.java b/luni/src/main/java/java/lang/IllegalMonitorStateException.java
index a0b8a75..413b224 100644
--- a/luni/src/main/java/java/lang/IllegalMonitorStateException.java
+++ b/luni/src/main/java/java/lang/IllegalMonitorStateException.java
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code IllegalArgumentException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/IllegalStateException.java b/luni/src/main/java/java/lang/IllegalStateException.java
index 28db2de..147cc9e 100644
--- a/luni/src/main/java/java/lang/IllegalStateException.java
+++ b/luni/src/main/java/java/lang/IllegalStateException.java
@@ -36,18 +36,18 @@
/**
* Constructs a new {@code IllegalStateException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
public IllegalStateException(String detailMessage) {
super(detailMessage);
}
-
+
/**
* Constructs a new {@code IllegalStateException} with the current stack
* trace, the specified detail message and the specified cause.
- *
+ *
* @param message
* the detail message for this exception.
* @param cause
@@ -57,11 +57,11 @@
public IllegalStateException(String message, Throwable cause) {
super(message, cause);
}
-
+
/**
* Constructs a new {@code IllegalStateException} with the current stack
* trace and the specified cause.
- *
+ *
* @param cause
* the cause of this exception, may be {@code null}.
* @since 1.5
diff --git a/luni/src/main/java/java/lang/IllegalThreadStateException.java b/luni/src/main/java/java/lang/IllegalThreadStateException.java
index f1e99a8..a8229f5 100644
--- a/luni/src/main/java/java/lang/IllegalThreadStateException.java
+++ b/luni/src/main/java/java/lang/IllegalThreadStateException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code IllegalThreadStateException} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/IncompatibleClassChangeError.java b/luni/src/main/java/java/lang/IncompatibleClassChangeError.java
index 2155a28..50ce387 100644
--- a/luni/src/main/java/java/lang/IncompatibleClassChangeError.java
+++ b/luni/src/main/java/java/lang/IncompatibleClassChangeError.java
@@ -22,7 +22,7 @@
* {@code IncompatibleClassChangeError} is the superclass of all classes which
* represent errors that occur when inconsistent class files are loaded into
* the same running image.
- *
+ *
* @see Error
*/
public class IncompatibleClassChangeError extends LinkageError {
@@ -40,7 +40,7 @@
/**
* Constructs a new {@code IncompatibleClassChangeError} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/IndexOutOfBoundsException.java b/luni/src/main/java/java/lang/IndexOutOfBoundsException.java
index f26fcbf..1a61222 100644
--- a/luni/src/main/java/java/lang/IndexOutOfBoundsException.java
+++ b/luni/src/main/java/java/lang/IndexOutOfBoundsException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code IndexOutOfBoundsException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/InstantiationError.java b/luni/src/main/java/java/lang/InstantiationError.java
index 9ad1ed6..e80f7be 100644
--- a/luni/src/main/java/java/lang/InstantiationError.java
+++ b/luni/src/main/java/java/lang/InstantiationError.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code InstantiationError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
@@ -49,7 +49,7 @@
/**
* Constructs a new {@code InstantiationError} with the current stack trace
* and the class that caused this error.
- *
+ *
* @param clazz
* the class that can not be instantiated.
*/
diff --git a/luni/src/main/java/java/lang/InstantiationException.java b/luni/src/main/java/java/lang/InstantiationException.java
index fe68345..ac0733b 100644
--- a/luni/src/main/java/java/lang/InstantiationException.java
+++ b/luni/src/main/java/java/lang/InstantiationException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new {@code InstantiationException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
@@ -46,7 +46,7 @@
/**
* Constructs a new {@code InstantiationException} with the current stack
* trace and the class that caused this exception.
- *
+ *
* @param clazz
* the class that can not be instantiated.
*/
diff --git a/luni/src/main/java/java/lang/Integer.java b/luni/src/main/java/java/lang/Integer.java
index 63cd615..3d295e6 100644
--- a/luni/src/main/java/java/lang/Integer.java
+++ b/luni/src/main/java/java/lang/Integer.java
@@ -616,7 +616,7 @@
* depending on the radix. If {@code radix} is not in the interval defined
* by {@code Character.MIN_RADIX} and {@code Character.MAX_RADIX} then 10 is
* used as the base for the conversion.
- *
+ *
* <p>This method treats its argument as signed. If you want to convert an
* unsigned value to one of the common non-decimal bases, you may find
* {@link #toBinaryString}, {@code #toHexString}, or {@link #toOctalString}
diff --git a/luni/src/main/java/java/lang/InternalError.java b/luni/src/main/java/java/lang/InternalError.java
index d4748af..b934274 100644
--- a/luni/src/main/java/java/lang/InternalError.java
+++ b/luni/src/main/java/java/lang/InternalError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code InternalError} with the current stack trace and
* the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/InterruptedException.java b/luni/src/main/java/java/lang/InterruptedException.java
index 0e099c3..63ed4f3 100644
--- a/luni/src/main/java/java/lang/InterruptedException.java
+++ b/luni/src/main/java/java/lang/InterruptedException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code InterruptedException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/Iterable.java b/luni/src/main/java/java/lang/Iterable.java
index 193fb7b..f936d2b 100644
--- a/luni/src/main/java/java/lang/Iterable.java
+++ b/luni/src/main/java/java/lang/Iterable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
/**
* Returns an {@link Iterator} for the elements in this object.
- *
+ *
* @return An {@code Iterator} instance.
*/
Iterator<T> iterator();
diff --git a/luni/src/main/java/java/lang/LangAccessImpl.java b/luni/src/main/java/java/lang/LangAccessImpl.java
index 44d4aac..bcb49db 100644
--- a/luni/src/main/java/java/lang/LangAccessImpl.java
+++ b/luni/src/main/java/java/lang/LangAccessImpl.java
@@ -25,7 +25,7 @@
/** non-null; unique instance of this class */
/*package*/ static final LangAccessImpl THE_ONE = new LangAccessImpl();
- /**
+ /**
* This class is not publicly instantiable. Use {@link #THE_ONE}.
*/
private LangAccessImpl() {
diff --git a/luni/src/main/java/java/lang/LinkageError.java b/luni/src/main/java/java/lang/LinkageError.java
index 061f3dc..c88d0c4 100644
--- a/luni/src/main/java/java/lang/LinkageError.java
+++ b/luni/src/main/java/java/lang/LinkageError.java
@@ -21,7 +21,7 @@
/**
* {@code LinkageError} is the superclass of all error classes that occur when
* loading and linking class files.
- *
+ *
* @see Error
*/
public class LinkageError extends Error {
@@ -39,7 +39,7 @@
/**
* Constructs a new {@code LinkageError} with the current stack trace and
* the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/Long.java b/luni/src/main/java/java/lang/Long.java
index 2cc4cd7..c274be6 100644
--- a/luni/src/main/java/java/lang/Long.java
+++ b/luni/src/main/java/java/lang/Long.java
@@ -589,7 +589,7 @@
* 'z', depending on the radix. If {@code radix} is not in the interval
* defined by {@code Character.MIN_RADIX} and {@code Character.MAX_RADIX}
* then 10 is used as the base for the conversion.
- *
+ *
* <p>This method treats its argument as signed. If you want to convert an
* unsigned value to one of the common non-decimal bases, you may find
* {@link #toBinaryString}, {@code #toHexString}, or {@link #toOctalString}
diff --git a/luni/src/main/java/java/lang/Math.java b/luni/src/main/java/java/lang/Math.java
index aed40ff..d0adb2a 100644
--- a/luni/src/main/java/java/lang/Math.java
+++ b/luni/src/main/java/java/lang/Math.java
@@ -45,7 +45,7 @@
private static final long DOUBLE_MANTISSA_MASK = 0x000fffffffffffffL;
private static final long DOUBLE_SIGN_MASK = 0x8000000000000000L;
-
+
/**
* The double value closest to e, the base of the natural logarithm.
*/
@@ -75,7 +75,7 @@
* <li>{@code abs(-infinity) = +infinity}</li>
* <li>{@code abs(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose absolute value has to be computed.
* @return the absolute value of the argument.
@@ -96,7 +96,7 @@
* <li>{@code abs(-infinity) = +infinity}</li>
* <li>{@code abs(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param f
* the value whose absolute value has to be computed.
* @return the argument if it is positive, otherwise the negation of the
@@ -113,7 +113,7 @@
* <p>
* If the argument is {@code Integer.MIN_VALUE}, {@code Integer.MIN_VALUE}
* is returned.
- *
+ *
* @param i
* the value whose absolute value has to be computed.
* @return the argument if it is positive, otherwise the negation of the
@@ -126,7 +126,7 @@
/**
* Returns the absolute value of the argument. If the argument is {@code
* Long.MIN_VALUE}, {@code Long.MIN_VALUE} is returned.
- *
+ *
* @param l
* the value whose absolute value has to be computed.
* @return the argument if it is positive, otherwise the negation of the
@@ -147,7 +147,7 @@
* <li>{@code acos((anything < -1) = NaN}</li>
* <li>{@code acos(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value to compute arc cosine of.
* @return the arc cosine of the argument.
@@ -165,7 +165,7 @@
* <li>{@code asin((anything < -1)) = NaN}</li>
* <li>{@code asin(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose arc sine has to be computed.
* @return the arc sine of the argument.
@@ -185,7 +185,7 @@
* <li>{@code atan(-infinity) = -pi/2}</li>
* <li>{@code atan(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose arc tangent has to be computed.
* @return the arc tangent of the argument.
@@ -223,7 +223,7 @@
* <li>{@code atan2(-infinity, (anything but,0, NaN, and infinity))} {@code
* =} {@code -pi/2}</li>
* </ul>
- *
+ *
* @param y
* the numerator of the value whose atan has to be computed.
* @param x
@@ -244,7 +244,7 @@
* <li>{@code cbrt(-infinity) = -infinity}</li>
* <li>{@code cbrt(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose cube root has to be computed.
* @return the cube root of the argument.
@@ -264,7 +264,7 @@
* <li>{@code ceil(-infinity) = -infinity}</li>
* <li>{@code ceil(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose closest integer value has to be computed.
* @return the ceiling of the argument.
@@ -282,7 +282,7 @@
* <li>{@code cos(-infinity) = NaN}</li>
* <li>{@code cos(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the angle whose cosine has to be computed, in radians.
* @return the cosine of the argument.
@@ -300,7 +300,7 @@
* <li>{@code cosh(-infinity) = +infinity}</li>
* <li>{@code cosh(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose hyperbolic cosine has to be computed.
* @return the hyperbolic cosine of the argument.
@@ -318,7 +318,7 @@
* <li>{@code exp(-infinity) = +0.0}</li>
* <li>{@code exp(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose exponential has to be computed.
* @return the exponential of the argument.
@@ -343,7 +343,7 @@
* <li>{@code expm1(-infinity) = -1.0}</li>
* <li>{@code expm1(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value to compute the <i>{@code e}</i><sup>{@code d} </sup>
* {@code - 1} of.
@@ -364,7 +364,7 @@
* <li>{@code floor(-infinity) = -infinity}</li>
* <li>{@code floor(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose closest integer value has to be computed.
* @return the floor of the argument.
@@ -386,7 +386,7 @@
* <li>{@code hypot((anything including NaN), -infinity) = +infinity}</li>
* <li>{@code hypot(NaN, NaN) = NaN}</li>
* </ul>
- *
+ *
* @param x
* a double number.
* @param y
@@ -415,7 +415,7 @@
* <li>{@code IEEEremainder(x, -infinity) = x } where x is anything but
* +/-infinity</li>
* </ul>
- *
+ *
* @param x
* the numerator of the operation.
* @param y
@@ -438,7 +438,7 @@
* <li>{@code log(-infinity) = NaN}</li>
* <li>{@code log(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose log has to be computed.
* @return the natural logarithm of the argument.
@@ -459,7 +459,7 @@
* <li>{@code log10(-infinity) = NaN}</li>
* <li>{@code log10(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose base 10 log has to be computed.
* @return the natural logarithm of the argument.
@@ -483,7 +483,7 @@
* <li>{@code log1p(-infinity) = NaN}</li>
* <li>{@code log1p(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value to compute the {@code ln(1+d)} of.
* @return the natural logarithm of the sum of the argument and 1.
@@ -501,7 +501,7 @@
* <li>{@code max(+0.0, -0.0) = +0.0}</li>
* <li>{@code max(-0.0, +0.0) = +0.0}</li>
* </ul>
- *
+ *
* @param d1
* the first argument.
* @param d2
@@ -538,7 +538,7 @@
* <li>{@code max(+0.0, -0.0) = +0.0}</li>
* <li>{@code max(-0.0, +0.0) = +0.0}</li>
* </ul>
- *
+ *
* @param f1
* the first argument.
* @param f2
@@ -567,7 +567,7 @@
/**
* Returns the most positive (closest to positive infinity) of the two
* arguments.
- *
+ *
* @param i1
* the first argument.
* @param i2
@@ -581,7 +581,7 @@
/**
* Returns the most positive (closest to positive infinity) of the two
* arguments.
- *
+ *
* @param l1
* the first argument.
* @param l2
@@ -603,7 +603,7 @@
* <li>{@code min(+0.0, -0.0) = -0.0}</li>
* <li>{@code min(-0.0, +0.0) = -0.0}</li>
* </ul>
- *
+ *
* @param d1
* the first argument.
* @param d2
@@ -640,7 +640,7 @@
* <li>{@code min(+0.0, -0.0) = -0.0}</li>
* <li>{@code min(-0.0, +0.0) = -0.0}</li>
* </ul>
- *
+ *
* @param f1
* the first argument.
* @param f2
@@ -669,7 +669,7 @@
/**
* Returns the most negative (closest to negative infinity) of the two
* arguments.
- *
+ *
* @param i1
* the first argument.
* @param i2
@@ -683,7 +683,7 @@
/**
* Returns the most negative (closest to negative infinity) of the two
* arguments.
- *
+ *
* @param l1
* the first argument.
* @param l2
@@ -724,7 +724,7 @@
* pow(-1,(integer))*pow(+anything,integer) }</li>
* <li>{@code pow((-anything except 0 and inf), (non-integer)) = NAN}</li>
* </ul>
- *
+ *
* @param x
* the base of the operation.
* @param y
@@ -745,7 +745,7 @@
* <li>{@code rint(-infinity) = -infinity}</li>
* <li>{@code rint(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value to be rounded.
* @return the closest integer to the argument (as a double).
@@ -766,7 +766,7 @@
* <li>{@code round(-infinity) = Long.MIN_VALUE}</li>
* <li>{@code round(NaN) = +0.0}</li>
* </ul>
- *
+ *
* @param d
* the value to be rounded.
* @return the closest integer to the argument.
@@ -793,7 +793,7 @@
* <li>{@code round(-infintiy) = Integer.MIN_VALUE}</li>
* <li>{@code round(NaN) = +0.0}</li>
* </ul>
- *
+ *
* @param f
* the value to be rounded.
* @return the closest integer to the argument.
@@ -820,7 +820,7 @@
* <li>{@code signum(-infinity) = -1.0}</li>
* <li>{@code signum(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose signum has to be computed.
* @return the value of the signum function.
@@ -852,7 +852,7 @@
* <li>{@code signum(-infinity) = -1.0}</li>
* <li>{@code signum(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param f
* the value whose signum has to be computed.
* @return the value of the signum function.
@@ -883,7 +883,7 @@
* <li>{@code sin(-infinity) = NaN}</li>
* <li>{@code sin(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the angle whose sin has to be computed, in radians.
* @return the sine of the argument.
@@ -903,7 +903,7 @@
* <li>{@code sinh(-infinity) = -infinity}</li>
* <li>{@code sinh(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose hyperbolic sine has to be computed.
* @return the hyperbolic sine of the argument.
@@ -922,7 +922,7 @@
* <li>{@code sqrt(+infinity) = +infinity}</li>
* <li>{@code sqrt(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose square root has to be computed.
* @return the square root of the argument.
@@ -942,7 +942,7 @@
* <li>{@code tan(-infinity) = NaN}</li>
* <li>{@code tan(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the angle whose tangent has to be computed, in radians.
* @return the tangent of the argument.
@@ -964,7 +964,7 @@
* <li>{@code tanh(-infinity) = -1.0}</li>
* <li>{@code tanh(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the value whose hyperbolic tangent has to be computed.
* @return the hyperbolic tangent of the argument.
@@ -974,7 +974,7 @@
/**
* Returns a pseudo-random number between 0.0 (inclusive) and 1.0
* (exclusive).
- *
+ *
* @return a pseudo-random number.
*/
public static double random() {
@@ -996,7 +996,7 @@
* <li>{@code toRadians(-infinity) = -infinity}</li>
* <li>{@code toRadians(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param angdeg
* an angle in degrees.
* @return the radian measure of the angle.
@@ -1017,7 +1017,7 @@
* <li>{@code toDegrees(-infinity) = -infinity}</li>
* <li>{@code toDegrees(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param angrad
* an angle in radians.
* @return the degree measure of the angle.
@@ -1040,7 +1040,7 @@
* <li>{@code ulp(-infintiy) = infinity}</li>
* <li>{@code ulp(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param d
* the floating-point value to compute ulp of.
* @return the size of a ulp of the argument.
@@ -1070,7 +1070,7 @@
* <li>{@code ulp(-infintiy) = infinity}</li>
* <li>{@code ulp(NaN) = NaN}</li>
* </ul>
- *
+ *
* @param f
* the floating-point value to compute ulp of.
* @return the size of a ulp of the argument.
@@ -1130,8 +1130,8 @@
long bits = Double.doubleToRawLongBits(d);
bits = (bits & DOUBLE_EXPONENT_MASK) >> DOUBLE_MANTISSA_BITS;
return (int) bits - DOUBLE_EXPONENT_BIAS;
- }
-
+ }
+
/**
* Returns the next double after {@code start} in the given {@code direction}.
* @since 1.6
@@ -1188,7 +1188,7 @@
}
return (float) direction;
}
-
+
/**
* Returns the next double larger than {@code d}.
* @since 1.6
@@ -1230,7 +1230,7 @@
return Float.intBitsToFloat(Float.floatToIntBits(f) - 1);
}
}
-
+
/**
* Returns {@code d} * 2^{@code scaleFactor}. The result may be rounded.
* @since 1.6
diff --git a/luni/src/main/java/java/lang/NegativeArraySizeException.java b/luni/src/main/java/java/lang/NegativeArraySizeException.java
index 50b6929..aa3eb2f 100644
--- a/luni/src/main/java/java/lang/NegativeArraySizeException.java
+++ b/luni/src/main/java/java/lang/NegativeArraySizeException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NegativeArraySizeException} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/NoClassDefFoundError.java b/luni/src/main/java/java/lang/NoClassDefFoundError.java
index 9fae360..ca5342b 100644
--- a/luni/src/main/java/java/lang/NoClassDefFoundError.java
+++ b/luni/src/main/java/java/lang/NoClassDefFoundError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NoClassDefFoundError} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/NoSuchFieldError.java b/luni/src/main/java/java/lang/NoSuchFieldError.java
index 9b479f6..0eacbb6 100644
--- a/luni/src/main/java/java/lang/NoSuchFieldError.java
+++ b/luni/src/main/java/java/lang/NoSuchFieldError.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code NoSuchFieldError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/NoSuchFieldException.java b/luni/src/main/java/java/lang/NoSuchFieldException.java
index 283bfab..d7722db 100644
--- a/luni/src/main/java/java/lang/NoSuchFieldException.java
+++ b/luni/src/main/java/java/lang/NoSuchFieldException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NoSuchFieldException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/NoSuchMethodError.java b/luni/src/main/java/java/lang/NoSuchMethodError.java
index 91ed06c..e2450f3 100644
--- a/luni/src/main/java/java/lang/NoSuchMethodError.java
+++ b/luni/src/main/java/java/lang/NoSuchMethodError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NoSuchMethodError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/NoSuchMethodException.java b/luni/src/main/java/java/lang/NoSuchMethodException.java
index cf4dbe0..91758ac 100644
--- a/luni/src/main/java/java/lang/NoSuchMethodException.java
+++ b/luni/src/main/java/java/lang/NoSuchMethodException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NoSuchMethodException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/NullPointerException.java b/luni/src/main/java/java/lang/NullPointerException.java
index 90e9e50..77bba3e 100644
--- a/luni/src/main/java/java/lang/NullPointerException.java
+++ b/luni/src/main/java/java/lang/NullPointerException.java
@@ -39,7 +39,7 @@
/**
* Constructs a new {@code NullPointerException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/Number.java b/luni/src/main/java/java/lang/Number.java
index 4fb5596..17a7b60 100644
--- a/luni/src/main/java/java/lang/Number.java
+++ b/luni/src/main/java/java/lang/Number.java
@@ -21,7 +21,7 @@
/**
* The abstract superclass of the classes which represent numeric base types
* (that is {@link Byte}, {@link Short}, {@link Integer}, {@link Long},
- * {@link Float}, and {@link Double}.
+ * {@link Float}, and {@link Double}.
*/
public abstract class Number implements java.io.Serializable {
@@ -35,8 +35,8 @@
/**
* Returns this object's value as a byte. Might involve rounding and/or
- * truncating the value, so it fits into a byte.
- *
+ * truncating the value, so it fits into a byte.
+ *
* @return the primitive byte value of this object.
*/
public byte byteValue() {
@@ -45,14 +45,14 @@
/**
* Returns this object's value as a double. Might involve rounding.
- *
+ *
* @return the primitive double value of this object.
*/
public abstract double doubleValue();
/**
* Returns this object's value as a float. Might involve rounding.
- *
+ *
* @return the primitive float value of this object.
*/
public abstract float floatValue();
@@ -60,7 +60,7 @@
/**
* Returns this object's value as an int. Might involve rounding and/or
* truncating the value, so it fits into an int.
- *
+ *
* @return the primitive int value of this object.
*/
public abstract int intValue();
@@ -68,7 +68,7 @@
/**
* Returns this object's value as a long. Might involve rounding and/or
* truncating the value, so it fits into a long.
- *
+ *
* @return the primitive long value of this object.
*/
public abstract long longValue();
@@ -76,7 +76,7 @@
/**
* Returns this object's value as a short. Might involve rounding and/or
* truncating the value, so it fits into a short.
- *
+ *
* @return the primitive short value of this object.
*/
public short shortValue() {
diff --git a/luni/src/main/java/java/lang/NumberFormatException.java b/luni/src/main/java/java/lang/NumberFormatException.java
index 9d2f0c7..ca7262b 100644
--- a/luni/src/main/java/java/lang/NumberFormatException.java
+++ b/luni/src/main/java/java/lang/NumberFormatException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code NumberFormatException} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/Object.java b/luni/src/main/java/java/lang/Object.java
index bdb66b9..37e3a07 100644
--- a/luni/src/main/java/java/lang/Object.java
+++ b/luni/src/main/java/java/lang/Object.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -63,7 +63,7 @@
* needs to implement this kind of cloning should call {@code super.clone()}
* to create the new instance and then create deep copies of the nested,
* mutable objects.
- *
+ *
* @return a copy of this object.
* @throws CloneNotSupportedException
* if this object's class does not implement the {@code
@@ -73,7 +73,7 @@
if (!(this instanceof Cloneable)) {
throw new CloneNotSupportedException("Class doesn't implement Cloneable");
}
-
+
return internalClone((Cloneable) this);
}
@@ -81,7 +81,7 @@
* Native helper method for cloning.
*/
private native Object internalClone(Cloneable o);
-
+
/**
* Compares this instance with the specified object and indicates if they
* are equal. In order to be equal, {@code o} must represent the same object
@@ -100,7 +100,7 @@
* these objects. This means that subclasses of {@code Object} usually
* override either both methods or none of them.
* </p>
- *
+ *
* @param o
* the object to compare this instance with.
* @return {@code true} if the specified object is equal to this {@code
@@ -115,7 +115,7 @@
* Is called before the object's memory is being reclaimed by the VM. This
* can only happen once the VM has detected, during a run of the garbage
* collector, that the object is no longer reachable by any thread of the
- * running application.
+ * running application.
* <p>
* The method can be used to free system resources or perform other cleanup
* before the object is garbage collected. The default implementation of the
@@ -132,7 +132,7 @@
* {@link java.lang.ref.ReferenceQueue}, because it provides more control
* over the way the VM deals with references during garbage collection.
* </p>
- *
+ *
* @throws Throwable
* any exception which is raised during finalization; these are
* ignored by the virtual machine.
@@ -153,7 +153,7 @@
* List<Integer> l = new ArrayList<Integer>();
* Class<? extends List> c = l.getClass();
* </pre>
- *
+ *
* @return this object's {@code Class} instance.
*/
public final native Class<? extends Object> getClass();
@@ -163,7 +163,7 @@
* objects for which {@code equals(Object)} returns {@code true} must return
* the same hash code value. This means that subclasses of {@code Object}
* usually override both methods or neither method.
- *
+ *
* @return this object's hash code.
* @see #equals
*/
@@ -188,7 +188,7 @@
* <li>by executing a synchronized static method if the object is of type
* {@code Class}.</li>
* </ul>
- *
+ *
* @see #notifyAll
* @see #wait()
* @see #wait(long)
@@ -214,7 +214,7 @@
* <li>by executing a synchronized static method if the object is of type
* {@code Class}.</li>
* </ul>
- *
+ *
* @throws IllegalMonitorStateException
* if the thread calling this method is not the owner of this
* object's monitor.
@@ -233,11 +233,11 @@
* default implementation simply concatenates the class name, the '@' sign
* and a hexadecimal representation of the object's {@link #hashCode()},
* that is, it is equivalent to the following expression:
- *
+ *
* <pre>
* getClass().getName() + '@' + Integer.toHexString(hashCode())
* </pre>
- *
+ *
* @return a printable representation of this object.
*/
public String toString() {
@@ -260,7 +260,7 @@
* When it is notified (or interrupted), it re-acquires the monitor before
* it starts running.
* </p>
- *
+ *
* @throws IllegalMonitorStateException
* if the thread calling this method is not the owner of this
* object's monitor.
@@ -293,7 +293,7 @@
* When it is notified (or interrupted), it re-acquires the monitor before
* it starts running.
* </p>
- *
+ *
* @param millis
* the maximum time to wait in milliseconds.
* @throws IllegalArgumentException
@@ -330,7 +330,7 @@
* When it is notified (or interrupted), it re-acquires the monitor before
* it starts running.
* </p>
- *
+ *
* @param millis
* the maximum time to wait in milliseconds.
* @param nanos
diff --git a/luni/src/main/java/java/lang/OutOfMemoryError.java b/luni/src/main/java/java/lang/OutOfMemoryError.java
index a8f8a2c..5b8e61a 100644
--- a/luni/src/main/java/java/lang/OutOfMemoryError.java
+++ b/luni/src/main/java/java/lang/OutOfMemoryError.java
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code OutOfMemoryError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this error.
*/
diff --git a/luni/src/main/java/java/lang/Override.java b/luni/src/main/java/java/lang/Override.java
index c4049cb..02c92eb 100644
--- a/luni/src/main/java/java/lang/Override.java
+++ b/luni/src/main/java/java/lang/Override.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/lang/Package.java b/luni/src/main/java/java/lang/Package.java
index 9ad40b8..b18c9a1 100644
--- a/luni/src/main/java/java/lang/Package.java
+++ b/luni/src/main/java/java/lang/Package.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,7 +46,7 @@
* Packages are managed by class loaders. All classes loaded by the same loader
* from the same package share a {@code Package} instance.
* </p>
- *
+ *
* @see java.lang.ClassLoader
*/
public class Package implements AnnotatedElement {
@@ -70,7 +70,7 @@
/**
* Gets the annotation associated with the specified annotation type and
* this package, if present.
- *
+ *
* @param annotationType
* the annotation type to look for.
* @return an instance of {@link Annotation} or {@code null}.
@@ -84,13 +84,13 @@
return (A) list[i];
}
}
-
+
return null;
}
/**
* Gets all annotations associated with this package, if any.
- *
+ *
* @return an array of {@link Annotation} instances, which may be empty.
* @see java.lang.reflect.AnnotatedElement#getAnnotations()
*/
@@ -100,7 +100,7 @@
/**
* Gets all annotations directly declared on this package, if any.
- *
+ *
* @return an array of {@link Annotation} instances, which may be empty.
* @see java.lang.reflect.AnnotatedElement#getDeclaredAnnotations()
*/
@@ -111,7 +111,7 @@
/*
* Returns the list of declared annotations of the given package.
* If no annotations exist, an empty array is returned.
- *
+ *
* @param pkg the package of interest
* @param publicOnly reflects whether we want only public annotation or all
* of them.
@@ -120,10 +120,10 @@
// TODO(Google) Provide proper (native) implementation.
private static native Annotation[] getDeclaredAnnotations(Package pkg,
boolean publicOnly);
-
+
/**
* Indicates whether the specified annotation is present.
- *
+ *
* @param annotationType
* the annotation type to look for.
* @return {@code true} if the annotation is present; {@code false}
@@ -138,7 +138,7 @@
/**
* Returns the title of the implementation of this package, or {@code null}
* if this is unknown. The format of this string is unspecified.
- *
+ *
* @return the implementation title, may be {@code null}.
*/
public String getImplementationTitle() {
@@ -149,7 +149,7 @@
* Returns the name of the vendor or organization that provides this
* implementation of the package, or {@code null} if this is unknown. The
* format of this string is unspecified.
- *
+ *
* @return the implementation vendor name, may be {@code null}.
*/
public String getImplementationVendor() {
@@ -159,7 +159,7 @@
/**
* Returns the version of the implementation of this package, or {@code
* null} if this is unknown. The format of this string is unspecified.
- *
+ *
* @return the implementation version, may be {@code null}.
*/
public String getImplementationVersion() {
@@ -169,7 +169,7 @@
/**
* Returns the name of this package in the standard dot notation; for
* example: "java.lang".
- *
+ *
* @return the name of this package.
*/
public String getName() {
@@ -179,7 +179,7 @@
/**
* Attempts to locate the requested package in the caller's class loader. If
* no package information can be located, {@code null} is returned.
- *
+ *
* @param packageName
* the name of the package to find.
* @return the requested package, or {@code null}.
@@ -192,7 +192,7 @@
/**
* Returns all the packages known to the caller's class loader.
- *
+ *
* @return all the packages known to the caller's class loader.
* @see ClassLoader#getPackages
*/
@@ -204,7 +204,7 @@
/**
* Returns the title of the specification this package implements, or
* {@code null} if this is unknown.
- *
+ *
* @return the specification title, may be {@code null}.
*/
public String getSpecificationTitle() {
@@ -215,7 +215,7 @@
* Returns the name of the vendor or organization that owns and maintains
* the specification this package implements, or {@code null} if this is
* unknown.
- *
+ *
* @return the specification vendor name, may be {@code null}.
*/
public String getSpecificationVendor() {
@@ -226,7 +226,7 @@
* Returns the version of the specification this package implements, or
* {@code null} if this is unknown. The version string is a sequence of
* non-negative integers separated by dots; for example: "1.2.3".
- *
+ *
* @return the specification version string, may be {@code null}.
*/
public String getSpecificationVersion() {
@@ -242,7 +242,7 @@
* Indicates whether this package's specification version is compatible with
* the specified version string. Version strings are compared by comparing
* each dot separated part of the version as an integer.
- *
+ *
* @param version
* the version string to compare against.
* @return {@code true} if the package versions are compatible; {@code
@@ -253,13 +253,13 @@
*/
public boolean isCompatibleWith(String version)
throws NumberFormatException {
- String[] requested = version.split("\\.");
- String[] provided = specVersion.split("\\.");
-
+ String[] requested = version.split("\\.");
+ String[] provided = specVersion.split("\\.");
+
for (int i = 0; i < Math.min(requested.length, provided.length); i++) {
int reqNum = Integer.parseInt(requested[i]);
int provNum = Integer.parseInt(provided[i]);
-
+
if (reqNum > provNum) {
return false;
} else if (reqNum < provNum) {
@@ -270,13 +270,13 @@
if (requested.length > provided.length) {
return false;
}
-
+
return true;
}
/**
* Indicates whether this package is sealed.
- *
+ *
* @return {@code true} if this package is sealed; {@code false} otherwise.
*/
public boolean isSealed() {
@@ -286,7 +286,7 @@
/**
* Indicates whether this package is sealed with respect to the specified
* URL.
- *
+ *
* @param url
* the URL to check.
* @return {@code true} if this package is sealed with {@code url}; {@code
diff --git a/luni/src/main/java/java/lang/Process.java b/luni/src/main/java/java/lang/Process.java
index c030fcc..5081f0f 100644
--- a/luni/src/main/java/java/lang/Process.java
+++ b/luni/src/main/java/java/lang/Process.java
@@ -37,7 +37,7 @@
/**
* Returns the exit value of the native process represented by this object.
* It is available only when the native process has terminated.
- *
+ *
* @return the exit value of this process.
* @throws IllegalThreadStateException
* if this process has not terminated.
@@ -47,7 +47,7 @@
/**
* Returns an input stream that is connected to the error stream
* <em>(stderr)</em> of the native process represented by this object.
- *
+ *
* @return the input stream to read from the error stream associated with
* the native process.
*/
@@ -56,7 +56,7 @@
/**
* Returns an input stream that is connected to the standard output stream
* <em>(stdout)</em> of the native process represented by this object.
- *
+ *
* @return the input stream to read from the output stream associated with
* the native process.
*/
@@ -65,7 +65,7 @@
/**
* Returns an output stream that is connected to the standard input stream
* <em>(stdin)</em> of the native process represented by this object.
- *
+ *
* @return the output stream to write to the input stream associated with
* the native process.
*/
@@ -74,7 +74,7 @@
/**
* Causes the calling thread to wait for the native process associated with
* this object to finish executing.
- *
+ *
* @return the exit value of the native process being waited on.
* @throws InterruptedException
* if the calling thread is interrupted.
diff --git a/luni/src/main/java/java/lang/ProcessBuilder.java b/luni/src/main/java/java/lang/ProcessBuilder.java
index feaf719..65e66c0 100644
--- a/luni/src/main/java/java/lang/ProcessBuilder.java
+++ b/luni/src/main/java/java/lang/ProcessBuilder.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -196,7 +196,7 @@
String[] envArray = new String[environment.size()];
int i = 0;
for (Map.Entry<String, String> entry : environment.entrySet()) {
- envArray[i++] = entry.getKey() + "=" + entry.getValue();
+ envArray[i++] = entry.getKey() + "=" + entry.getValue();
}
return ProcessManager.getInstance().exec(cmdArray, envArray, directory, redirectErrorStream);
// END android-changed
diff --git a/luni/src/main/java/java/lang/ProcessManager.java b/luni/src/main/java/java/lang/ProcessManager.java
index 318fe9a..7a9fc13 100644
--- a/luni/src/main/java/java/lang/ProcessManager.java
+++ b/luni/src/main/java/java/lang/ProcessManager.java
@@ -223,7 +223,7 @@
try {
pid = exec(command, environment, workingPath, in, out, err, redirectErrorStream);
} catch (IOException e) {
- IOException wrapper = new IOException("Error running exec()."
+ IOException wrapper = new IOException("Error running exec()."
+ " Command: " + Arrays.toString(command)
+ " Working Directory: " + workingDirectory
+ " Environment: " + Arrays.toString(environment));
@@ -321,7 +321,7 @@
@Override
public String toString() {
- return "Process[id=" + id + "]";
+ return "Process[id=" + id + "]";
}
}
diff --git a/luni/src/main/java/java/lang/Readable.java b/luni/src/main/java/java/lang/Readable.java
index b536f59..2901e73 100644
--- a/luni/src/main/java/java/lang/Readable.java
+++ b/luni/src/main/java/java/lang/Readable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
/**
* Reads characters into the specified {@code CharBuffer}. The maximum
* number of characters read is {@code CharBuffer.remaining()}.
- *
+ *
* @param cb
* the buffer to be filled with characters read.
* @return the number of characters actually read, or -1 if this
diff --git a/luni/src/main/java/java/lang/Runtime.java b/luni/src/main/java/java/lang/Runtime.java
index 6d928f7..b68dd24 100644
--- a/luni/src/main/java/java/lang/Runtime.java
+++ b/luni/src/main/java/java/lang/Runtime.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,11 +56,11 @@
* Allows Java applications to interface with the environment in which they are
* running. Applications can not create an instance of this class, but they can
* get a singleton instance by invoking {@link #getRuntime()}.
- *
+ *
* @see System
*/
public class Runtime {
-
+
/**
* Holds the Singleton global instance of Runtime.
*/
@@ -70,7 +70,7 @@
* Holds the library paths, used for native library lookup.
*/
private final String[] mLibPaths;
-
+
/**
* Holds the list of threads to run when the VM terminates
*/
@@ -81,17 +81,17 @@
* when the VM terminates.
*/
private static boolean finalizeOnExit;
-
+
/**
* Reflects whether we are already shutting down the VM.
- */
+ */
private boolean shuttingDown;
/**
* Reflects whether we are tracing method calls.
*/
private boolean tracingMethods;
-
+
/**
* Prevent this class from being instantiated.
*/
@@ -116,12 +116,12 @@
System.out.println(" " + mLibPaths[i]);
}
}
-
+
/**
* Executes the specified command and its arguments in a separate native
* process. The new process inherits the environment of the caller. Calling
* this method is equivalent to calling {@code exec(progArray, null, null)}.
- *
+ *
* @param progArray
* the array containing the program to execute as well as any
* arguments to the program.
@@ -143,7 +143,7 @@
* process. The new process uses the environment provided in {@code envp}.
* Calling this method is equivalent to calling
* {@code exec(progArray, envp, null)}.
- *
+ *
* @param progArray
* the array containing the program to execute as well as any
* arguments to the program.
@@ -158,7 +158,7 @@
* if the current {@code SecurityManager} disallows program
* execution.
* @see SecurityManager#checkExec
- */
+ */
public Process exec(String[] progArray, String[] envp) throws java.io.IOException {
return exec(progArray, envp, null);
}
@@ -167,7 +167,7 @@
* Executes the specified command and its arguments in a separate native
* process. The new process uses the environment provided in {@code envp}
* and the working directory specified by {@code directory}.
- *
+ *
* @param progArray
* the array containing the program to execute as well as any
* arguments to the program.
@@ -196,7 +196,7 @@
* Executes the specified program in a separate native process. The new
* process inherits the environment of the caller. Calling this method is
* equivalent to calling {@code exec(prog, null, null)}.
- *
+ *
* @param prog
* the name of the program to execute.
* @return the new {@code Process} object that represents the native
@@ -216,7 +216,7 @@
* Executes the specified program in a separate native process. The new
* process uses the environment provided in {@code envp}. Calling this
* method is equivalent to calling {@code exec(prog, envp, null)}.
- *
+ *
* @param prog
* the name of the program to execute.
* @param envp
@@ -239,7 +239,7 @@
* Executes the specified program in a separate native process. The new
* process uses the environment provided in {@code envp} and the working
* directory specified by {@code directory}.
- *
+ *
* @param prog
* the name of the program to execute.
* @param envp
@@ -264,7 +264,7 @@
} else if (prog.length() == 0) {
throw new IllegalArgumentException();
}
-
+
// Break down into tokens, as described in Java docs
StringTokenizer tokenizer = new StringTokenizer(prog);
int length = tokenizer.countTokens();
@@ -272,7 +272,7 @@
for (int i = 0; i < length; i++) {
progArray[i] = tokenizer.nextToken();
}
-
+
// Delegate
return exec(progArray, envp, directory);
}
@@ -282,7 +282,7 @@
* {@link #runFinalizersOnExit(boolean)} has been previously invoked with a
* {@code true} argument, then all objects will be properly
* garbage-collected and finalized first.
- *
+ *
* @param code
* the return code. By convention, non-zero return codes indicate
* abnormal terminations.
@@ -338,7 +338,7 @@
/**
* Returns the amount of free memory resources which are available to the
* running program.
- *
+ *
* @return the approximate amount of free memory, measured in bytes.
*/
public native long freeMemory();
@@ -352,7 +352,7 @@
/**
* Returns the single {@code Runtime} instance.
- *
+ *
* @return the {@code Runtime} object for the current application.
*/
public static Runtime getRuntime() {
@@ -364,7 +364,7 @@
* specified path. This method is similar to {@link #loadLibrary(String)},
* but it accepts a full path specification whereas {@code loadLibrary} just
* accepts the name of the library to load.
- *
+ *
* @param pathName
* the absolute (platform dependent) path to the library to load.
* @throws UnsatisfiedLinkError
@@ -396,12 +396,12 @@
"Library " + filename + " not found");
}
}
-
+
/**
* Loads and links the library with the specified name. The mapping of the
* specified library name to the full path for loading the library is
* implementation-dependent.
- *
+ *
* @param libName
* the name of the library to load.
* @throws UnsatisfiedLinkError
@@ -445,15 +445,15 @@
throw new UnsatisfiedLinkError("Library " + libname + " not found");
}
-
+
private static native void nativeExit(int code, boolean isExit);
-
+
private static native boolean nativeLoad(String filename,
ClassLoader loader);
-
+
/**
* Requests proper finalization for all Objects on the heap.
- *
+ *
* @param forced Decides whether the VM really needs to do this (true)
* or if this is just a suggestion that can safely be ignored
* (false).
@@ -463,7 +463,7 @@
/**
* Provides a hint to the virtual machine that it would be useful to attempt
* to perform any outstanding object finalizations.
- *
+ *
*/
public void runFinalization() {
runFinalization(false);
@@ -474,7 +474,7 @@
* virtual machine is about to exit. Note that all finalization which occurs
* when the system is exiting is performed after all running threads have
* been terminated.
- *
+ *
* @param run
* {@code true} to enable finalization on exit, {@code false} to
* disable it.
@@ -492,7 +492,7 @@
/**
* Returns the total amount of memory which is available to the running
* program.
- *
+ *
* @return the total amount of memory, measured in bytes.
*/
public native long totalMemory();
@@ -500,7 +500,7 @@
/**
* Switches the output of debug information for instructions on or off.
* For the Android 1.0 reference implementation, this method does nothing.
- *
+ *
* @param enable
* {@code true} to switch tracing on, {@code false} to switch it
* off.
@@ -512,7 +512,7 @@
/**
* Switches the output of debug information for methods on or off.
- *
+ *
* @param enable
* {@code true} to switch tracing on, {@code false} to switch it
* off.
@@ -533,7 +533,7 @@
* stream that is returned automatically converts all characters from the
* local character set to Unicode after reading them from the underlying
* stream.
- *
+ *
* @param stream
* the input stream to localize.
* @return the localized input stream.
@@ -552,12 +552,12 @@
* stream that is returned automatically converts all characters from
* Unicode to the local character set before writing them to the underlying
* stream.
- *
+ *
* @param stream
* the output stream to localize.
* @return the localized output stream.
* @deprecated Use {@link OutputStreamWriter}.
- */
+ */
@Deprecated
public OutputStream getLocalizedOutputStream(OutputStream stream) {
if (System.getProperty("file.encoding", "UTF-8").equals("UTF-8")) {
@@ -591,7 +591,7 @@
* It is recommended that shutdown hooks do not do any time-consuming
* activities, in order to not hold up the shutdown process longer than
* necessary.
- *
+ *
* @param hook
* the shutdown hook to register.
* @throws IllegalArgumentException
@@ -621,19 +621,19 @@
if (sm != null) {
sm.checkPermission(new RuntimePermission("shutdownHooks"));
}
-
+
synchronized (shutdownHooks) {
if (shutdownHooks.contains(hook)) {
throw new IllegalArgumentException("Hook already registered.");
}
-
+
shutdownHooks.add(hook);
}
}
/**
* Unregisters a previously registered virtual machine shutdown hook.
- *
+ *
* @param hook
* the shutdown hook to remove.
* @return {@code true} if the hook has been removed successfully; {@code
@@ -649,7 +649,7 @@
if (hook == null) {
throw new NullPointerException("Hook may not be null.");
}
-
+
if (shuttingDown) {
throw new IllegalStateException("VM already shutting down");
}
@@ -667,7 +667,7 @@
/**
* Causes the virtual machine to stop running, and the program to exit.
* Neither shutdown hooks nor finalizers are run before.
- *
+ *
* @param code
* the return code. By convention, non-zero return codes indicate
* abnormal terminations.
@@ -685,7 +685,7 @@
if (smgr != null) {
smgr.checkExit(code);
}
-
+
// Get out of here...
nativeExit(code, false);
}
@@ -693,7 +693,7 @@
/**
* Returns the number of processors available to the virtual machine. The
* Android reference implementation (currently) always returns 1.
- *
+ *
* @return the number of available processors, at least 1.
*/
public int availableProcessors() {
@@ -703,7 +703,7 @@
/**
* Returns the maximum amount of memory that may be used by the virtual
* machine, or {@code Long.MAX_VALUE} if there is no such limit.
- *
+ *
* @return the maximum amount of memory that the virtual machine will try to
* allocate, measured in bytes.
*/
@@ -718,19 +718,19 @@
class ReaderInputStream extends InputStream {
private Reader reader;
-
+
private Writer writer;
ByteArrayOutputStream out = new ByteArrayOutputStream(256);
-
+
private byte[] bytes;
-
+
private int nextByte;
-
+
private int numBytes;
-
+
String encoding = System.getProperty("file.encoding", "UTF-8");
-
+
public ReaderInputStream(InputStream stream) {
try {
reader = new InputStreamReader(stream, "UTF-8");
@@ -764,8 +764,8 @@
bytes = out.toByteArray();
numBytes = bytes.length;
nextByte = 0;
- }
-
+ }
+
}
/*
diff --git a/luni/src/main/java/java/lang/RuntimeException.java b/luni/src/main/java/java/lang/RuntimeException.java
index 9229b0c..976e2af 100644
--- a/luni/src/main/java/java/lang/RuntimeException.java
+++ b/luni/src/main/java/java/lang/RuntimeException.java
@@ -25,7 +25,7 @@
* not require code to handle runtime exceptions.
*/
public class RuntimeException extends Exception {
-
+
private static final long serialVersionUID = -7034897190745766939L;
/**
@@ -39,7 +39,7 @@
/**
* Constructs a new {@code RuntimeException} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
@@ -50,7 +50,7 @@
/**
* Constructs a new {@code RuntimeException} with the current stack trace,
* the specified detail message and the specified cause.
- *
+ *
* @param detailMessage
* the detail message for this exception.
* @param throwable
@@ -63,7 +63,7 @@
/**
* Constructs a new {@code RuntimeException} with the current stack trace
* and the specified cause.
- *
+ *
* @param throwable
* the cause of this exception.
*/
diff --git a/luni/src/main/java/java/lang/RuntimePermission.java b/luni/src/main/java/java/lang/RuntimePermission.java
index 0382cad..a6714e8 100644
--- a/luni/src/main/java/java/lang/RuntimePermission.java
+++ b/luni/src/main/java/java/lang/RuntimePermission.java
@@ -32,53 +32,53 @@
* Constants for runtime permissions used in this package.
*/
static final RuntimePermission permissionToSetSecurityManager = new RuntimePermission(
- "setSecurityManager");
+ "setSecurityManager");
static final RuntimePermission permissionToCreateSecurityManager = new RuntimePermission(
- "createSecurityManager");
+ "createSecurityManager");
static final RuntimePermission permissionToGetProtectionDomain = new RuntimePermission(
- "getProtectionDomain");
+ "getProtectionDomain");
static final RuntimePermission permissionToGetClassLoader = new RuntimePermission(
- "getClassLoader");
+ "getClassLoader");
static final RuntimePermission permissionToCreateClassLoader = new RuntimePermission(
- "createClassLoader");
+ "createClassLoader");
static final RuntimePermission permissionToModifyThread = new RuntimePermission(
- "modifyThread");
+ "modifyThread");
static final RuntimePermission permissionToModifyThreadGroup = new RuntimePermission(
- "modifyThreadGroup");
+ "modifyThreadGroup");
static final RuntimePermission permissionToExitVM = new RuntimePermission(
- "exitVM");
+ "exitVM");
static final RuntimePermission permissionToReadFileDescriptor = new RuntimePermission(
- "readFileDescriptor");
+ "readFileDescriptor");
static final RuntimePermission permissionToWriteFileDescriptor = new RuntimePermission(
- "writeFileDescriptor");
+ "writeFileDescriptor");
static final RuntimePermission permissionToQueuePrintJob = new RuntimePermission(
- "queuePrintJob");
+ "queuePrintJob");
static final RuntimePermission permissionToSetFactory = new RuntimePermission(
- "setFactory");
+ "setFactory");
static final RuntimePermission permissionToSetIO = new RuntimePermission(
- "setIO");
+ "setIO");
static final RuntimePermission permissionToStopThread = new RuntimePermission(
- "stopThread");
+ "stopThread");
static final RuntimePermission permissionToSetContextClassLoader = new RuntimePermission(
- "setContextClassLoader");
+ "setContextClassLoader");
/**
* Creates an instance of {@code RuntimePermission} with the specified name.
- *
+ *
* @param permissionName
* the name of the new permission.
*/
@@ -89,7 +89,7 @@
/**
* Creates an instance of {@code RuntimePermission} with the specified name
* and action list. The action list is ignored.
- *
+ *
* @param name
* the name of the new permission.
* @param actions
diff --git a/luni/src/main/java/java/lang/SecurityException.java b/luni/src/main/java/java/lang/SecurityException.java
index c977be0..fdcf19d 100644
--- a/luni/src/main/java/java/lang/SecurityException.java
+++ b/luni/src/main/java/java/lang/SecurityException.java
@@ -35,18 +35,18 @@
/**
* Constructs a new {@code SecurityException} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
public SecurityException(String detailMessage) {
super(detailMessage);
}
-
+
/**
* Constructs a new {@code SecurityException} with the current stack trace,
* the specified detail message and the specified cause.
- *
+ *
* @param message
* the detail message for this exception.
* @param cause
@@ -56,11 +56,11 @@
public SecurityException(String message, Throwable cause) {
super(message, cause);
}
-
+
/**
* Constructs a new {@code SecurityException} with the current stack trace
* and the specified cause.
- *
+ *
* @param cause
* the optional cause of this exception, may be {@code null}.
* @since 1.5
diff --git a/luni/src/main/java/java/lang/SecurityManager.java b/luni/src/main/java/java/lang/SecurityManager.java
index e2e224f..a31b9b6 100644
--- a/luni/src/main/java/java/lang/SecurityManager.java
+++ b/luni/src/main/java/java/lang/SecurityManager.java
@@ -57,11 +57,11 @@
public class SecurityManager {
private static final PropertyPermission READ_WRITE_ALL_PROPERTIES_PERMISSION = new PropertyPermission(
- "*", "read,write");
+ "*", "read,write");
- private static final String PKG_ACC_KEY = "package.access";
+ private static final String PKG_ACC_KEY = "package.access";
- private static final String PKG_DEF_KEY = "package.definition";
+ private static final String PKG_DEF_KEY = "package.definition";
/**
* Flag to indicate whether a security check is in progress.
@@ -107,7 +107,7 @@
if (host == null) {
throw new NullPointerException();
}
- checkPermission(new SocketPermission(host + ':' + port, "accept"));
+ checkPermission(new SocketPermission(host + ':' + port, "accept"));
}
/**
@@ -168,9 +168,9 @@
throw new NullPointerException();
}
if (port > 0) {
- checkPermission(new SocketPermission(host + ':' + port, "connect"));
+ checkPermission(new SocketPermission(host + ':' + port, "connect"));
} else {
- checkPermission(new SocketPermission(host, "resolve"));
+ checkPermission(new SocketPermission(host, "resolve"));
}
}
@@ -198,10 +198,10 @@
}
// END android-added
if (port > 0) {
- checkPermission(new SocketPermission(host + ':' + port, "connect"),
+ checkPermission(new SocketPermission(host + ':' + port, "connect"),
context);
} else {
- checkPermission(new SocketPermission(host, "resolve"), context);
+ checkPermission(new SocketPermission(host, "resolve"), context);
}
}
@@ -226,7 +226,7 @@
* if the calling thread is not allowed to delete {@code file}.
*/
public void checkDelete(String file) {
- checkPermission(new FilePermission(file, "delete"));
+ checkPermission(new FilePermission(file, "delete"));
}
/**
@@ -240,7 +240,7 @@
*/
public void checkExec(String cmd) {
checkPermission(new FilePermission(new File(cmd).isAbsolute() ? cmd
- : "<<ALL FILES>>", "execute"));
+ : "<<ALL FILES>>", "execute"));
}
/**
@@ -271,7 +271,7 @@
if (libName == null) {
throw new NullPointerException();
}
- checkPermission(new RuntimePermission("loadLibrary." + libName));
+ checkPermission(new RuntimePermission("loadLibrary." + libName));
}
/**
@@ -285,9 +285,9 @@
*/
public void checkListen(int port) {
if (port == 0) {
- checkPermission(new SocketPermission("localhost:1024-", "listen"));
+ checkPermission(new SocketPermission("localhost:1024-", "listen"));
} else {
- checkPermission(new SocketPermission("localhost:" + port, "listen"));
+ checkPermission(new SocketPermission("localhost:" + port, "listen"));
}
}
@@ -332,7 +332,7 @@
}
// Forward off to the permission mechanism.
- checkPermission(new RuntimePermission("accessDeclaredMembers"));
+ checkPermission(new RuntimePermission("accessDeclaredMembers"));
}
/**
@@ -346,7 +346,7 @@
*/
public void checkMulticast(InetAddress maddr) {
checkPermission(new SocketPermission(maddr.getHostAddress(),
- "accept,connect"));
+ "accept,connect"));
}
/**
@@ -365,7 +365,7 @@
@Deprecated
public void checkMulticast(InetAddress maddr, byte ttl) {
checkPermission(new SocketPermission(maddr.getHostAddress(),
- "accept,connect"));
+ "accept,connect"));
}
/**
@@ -383,7 +383,7 @@
throw new NullPointerException();
}
if (checkPackageProperty(PKG_ACC_KEY, packageName)) {
- checkPermission(new RuntimePermission("accessClassInPackage."
+ checkPermission(new RuntimePermission("accessClassInPackage."
+ packageName));
}
}
@@ -403,7 +403,7 @@
throw new NullPointerException();
}
if (checkPackageProperty(PKG_DEF_KEY, packageName)) {
- checkPermission(new RuntimePermission("defineClassInPackage."
+ checkPermission(new RuntimePermission("defineClassInPackage."
+ packageName));
}
}
@@ -418,7 +418,7 @@
.getSecurityProperty(property));
if (list != null) {
int plen = pkg.length();
- String[] tokens = list.split(", *");
+ String[] tokens = list.split(", *");
for (String token : tokens) {
int tlen = token.length();
if (plen > tlen
@@ -460,7 +460,7 @@
* key} system property.
*/
public void checkPropertyAccess(String key) {
- checkPermission(new PropertyPermission(key, "read"));
+ checkPermission(new PropertyPermission(key, "read"));
}
/**
@@ -490,7 +490,7 @@
* file}.
*/
public void checkRead(String file) {
- checkPermission(new FilePermission(file, "read"));
+ checkPermission(new FilePermission(file, "read"));
}
/**
@@ -505,7 +505,7 @@
* if {@code context} is not allowed to read from {@code file}.
*/
public void checkRead(String file, Object context) {
- checkPermission(new FilePermission(file, "read"), context);
+ checkPermission(new FilePermission(file, "read"), context);
}
/**
@@ -550,11 +550,11 @@
throw new NullPointerException();
}
try {
- Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
+ Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
Constructor<?> constructor = awtPermission
.getConstructor(String.class);
Object perm = constructor
- .newInstance("showWindowWithoutWarningBanner");
+ .newInstance("showWindowWithoutWarningBanner");
checkPermission((Permission) perm);
} catch (ClassNotFoundException e) {
} catch (NoSuchMethodException e) {
@@ -577,10 +577,10 @@
*/
public void checkSystemClipboardAccess() {
try {
- Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
+ Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
Constructor<?> constructor = awtPermission
.getConstructor(String.class);
- Object perm = constructor.newInstance("accessClipboard");
+ Object perm = constructor.newInstance("accessClipboard");
checkPermission((Permission) perm);
return;
} catch (ClassNotFoundException e) {
@@ -602,10 +602,10 @@
*/
public void checkAwtEventQueueAccess() {
try {
- Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
+ Class<?> awtPermission = Class.forName("java.awt.AWTPermission");
Constructor<?> constructor = awtPermission
.getConstructor(String.class);
- Object perm = constructor.newInstance("accessEventQueue");
+ Object perm = constructor.newInstance("accessEventQueue");
checkPermission((Permission) perm);
return;
} catch (ClassNotFoundException e) {
@@ -655,7 +655,7 @@
* {@code file}.
*/
public void checkWrite(String file) {
- checkPermission(new FilePermission(file, "write"));
+ checkPermission(new FilePermission(file, "write"));
}
/**
diff --git a/luni/src/main/java/java/lang/StackOverflowError.java b/luni/src/main/java/java/lang/StackOverflowError.java
index 3cbc0c7..0ca5ff0 100644
--- a/luni/src/main/java/java/lang/StackOverflowError.java
+++ b/luni/src/main/java/java/lang/StackOverflowError.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code StackOverflowError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/StackTraceElement.java b/luni/src/main/java/java/lang/StackTraceElement.java
index 88fe1ab..a899a92 100644
--- a/luni/src/main/java/java/lang/StackTraceElement.java
+++ b/luni/src/main/java/java/lang/StackTraceElement.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,7 +23,7 @@
* A representation of a single stack frame. Arrays of {@code StackTraceElement}
* are stored in {@link Throwable} objects to represent the whole state of the
* call stack at the time a {@code Throwable} gets thrown.
- *
+ *
* @see Throwable#getStackTrace()
*/
public final class StackTraceElement implements Serializable {
@@ -33,7 +33,7 @@
// BEGIN android-added
private static final int NATIVE_LINE_NUMBER = -2;
// END android-added
-
+
String declaringClass;
String methodName;
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code StackTraceElement} for a specified execution
* point.
- *
+ *
* @param cls
* the fully qualified name of the class where execution is at.
* @param method
@@ -90,7 +90,7 @@
* <li>the class, method and file names as well as the line number of this
* stack trace element and of {@code obj} must be equal.</li>
* </ul>
- *
+ *
* @param obj
* the object to compare this instance with.
* @return {@code true} if the specified object is equal to this
@@ -138,7 +138,7 @@
/**
* Returns the fully qualified name of the class belonging to this
* {@code StackTraceElement}.
- *
+ *
* @return the fully qualified type name of the class
*/
public String getClassName() {
@@ -148,7 +148,7 @@
/**
* Returns the name of the Java source file containing class belonging to
* this {@code StackTraceElement}.
- *
+ *
* @return the name of the file, or {@code null} if this information is not
* available.
*/
@@ -159,7 +159,7 @@
/**
* Returns the line number in the source for the class belonging to this
* {@code StackTraceElement}.
- *
+ *
* @return the line number, or a negative number if this information is not
* available.
*/
@@ -170,7 +170,7 @@
/**
* Returns the name of the method belonging to this {@code
* StackTraceElement}.
- *
+ *
* @return the name of the method, or "<unknown method>" if this information
* is not available.
*/
@@ -195,7 +195,7 @@
/**
* Indicates if the method name returned by {@link #getMethodName()} is
* implemented as a native method.
- *
+ *
* @return {@code true} if the method in which this stack trace element is
* executing is a native method; {@code false} otherwise.
*/
diff --git a/luni/src/main/java/java/lang/StrictMath.java b/luni/src/main/java/java/lang/StrictMath.java
index cd8c40b..52f93bd 100644
--- a/luni/src/main/java/java/lang/StrictMath.java
+++ b/luni/src/main/java/java/lang/StrictMath.java
@@ -44,10 +44,10 @@
private static final int DOUBLE_EXPONENT_BITS = 12;
private static final int DOUBLE_MANTISSA_BITS = 52;
-
+
private static final int FLOAT_EXPONENT_BITS = 9;
-
- private static final int FLOAT_MANTISSA_BITS = 23;
+
+ private static final int FLOAT_MANTISSA_BITS = 23;
private static final int DOUBLE_EXPONENT_BIAS = 1023;
@@ -240,7 +240,7 @@
* @return the arc tangent of {@code y/x}.
*/
public static native double atan2(double y, double x);
-
+
/**
* Returns the closest double approximation of the cube root of the
* argument.
@@ -279,8 +279,8 @@
* @return the ceiling of the argument.
*/
public static native double ceil(double d);
-
-
+
+
/**
* Returns the closest double approximation of the hyperbolic cosine of the
* argument.
@@ -330,7 +330,7 @@
* @return the exponential of the argument.
*/
public static native double exp(double d);
-
+
/**
* Returns the closest double approximation of <i>{@code e}</i><sup>
* {@code d}</sup>{@code - 1}. If the argument is very close to 0, it is
@@ -371,7 +371,7 @@
* @return the floor of the argument.
*/
public static native double floor(double d);
-
+
/**
* Returns {@code sqrt(}<i>{@code x}</i><sup>{@code 2}</sup>{@code +}
* <i> {@code y}</i><sup>{@code 2}</sup>{@code )}. The final result is
@@ -442,7 +442,7 @@
* @return the natural logarithm of the argument.
*/
public static native double log(double d);
-
+
/**
* Returns the closest double approximation of the base 10 logarithm of the
* argument.
@@ -462,7 +462,7 @@
* @return the natural logarithm of the argument.
*/
public static native double log10(double d);
-
+
/**
* Returns the closest double approximation of the natural logarithm of the
* sum of the argument and 1. If the argument is very close to 0, it is much
@@ -788,7 +788,7 @@
public static int round(float f) {
return Math.round(f);
}
-
+
/**
* Returns the signum function of the argument. If the argument is less than
* zero, it returns -1.0. If the argument is greater than zero, 1.0 is
@@ -811,7 +811,7 @@
public static double signum(double d){
return Math.signum(d);
}
-
+
/**
* Returns the signum function of the argument. If the argument is less than
* zero, it returns -1.0. If the argument is greater than zero, 1.0 is
@@ -853,7 +853,7 @@
* @return the hyperbolic sine of the argument.
*/
public static native double sinh(double d);
-
+
/**
* Returns the closest double approximation of the sine of the argument.
* <p>
@@ -927,7 +927,7 @@
* @return the hyperbolic tangent of the argument
*/
public static native double tanh(double d);
-
+
/**
* Returns the measure in degrees of the supplied radian angle. The result
* is {@code angrad * 180 / pi}.
@@ -969,7 +969,7 @@
public static double toRadians(double angdeg) {
return Math.toRadians(angdeg);
}
-
+
/**
* Returns the argument's ulp (unit in the last place). The size of a ulp of
* a double value is the positive distance between this value and the double
@@ -1034,8 +1034,8 @@
private native static double nextafter(double x, double y);
- private native static float nextafterf(float x, float y);
-
+ private native static float nextafterf(float x, float y);
+
/**
* Returns a double with the given magnitude and the sign of {@code sign}.
* If {@code sign} is NaN, the sign of the result is positive.
@@ -1064,7 +1064,7 @@
public static int getExponent(float f) {
return Math.getExponent(f);
}
-
+
/**
* Returns the exponent of double {@code d}.
* @since 1.6
@@ -1073,7 +1073,7 @@
public static int getExponent(double d){
return Math.getExponent(d);
}
-
+
/**
* Returns the next double after {@code start} in the given {@code direction}.
* @since 1.6
@@ -1103,7 +1103,7 @@
public static double nextUp(double d) {
return Math.nextUp(d);
}
-
+
/**
* Returns the next float larger than {@code f}.
* @since 1.6
@@ -1112,7 +1112,7 @@
public static float nextUp(float f) {
return Math.nextUp(f);
}
-
+
/**
* Returns {@code d} * 2^{@code scaleFactor}. The result may be rounded.
* @since 1.6
diff --git a/luni/src/main/java/java/lang/String.java b/luni/src/main/java/java/lang/String.java
index 4c26585..7e9a3cd 100644
--- a/luni/src/main/java/java/lang/String.java
+++ b/luni/src/main/java/java/lang/String.java
@@ -128,7 +128,7 @@
* specified by the file.encoding system property. If the system property is
* not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If 8859-1
* is not available, an ASCII encoding is used.
- *
+ *
* @param data
* the byte array to convert to a string.
*/
@@ -139,7 +139,7 @@
/**
* Converts the byte array to a string, setting the high byte of every
* character to the specified value.
- *
+ *
* @param data
* the byte array to convert to a string.
* @param high
@@ -159,7 +159,7 @@
* specified by the file.encoding system property. If the system property is
* not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If 8859-1
* is not available, an ASCII encoding is used.
- *
+ *
* @param data
* the byte array to convert to a string.
* @param start
@@ -234,7 +234,7 @@
/**
* Converts the byte array to a string using the specified encoding.
- *
+ *
* @param data
* the byte array to convert to a string.
* @param start
@@ -403,7 +403,7 @@
/**
* Converts the byte array to a string using the specified encoding.
- *
+ *
* @param data
* the byte array to convert to a string.
* @param encoding
@@ -419,7 +419,7 @@
/**
* Converts the byte array to a String using the specified encoding.
- *
+ *
* @param data
* the byte array to convert to a String
* @param start
@@ -428,13 +428,13 @@
* the number of bytes to convert
* @param encoding
* the encoding
- *
+ *
* @throws IndexOutOfBoundsException
* when <code>length < 0, start < 0</code> or
* <code>start + length > data.length</code>
* @throws NullPointerException
* when data is null
- *
+ *
* @see #getBytes()
* @see #getBytes(int, int, byte[], int)
* @see #getBytes(String)
@@ -467,15 +467,15 @@
/**
* Converts the byte array to a String using the specified encoding.
- *
+ *
* @param data
* the byte array to convert to a String
* @param encoding
* the encoding
- *
+ *
* @throws NullPointerException
* when data is null
- *
+ *
* @see #getBytes()
* @see #getBytes(int, int, byte[], int)
* @see #getBytes(String)
@@ -494,12 +494,12 @@
public String(byte[] data, Charset encoding) {
this(data, 0, data.length, encoding);
}
-
+
/**
* Initializes this string to contain the characters in the specified
* character array. Modifying the character array after creating the string
* has no effect on the string.
- *
+ *
* @param data
* the array of characters.
* @throws NullPointerException
@@ -513,7 +513,7 @@
* Initializes this string to contain the specified characters in the
* character array. Modifying the character array after creating the string
* has no effect on the string.
- *
+ *
* @param data
* the array of characters.
* @param start
@@ -551,7 +551,7 @@
/**
* Creates a {@code String} that is a copy of the specified string.
- *
+ *
* @param string
* the string to copy.
*/
@@ -605,7 +605,7 @@
/**
* Creates a {@code String} from the contents of the specified
* {@code StringBuffer}.
- *
+ *
* @param stringbuffer
* the buffer to get the contents from.
*/
@@ -658,7 +658,7 @@
/**
* Creates a {@code String} from the contents of the specified {@code
* StringBuilder}.
- *
+ *
* @param sb
* the {@code StringBuilder} to copy the contents from.
* @throws NullPointerException
@@ -694,7 +694,7 @@
/**
* Returns the character at the specified offset in this string.
- *
+ *
* @param index
* the zero-based index in this string.
* @return the character at the index.
@@ -730,7 +730,7 @@
* Unicode value which is greater than the Unicode value of the character at
* the same position in the specified string, or if the specified string is
* a prefix of this string.
- *
+ *
* @param string
* the string to compare.
* @return 0 if the strings are equal, a negative integer if this string is
@@ -763,7 +763,7 @@
* this string has a Unicode value which is greater than the Unicode value
* of the character at the same position in the specified string, or if the
* specified string is a prefix of this string.
- *
+ *
* @param string
* the string to compare.
* @return 0 if the strings are equal, a negative integer if this string is
@@ -792,7 +792,7 @@
/**
* Concatenates this string and the specified string.
- *
+ *
* @param string
* the string to concatenate
* @return a new string which is the concatenation of this string and the
@@ -813,7 +813,7 @@
* Creates a new string containing the characters in the specified character
* array. Modifying the character array after creating the string has no
* effect on the string.
- *
+ *
* @param data
* the array of characters.
* @return the new string.
@@ -828,7 +828,7 @@
* Creates a new string containing the specified characters in the character
* array. Modifying the character array after creating the string has no
* effect on the string.
- *
+ *
* @param data
* the array of characters.
* @param start
@@ -870,7 +870,7 @@
/**
* Compares the specified string to this string to determine if the
* specified string is a suffix.
- *
+ *
* @param suffix
* the suffix to look for.
* @return {@code true} if the specified string is a suffix of this string,
@@ -886,7 +886,7 @@
* Compares the specified object to this string and returns true if they are
* equal. The object must be an instance of string with the same characters
* in the same order.
- *
+ *
* @param object
* the object to compare.
* @return {@code true} if the specified object is equal to this string,
@@ -926,7 +926,7 @@
/**
* Compares the specified string to this string ignoring the case of the
* characters and returns true if they are equal.
- *
+ *
* @param string
* the string to compare.
* @return {@code true} if the specified string is equal to this string,
@@ -960,7 +960,7 @@
* specified by the file.encoding system property. If the system property is
* not defined, the default encoding is ISO8859_1 (ISO-Latin-1). If 8859-1
* is not available, an ASCII encoding is used.
- *
+ *
* @return the byte array encoding of this string.
*/
public byte[] getBytes() {
@@ -970,7 +970,7 @@
/**
* Converts this string to a byte array, ignoring the high order bits of
* each character.
- *
+ *
* @param start
* the starting offset of characters to copy.
* @param end
@@ -1004,7 +1004,7 @@
/**
* Converts this string to a byte array using the specified encoding.
- *
+ *
* @param encoding
* the encoding to use.
* @return the encoded byte array of this string.
@@ -1036,9 +1036,9 @@
/**
* Returns a new byte array containing the characters of this string encoded in the
* given charset.
- *
+ *
* @param encoding the encoding
- *
+ *
* @since 1.6
* @hide
*/
@@ -1053,7 +1053,7 @@
/**
* Copies the specified characters in this string to the character array
* starting at the specified offset in the character array.
- *
+ *
* @param start
* the starting offset of characters to copy.
* @param end
@@ -1115,7 +1115,7 @@
* Searches in this string for the first index of the specified character.
* The search for the character starts at the beginning and moves towards
* the end of this string.
- *
+ *
* @param c
* the character to find.
* @return the index in this string of the specified character, -1 if the
@@ -1133,7 +1133,7 @@
* Searches in this string for the index of the specified character. The
* search for the character starts at the specified offset and moves towards
* the end of this string.
- *
+ *
* @param c
* the character to find.
* @param start
@@ -1181,7 +1181,7 @@
* Searches in this string for the first index of the specified string. The
* search for the string starts at the beginning and moves towards the end
* of this string.
- *
+ *
* @param string
* the string to find.
* @return the index of the first character of the specified string in this
@@ -1226,7 +1226,7 @@
* Searches in this string for the index of the specified string. The search
* for the string starts at the specified offset and moves towards the end
* of this string.
- *
+ *
* @param subString
* the string to find.
* @param start
@@ -1276,14 +1276,14 @@
* If the string is not in the table, it is added. Returns the string
* contained in the table which is equal to this string. The same string
* object is always returned for strings which are equal.
- *
+ *
* @return the interned string equal to this string.
*/
native public String intern();
/**
* Returns true if the length of this string is 0.
- *
+ *
* @since 1.6
* @hide
*/
@@ -1295,7 +1295,7 @@
* Searches in this string for the last index of the specified character.
* The search for the character starts at the end and moves towards the
* beginning of this string.
- *
+ *
* @param c
* the character to find.
* @return the index in this string of the specified character, -1 if the
@@ -1322,7 +1322,7 @@
* Searches in this string for the index of the specified character. The
* search for the character starts at the specified offset and moves towards
* the beginning of this string.
- *
+ *
* @param c
* the character to find.
* @param start
@@ -1365,7 +1365,7 @@
* Searches in this string for the last index of the specified string. The
* search for the string starts at the end and moves towards the beginning
* of this string.
- *
+ *
* @param string
* the string to find.
* @return the index of the first character of the specified string in this
@@ -1382,7 +1382,7 @@
* Searches in this string for the index of the specified string. The search
* for the string starts at the specified offset and moves towards the
* beginning of this string.
- *
+ *
* @param subString
* the string to find.
* @param start
@@ -1426,7 +1426,7 @@
/**
* Returns the size of this string.
- *
+ *
* @return the number of characters in this string.
*/
public int length() {
@@ -1436,7 +1436,7 @@
/**
* Compares the specified string to this string and compares the specified
* range of characters to determine if they are the same.
- *
+ *
* @param thisStart
* the starting offset in this string.
* @param string
@@ -1481,7 +1481,7 @@
* Compares the specified string to this string and compares the specified
* range of characters to determine if they are the same. When ignoreCase is
* true, the case of the characters is ignored during the comparison.
- *
+ *
* @param ignoreCase
* specifies if case should be ignored.
* @param thisStart
@@ -1532,7 +1532,7 @@
/**
* Copies this string replacing occurrences of the specified character with
* another character.
- *
+ *
* @param oldChar
* the character to replace.
* @param newChar
@@ -1566,12 +1566,12 @@
return copied ? new String(0, count, buffer) : this;
// END android-changed
}
-
+
/**
* Copies this string replacing occurrences of the specified target sequence
* with another sequence. The string is processed from the beginning to the
* end.
- *
+ *
* @param target
* the sequence to replace.
* @param replacement
@@ -1611,7 +1611,7 @@
/**
* Compares the specified string to this string to determine if the
* specified string is a prefix.
- *
+ *
* @param prefix
* the string to look for.
* @return {@code true} if the specified string is a prefix of this string,
@@ -1626,7 +1626,7 @@
/**
* Compares the specified string to this string, starting at the specified
* offset, to determine if the specified string is a prefix.
- *
+ *
* @param prefix
* the string to look for.
* @param start
@@ -1642,7 +1642,7 @@
/**
* Copies a range of characters into a new string.
- *
+ *
* @param start
* the offset of the first character.
* @return a new string containing the characters from start to the end of
@@ -1662,7 +1662,7 @@
/**
* Copies a range of characters into a new string.
- *
+ *
* @param start
* the offset of the first character.
* @param end
@@ -1686,7 +1686,7 @@
/**
* Copies the characters in this string to a character array.
- *
+ *
* @return a character array containing the characters of this string.
*/
public char[] toCharArray() {
@@ -1762,7 +1762,7 @@
/**
* Copies this string removing white space characters from the beginning and
* end of the string.
- *
+ *
* @return a new string with characters <code><= \\u0020</code> removed from
* the beginning and the end.
*/
@@ -1785,7 +1785,7 @@
* Creates a new string containing the characters in the specified character
* array. Modifying the character array after creating the string has no
* effect on the string.
- *
+ *
* @param data
* the array of characters.
* @return the new string.
@@ -1800,7 +1800,7 @@
* Creates a new string containing the specified characters in the character
* array. Modifying the character array after creating the string has no
* effect on the string.
- *
+ *
* @param data
* the array of characters.
* @param start
@@ -1820,7 +1820,7 @@
/**
* Converts the specified character to its string representation.
- *
+ *
* @param value
* the character.
* @return the character converted to a string.
@@ -1838,7 +1838,7 @@
/**
* Converts the specified double to its string representation.
- *
+ *
* @param value
* the double.
* @return the double converted to a string.
@@ -1849,7 +1849,7 @@
/**
* Converts the specified float to its string representation.
- *
+ *
* @param value
* the float.
* @return the float converted to a string.
@@ -1860,7 +1860,7 @@
/**
* Converts the specified integer to its string representation.
- *
+ *
* @param value
* the integer.
* @return the integer converted to a string.
@@ -1871,7 +1871,7 @@
/**
* Converts the specified long to its string representation.
- *
+ *
* @param value
* the long.
* @return the long converted to a string.
@@ -1884,7 +1884,7 @@
* Converts the specified object to its string representation. If the object
* is null return the string {@code "null"}, otherwise use {@code
* toString()} to get the string representation.
- *
+ *
* @param value
* the object.
* @return the object converted to a string, or the string {@code "null"}.
@@ -1897,7 +1897,7 @@
* Converts the specified boolean to its string representation. When the
* boolean is {@code true} return {@code "true"}, otherwise return {@code
* "false"}.
- *
+ *
* @param value
* the boolean.
* @return the boolean converted to a string.
@@ -1909,7 +1909,7 @@
/**
* Returns whether the characters in the StringBuffer {@code strbuf} are the
* same as those in this string.
- *
+ *
* @param strbuf
* the StringBuffer to compare this string to.
* @return {@code true} if the characters in {@code strbuf} are identical to
@@ -1963,10 +1963,10 @@
* to assume that this method behaves like {@link #contains}; if you want to match anywhere
* within the input string, you need to add {@code .*} to the beginning and end of your
* regular expression. See {@link Pattern#matches}.
- *
+ *
* <p>If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @throws PatternSyntaxException
* if the syntax of the supplied regular expression is not
* valid.
@@ -1981,10 +1981,10 @@
* Replaces all matches for {@code regularExpression} within this string with the given
* {@code replacement}.
* See {@link Pattern} for regular expression syntax.
- *
+ *
* <p>If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @throws PatternSyntaxException
* if the syntax of the supplied regular expression is not
* valid.
@@ -2000,10 +2000,10 @@
* Replaces the first match for {@code regularExpression} within this string with the given
* {@code replacement}.
* See {@link Pattern} for regular expression syntax.
- *
+ *
* <p>If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @throws PatternSyntaxException
* if the syntax of the supplied regular expression is not
* valid.
@@ -2020,10 +2020,10 @@
* Equivalent to {@code split(regularExpression, 0)}.
* See {@link Pattern#split(CharSequence, int)} for an explanation of {@code limit}.
* See {@link Pattern} for regular expression syntax.
- *
+ *
* <p>If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @throws NullPointerException if {@code regularExpression == null}
* @throws PatternSyntaxException
* if the syntax of the supplied regular expression is not
@@ -2039,10 +2039,10 @@
* Splits this string using the supplied {@code regularExpression}.
* See {@link Pattern#split(CharSequence, int)} for an explanation of {@code limit}.
* See {@link Pattern} for regular expression syntax.
- *
+ *
* <p>If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @throws NullPointerException if {@code regularExpression == null}
* @throws PatternSyntaxException
* if the syntax of the supplied regular expression is not
@@ -2057,7 +2057,7 @@
/**
* Has the same result as the substring function, but is present so that
* string may implement the CharSequence interface.
- *
+ *
* @param start
* the offset the first character.
* @param end
@@ -2075,7 +2075,7 @@
/**
* Returns the Unicode code point at the given {@code index}.
- *
+ *
* @throws IndexOutOfBoundsException if {@code index < 0 || index >= length()}
* @see Character#codePointAt(char[], int, int)
* @since 1.5
@@ -2089,7 +2089,7 @@
/**
* Returns the Unicode code point that precedes the given {@code index}.
- *
+ *
* @throws IndexOutOfBoundsException if {@code index < 1 || index > length()}
* @see Character#codePointBefore(char[], int, int)
* @since 1.5
@@ -2104,7 +2104,7 @@
/**
* Calculates the number of Unicode code points between {@code beginIndex}
* and {@code endIndex}.
- *
+ *
* @param beginIndex
* the inclusive beginning index of the subsequence.
* @param endIndex
@@ -2163,12 +2163,12 @@
/**
* Returns a localized formatted string, using the supplied format and arguments,
* using the user's default locale.
- *
+ *
* <p>If you're formatting a string other than for human
* consumption, you should use the {@code format(Locale, String, Object...)}
* overload and supply {@code Locale.US}. See
* "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param format the format string (see {@link java.util.Formatter#format})
* @param args
* the list of arguments passed to the formatter. If there are
@@ -2187,7 +2187,7 @@
/**
* Returns a formatted string, using the supplied format and arguments,
* localized to the given locale.
- *
+ *
* @param locale
* the locale to apply; {@code null} value means no localization.
* @param format the format string (see {@link java.util.Formatter#format})
diff --git a/luni/src/main/java/java/lang/StringBuffer.java b/luni/src/main/java/java/lang/StringBuffer.java
index d07cb59..9e20077 100644
--- a/luni/src/main/java/java/lang/StringBuffer.java
+++ b/luni/src/main/java/java/lang/StringBuffer.java
@@ -28,13 +28,13 @@
* strings, where all accesses are synchronized. This class has mostly been replaced
* by {@link StringBuilder} because this synchronization is rarely useful. This
* class is mainly used to interact with legacy APIs that expose it.
- *
+ *
* <p>For particularly complex string-building needs, consider {@link java.util.Formatter}.
- *
+ *
* <p>The majority of the modification methods on this class return {@code
* this} so that method calls can be chained together. For example:
* {@code new StringBuffer("a").append("b").append("c").toString()}.
- *
+ *
* @see CharSequence
* @see Appendable
* @see StringBuilder
@@ -48,9 +48,9 @@
private static final long serialVersionUID = 3388685877147921107L;
private static final ObjectStreamField serialPersistentFields[] = {
- new ObjectStreamField("count", int.class),
- new ObjectStreamField("shared", boolean.class),
- new ObjectStreamField("value", char[].class), };
+ new ObjectStreamField("count", int.class),
+ new ObjectStreamField("shared", boolean.class),
+ new ObjectStreamField("value", char[].class), };
/**
* Constructs a new StringBuffer using the default capacity which is 16.
@@ -61,7 +61,7 @@
/**
* Constructs a new StringBuffer using the specified capacity.
- *
+ *
* @param capacity
* the initial capacity.
*/
@@ -73,7 +73,7 @@
* Constructs a new StringBuffer containing the characters in the specified
* string. The capacity of the new buffer will be the length of the
* {@code String} plus the default capacity.
- *
+ *
* @param string
* the string content with which to initialize the new instance.
* @throws NullPointerException
@@ -87,7 +87,7 @@
* Constructs a StringBuffer and initializes it with the content from the
* specified {@code CharSequence}. The capacity of the new buffer will be
* the length of the {@code CharSequence} plus the default capacity.
- *
+ *
* @param cs
* the content to initialize the instance.
* @throws NullPointerException
@@ -111,12 +111,12 @@
* @see String#valueOf(boolean)
*/
public StringBuffer append(boolean b) {
- return append(b ? "true" : "false");
+ return append(b ? "true" : "false");
}
/**
* Adds the specified character to the end of this buffer.
- *
+ *
* @param ch
* the character to append.
* @return this StringBuffer.
@@ -130,7 +130,7 @@
/**
* Adds the string representation of the specified double to the end of this
* StringBuffer.
- *
+ *
* @param d
* the double to append.
* @return this StringBuffer.
@@ -143,7 +143,7 @@
/**
* Adds the string representation of the specified float to the end of this
* StringBuffer.
- *
+ *
* @param f
* the float to append.
* @return this StringBuffer.
@@ -156,7 +156,7 @@
/**
* Adds the string representation of the specified integer to the end of
* this StringBuffer.
- *
+ *
* @param i
* the integer to append.
* @return this StringBuffer.
@@ -169,7 +169,7 @@
/**
* Adds the string representation of the specified long to the end of this
* StringBuffer.
- *
+ *
* @param l
* the long to append.
* @return this StringBuffer.
@@ -226,7 +226,7 @@
* @param sb
* the StringBuffer to append (may be null).
* @return this StringBuffer.
- *
+ *
* @since 1.4
*/
public synchronized StringBuffer append(StringBuffer sb) {
@@ -242,7 +242,7 @@
/**
* Adds the character array to the end of this buffer.
- *
+ *
* @param chars
* the character array to append.
* @return this StringBuffer.
@@ -256,7 +256,7 @@
/**
* Adds the specified sequence of characters to the end of this buffer.
- *
+ *
* @param chars
* the character array to append.
* @param start
@@ -359,7 +359,7 @@
/**
* Deletes a range of characters.
- *
+ *
* @param start
* the offset of the first character.
* @param end
@@ -376,7 +376,7 @@
/**
* Deletes the character at the specified offset.
- *
+ *
* @param location
* the offset of the character to delete.
* @return this StringBuffer.
@@ -396,7 +396,7 @@
/**
* Copies the requested sequence of characters to the {@code char[]} passed
* starting at {@code idx}.
- *
+ *
* @param start
* the starting offset of characters to copy.
* @param end
@@ -422,7 +422,7 @@
/**
* Inserts the character into this buffer at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param ch
@@ -439,7 +439,7 @@
/**
* Inserts the string representation of the specified boolean into this
* buffer at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param b
@@ -449,13 +449,13 @@
* if {@code index < 0} or {@code index > length()}.
*/
public StringBuffer insert(int index, boolean b) {
- return insert(index, b ? "true" : "false");
+ return insert(index, b ? "true" : "false");
}
/**
* Inserts the string representation of the specified integer into this
* buffer at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param i
@@ -471,7 +471,7 @@
/**
* Inserts the string representation of the specified long into this buffer
* at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param l
@@ -487,7 +487,7 @@
/**
* Inserts the string representation of the specified into this buffer
* double at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param d
@@ -503,7 +503,7 @@
/**
* Inserts the string representation of the specified float into this buffer
* at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param f
@@ -533,7 +533,7 @@
* if {@code index < 0} or {@code index > length()}.
*/
public StringBuffer insert(int index, Object obj) {
- return insert(index, obj == null ? "null" : obj.toString());
+ return insert(index, obj == null ? "null" : obj.toString());
}
/**
@@ -557,7 +557,7 @@
/**
* Inserts the character array into this buffer at the specified offset.
- *
+ *
* @param index
* the index at which to insert.
* @param chars
@@ -576,7 +576,7 @@
/**
* Inserts the specified subsequence of characters into this buffer at the
* specified index.
- *
+ *
* @param index
* the index at which to insert.
* @param chars
@@ -616,7 +616,7 @@
* @since 1.5
*/
public synchronized StringBuffer insert(int index, CharSequence s) {
- insert0(index, s == null ? "null" : s.toString());
+ insert0(index, s == null ? "null" : s.toString());
return this;
}
@@ -626,7 +626,7 @@
* <p>
* If the specified CharSequence is {@code null}, the string {@code "null"}
* is inserted, otherwise the contents of the CharSequence.
- *
+ *
* @param index
* The index at which to insert.
* @param s
@@ -662,7 +662,7 @@
/**
* Replaces the characters in the specified range with the contents of the
* specified string.
- *
+ *
* @param start
* the inclusive begin index.
* @param end
@@ -682,7 +682,7 @@
/**
* Reverses the order of characters in this buffer.
- *
+ *
* @return this buffer.
*/
public synchronized StringBuffer reverse() {
@@ -728,17 +728,17 @@
private synchronized void writeObject(ObjectOutputStream out)
throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
- fields.put("count", length());
- fields.put("shared", false);
- fields.put("value", getValue());
+ fields.put("count", length());
+ fields.put("shared", false);
+ fields.put("value", getValue());
out.writeFields();
}
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
- int count = fields.get("count", 0);
- char[] value = (char[]) fields.get("value", null);
+ int count = fields.get("count", 0);
+ char[] value = (char[]) fields.get("value", null);
set(value, count);
}
}
diff --git a/luni/src/main/java/java/lang/StringBuilder.java b/luni/src/main/java/java/lang/StringBuilder.java
index ff7b465..de2aa20 100644
--- a/luni/src/main/java/java/lang/StringBuilder.java
+++ b/luni/src/main/java/java/lang/StringBuilder.java
@@ -27,13 +27,13 @@
* strings. This class is intended as a direct replacement of
* {@link StringBuffer} for non-concurrent use; unlike {@code StringBuffer} this
* class is not synchronized.
- *
+ *
* <p>For particularly complex string-building needs, consider {@link java.util.Formatter}.
- *
+ *
* <p>The majority of the modification methods on this class return {@code
* this} so that method calls can be chained together. For example:
* {@code new StringBuilder("a").append("b").append("c").toString()}.
- *
+ *
* @see CharSequence
* @see Appendable
* @see StringBuffer
@@ -48,7 +48,7 @@
/**
* Constructs an instance with an initial capacity of {@code 16}.
- *
+ *
* @see #capacity()
*/
public StringBuilder() {
@@ -107,7 +107,7 @@
* @see String#valueOf(boolean)
*/
public StringBuilder append(boolean b) {
- append0(b ? "true" : "false");
+ append0(b ? "true" : "false");
return this;
}
@@ -330,7 +330,7 @@
/**
* Deletes a sequence of characters specified by {@code start} and {@code
* end}. Shifts any remaining characters to the left.
- *
+ *
* @param start
* the inclusive start index.
* @param end
@@ -348,7 +348,7 @@
/**
* Deletes the character at the specified index. shifts any remaining
* characters to the left.
- *
+ *
* @param index
* the index of the character to delete.
* @return this builder.
@@ -378,7 +378,7 @@
* @see String#valueOf(boolean)
*/
public StringBuilder insert(int offset, boolean b) {
- insert0(offset, b ? "true" : "false");
+ insert0(offset, b ? "true" : "false");
return this;
}
@@ -499,7 +499,7 @@
* @see String#valueOf(Object)
*/
public StringBuilder insert(int offset, Object obj) {
- insert0(offset, obj == null ? "null" : obj.toString());
+ insert0(offset, obj == null ? "null" : obj.toString());
return this;
}
@@ -585,7 +585,7 @@
* @see CharSequence#toString()
*/
public StringBuilder insert(int offset, CharSequence s) {
- insert0(offset, s == null ? "null" : s.toString());
+ insert0(offset, s == null ? "null" : s.toString());
return this;
}
@@ -620,7 +620,7 @@
/**
* Replaces the specified subsequence in this builder with the specified
* string.
- *
+ *
* @param start
* the inclusive begin index.
* @param end
@@ -641,7 +641,7 @@
/**
* Reverses the order of characters in this builder.
- *
+ *
* @return this buffer.
*/
public StringBuilder reverse() {
@@ -651,7 +651,7 @@
/**
* Returns the contents of this builder.
- *
+ *
* @return the string representation of the data in this builder.
*/
@Override
diff --git a/luni/src/main/java/java/lang/StringIndexOutOfBoundsException.java b/luni/src/main/java/java/lang/StringIndexOutOfBoundsException.java
index 5e63936..f4cb8d0 100644
--- a/luni/src/main/java/java/lang/StringIndexOutOfBoundsException.java
+++ b/luni/src/main/java/java/lang/StringIndexOutOfBoundsException.java
@@ -40,18 +40,18 @@
* Constructs a new {@code StringIndexOutOfBoundsException} with the current
* stack trace and a detail message that is based on the specified invalid
* {@code index}.
- *
+ *
* @param index
* the index which is out of bounds.
- */
+ */
public StringIndexOutOfBoundsException(int index) {
- super(Msg.getString("K0055", index));
+ super(Msg.getString("K0055", index));
}
/**
* Constructs a new {@code StringIndexOutOfBoundsException} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/SuppressWarnings.java b/luni/src/main/java/java/lang/SuppressWarnings.java
index 1ff0e42..b4cb0fa 100644
--- a/luni/src/main/java/java/lang/SuppressWarnings.java
+++ b/luni/src/main/java/java/lang/SuppressWarnings.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/lang/System.java b/luni/src/main/java/java/lang/System.java
index 095307a..be45907 100644
--- a/luni/src/main/java/java/lang/System.java
+++ b/luni/src/main/java/java/lang/System.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -56,7 +56,7 @@
* standard input and output. Enables clients to dynamically load native
* libraries. All methods of this class are accessed in a static way and the
* class itself can not be instantiated.
- *
+ *
* @see Runtime
*/
public final class System {
@@ -97,7 +97,7 @@
/**
* Sets the standard input stream to the given user defined input stream.
- *
+ *
* @param newIn
* the user defined input stream to set as the standard input
* stream.
@@ -116,7 +116,7 @@
/**
* Sets the standard output stream to the given user defined output stream.
- *
+ *
* @param newOut
* the user defined output stream to set as the standard output
* stream.
@@ -136,7 +136,7 @@
/**
* Sets the standard error output stream to the given user defined output
* stream.
- *
+ *
* @param newErr
* the user defined output stream to set as the standard error
* output stream.
@@ -163,7 +163,7 @@
* Copies the number of {@code length} elements of the Array {@code src}
* starting at the offset {@code srcPos} into the Array {@code dest} at
* the position {@code destPos}.
- *
+ *
* @param src
* the source array to copy the content.
* @param srcPos
@@ -184,7 +184,7 @@
* 00:00:00 UTC. This method shouldn't be used for measuring timeouts or
* other elapsed time measurements, as changing the system time can affect
* the results.
- *
+ *
* @return the local system time in milliseconds.
*/
public static native long currentTimeMillis();
@@ -194,7 +194,7 @@
* local system. This timestamp can only be used to measure an elapsed
* period by comparing it against another timestamp. It cannot be used as a
* very exact system time expression.
- *
+ *
* @return the current timestamp in nanoseconds.
*/
public static native long nanoTime();
@@ -204,7 +204,7 @@
* {@link #runFinalizersOnExit(boolean)} has been previously invoked with a
* {@code true} argument, then all objects will be properly
* garbage-collected and finalized first.
- *
+ *
* @param code
* the return code.
* @throws SecurityException
@@ -228,7 +228,7 @@
/**
* Returns the value of the environment variable with the given name {@code
* var}.
- *
+ *
* @param name
* the name of the environment variable.
* @return the value of the specified environment variable or {@code null}
@@ -259,7 +259,7 @@
/**
* Returns an unmodifiable map of all available environment variables.
- *
+ *
* @return the map representing all environment variables.
* @throws SecurityException
* if a {@link SecurityManager} is installed and its {@code
@@ -301,7 +301,7 @@
/**
* Returns the inherited channel from the creator of the current virtual
* machine.
- *
+ *
* @return the inherited {@link Channel} or {@code null} if none exists.
* @throws IOException
* if an I/O error occurred.
@@ -316,7 +316,7 @@
* Returns the system properties. Note that this is not a copy, so that
* changes made to the returned Properties object will be reflected in
* subsequent calls to getProperty and getProperties.
- *
+ *
* @return the system properties.
* @throws SecurityException
* if a {@link SecurityManager} is installed and its {@code
@@ -334,7 +334,7 @@
/**
* Returns the system properties without any security checks. This is used
* for access from within java.lang.
- *
+ *
* @return the system properties
*/
static Properties internalGetProperties() {
@@ -353,7 +353,7 @@
* such property exists.
* <p>
* The properties currently provided by the virtual machine are:
- *
+ *
* <pre>
* java.vendor.url
* java.class.path
@@ -372,7 +372,7 @@
* java.version
* java.home
* </pre>
- *
+ *
* @param prop
* the name of the system property to look up.
* @return the value of the specified system property or {@code null} if the
@@ -388,7 +388,7 @@
/**
* Returns the value of a particular system property. The {@code
* defaultValue} will be returned if no such property has been found.
- *
+ *
* @param prop
* the name of the system property to look up.
* @param defaultValue
@@ -414,7 +414,7 @@
/**
* Sets the value of a particular system property.
- *
+ *
* @param prop
* the name of the system property to be changed.
* @param value
@@ -438,7 +438,7 @@
/**
* Removes a specific system property.
- *
+ *
* @param key
* the name of the system property to be removed.
* @return the property value or {@code null} if the property didn't exist.
@@ -479,7 +479,7 @@
/**
* Returns null. Android does not use {@code SecurityManager}. This method
* is only provided for source compatibility.
- *
+ *
* @return null
*/
public static SecurityManager getSecurityManager() {
@@ -491,7 +491,7 @@
* the same one that would be returned by the method {@code
* java.lang.Object.hashCode()}, whether or not the object's class has
* overridden hashCode(). The hash code for {@code null} is {@code 0}.
- *
+ *
* @param anObject
* the object to calculate the hash code.
* @return the hash code for the given object.
@@ -501,7 +501,7 @@
/**
* Loads the specified file as a dynamic library.
- *
+ *
* @param pathName
* the path of the file to be loaded.
* @throws SecurityException
@@ -519,7 +519,7 @@
* Loads and links the shared library with the given name {@code libName}.
* The file will be searched in the default directory for shared libraries
* of the local system.
- *
+ *
* @param libName
* the name of the library to load.
* @throws UnsatisfiedLinkError
@@ -547,7 +547,7 @@
* Ensures that, when the virtual machine is about to exit, all objects are
* finalized. Note that all finalization which occurs when the system is
* exiting is performed after all running threads have been terminated.
- *
+ *
* @param flag
* the flag determines if finalization on exit is enabled.
* @deprecated this method is unsafe.
@@ -560,7 +560,7 @@
/**
* Sets all system properties.
- *
+ *
* @param p
* the new system property.
* @throws SecurityException
@@ -599,7 +599,7 @@
/**
* Returns the platform specific file name format for the shared library
* named by the argument.
- *
+ *
* @param userLibName
* the name of the library to look up.
* @return the platform specific filename for the library.
@@ -609,7 +609,7 @@
/**
* Sets the value of the named static field in the receiver to the passed in
* argument.
- *
+ *
* @param fieldName
* the name of the field to set, one of in, out, or err
* @param stream
diff --git a/luni/src/main/java/java/lang/Thread.java b/luni/src/main/java/java/lang/Thread.java
index 625d718..418065e 100644
--- a/luni/src/main/java/java/lang/Thread.java
+++ b/luni/src/main/java/java/lang/Thread.java
@@ -65,10 +65,10 @@
* which makes it run in the background. The latter also affects VM termination
* behavior: the VM does not terminate automatically as long as there are
* non-daemon threads running.
- *
+ *
* @see java.lang.Object
* @see java.lang.ThreadGroup
- *
+ *
*/
public class Thread implements Runnable {
diff --git a/luni/src/main/java/java/lang/ThreadGroup.java b/luni/src/main/java/java/lang/ThreadGroup.java
index 690fb45..ca31d36 100644
--- a/luni/src/main/java/java/lang/ThreadGroup.java
+++ b/luni/src/main/java/java/lang/ThreadGroup.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
// Name of this ThreadGroup
private String name;
// BEGIN android-note
- // VM needs this field name for debugging.
+ // VM needs this field name for debugging.
// END android-note
// Maximum priority for Threads inside this ThreadGroup
@@ -37,7 +37,7 @@
// The ThreadGroup to which this ThreadGroup belongs
ThreadGroup parent;
// BEGIN android-note
- // VM needs this field name for debugging.
+ // VM needs this field name for debugging.
// END android-note
int numThreads;
@@ -84,7 +84,7 @@
/**
* Constructs a new {@code ThreadGroup} with the given name. The new {@code ThreadGroup}
* will be child of the {@code ThreadGroup} to which the calling thread belongs.
- *
+ *
* @param name the name
* @throws SecurityException if {@code checkAccess()} for the parent
* group fails with a SecurityException
@@ -98,7 +98,7 @@
/**
* Constructs a new {@code ThreadGroup} with the given name, as a child of the
* given {@code ThreadGroup}.
- *
+ *
* @param parent the parent
* @param name the name
* @throws NullPointerException if {@code parent == null}
@@ -131,13 +131,13 @@
*/
ThreadGroup() {
this.name = "system";
- this.setParent(null);
+ this.setParent(null);
}
/**
* Returns the number of running {@code Thread}s which are children of this thread group,
* directly or indirectly.
- *
+ *
* @return the number of children
*/
public int activeCount() {
@@ -164,7 +164,7 @@
/**
* Returns the number of {@code ThreadGroup}s which are children of this group,
* directly or indirectly.
- *
+ *
* @return the number of children
*/
public int activeGroupCount() {
@@ -183,7 +183,7 @@
* Adds a {@code Thread} to this thread group. This should only be visible to class
* java.lang.Thread, and should only be called when a new Thread is created
* and initialized by the constructor.
- *
+ *
* @param thread Thread to add
* @throws IllegalThreadStateException if this group has been destroyed already
* @see #remove(java.lang.Thread)
@@ -207,7 +207,7 @@
/**
* Adds a {@code ThreadGroup} to this thread group.
- *
+ *
* @param g ThreadGroup to add
* @throws IllegalThreadStateException if this group has been destroyed already
*/
@@ -232,10 +232,10 @@
* Does nothing. The definition of this method depends on the deprecated
* method {@link #suspend()}. The exact behavior of this call was never
* specified.
- *
+ *
* @param b Used to control low memory implicit suspension
* @return {@code true} (always)
- *
+ *
* @deprecated Required deprecated method suspend().
*/
@Deprecated
@@ -262,7 +262,7 @@
* to destroy a {@code ThreadGroup} that has no threads in it. Any daemon
* {@code ThreadGroup} is destroyed automatically when it becomes empty (no threads
* or thread groups in it).
- *
+ *
* @throws IllegalThreadStateException if this thread group or any of its
* subgroups has been destroyed already or if it still contains
* threads.
@@ -310,7 +310,7 @@
/*
* Auxiliary method that destroys this thread group and recursively all its
* subgroups if this is a daemon ThreadGroup.
- *
+ *
* @see #destroy
* @see #setDaemon
* @see #isDaemon
@@ -332,10 +332,10 @@
* Iterates over all active threads in this group (and its sub-groups) and
* stores the threads in the given array. Returns when the array is full or
* no more threads remain, whichever happens first.
- *
+ *
* <p>Note that this method will silently ignore any threads that don't fit in the
* supplied array.
- *
+ *
* @param threads the array into which the {@code Thread}s will be copied
* @return the number of {@code Thread}s that were copied
*/
@@ -347,10 +347,10 @@
* Iterates over all active threads in this group (and, optionally, its
* sub-groups) and stores the threads in the given array. Returns when the
* array is full or no more threads remain, whichever happens first.
- *
+ *
* <p>Note that this method will silently ignore any threads that don't fit in the
* supplied array.
- *
+ *
* @param threads the array into which the {@code Thread}s will be copied
* @param recurse indicates whether {@code Thread}s in subgroups should be
* recursively copied as well
@@ -364,10 +364,10 @@
* Iterates over all thread groups in this group (and its sub-groups) and
* and stores the groups in the given array. Returns when the array is full
* or no more groups remain, whichever happens first.
- *
+ *
* <p>Note that this method will silently ignore any thread groups that don't fit in the
* supplied array.
- *
+ *
* @param groups the array into which the {@code ThreadGroup}s will be copied
* @return the number of {@code ThreadGroup}s that were copied
*/
@@ -379,10 +379,10 @@
* Iterates over all thread groups in this group (and, optionally, its
* sub-groups) and stores the groups in the given array. Returns when
* the array is full or no more groups remain, whichever happens first.
- *
+ *
* <p>Note that this method will silently ignore any thread groups that don't fit in the
* supplied array.
- *
+ *
* @param groups the array into which the {@code ThreadGroup}s will be copied
* @param recurse indicates whether {@code ThreadGroup}s in subgroups should be
* recursively copied as well or not
@@ -397,10 +397,10 @@
* <param>enumerationIndex</param> all Threads or ThreadGroups in the
* receiver. If <param>recurse</param> is true, recursively enumerate the
* elements in subgroups.
- *
+ *
* If the array passed as parameter is too small no exception is thrown -
* the extra elements are simply not copied.
- *
+ *
* @param enumeration array into which the elements will be copied
* @param recurse Indicates whether subgroups should be enumerated or not
* @param enumerationIndex Indicates in which position of the enumeration
@@ -444,9 +444,9 @@
/**
* Returns the maximum allowed priority for a {@code Thread} in this thread group.
- *
+ *
* @return the maximum priority
- *
+ *
* @see #setMaxPriority
*/
public final int getMaxPriority() {
@@ -455,7 +455,7 @@
/**
* Returns the name of this thread group.
- *
+ *
* @return the group's name
*/
public final String getName() {
@@ -465,7 +465,7 @@
/**
* Returns this thread group's parent {@code ThreadGroup}. It can be null if this
* is the the root ThreadGroup.
- *
+ *
* @return the parent
*/
public final ThreadGroup getParent() {
@@ -478,10 +478,10 @@
/**
* Interrupts every {@code Thread} in this group and recursively in all its
* subgroups.
- *
+ *
* @throws SecurityException if {@code this.checkAccess()} fails with
* a SecurityException
- *
+ *
* @see Thread#interrupt
*/
public final void interrupt() {
@@ -502,9 +502,9 @@
/**
* Checks whether this thread group is a daemon {@code ThreadGroup}.
- *
+ *
* @return true if this thread group is a daemon {@code ThreadGroup}
- *
+ *
* @see #setDaemon
* @see #destroy
*/
@@ -514,7 +514,7 @@
/**
* Checks whether this thread group has already been destroyed.
- *
+ *
* @return true if this thread group has already been destroyed
* @see #destroy
*/
@@ -538,7 +538,7 @@
* Outputs to {@code System.out}a text representation of the
* hierarchy of Threads and ThreadGroups in this thread group (and recursively).
* The indentation will be four spaces per level of nesting.
- *
+ *
* @param levels How many levels of nesting, so that proper indentation can
* be output.
*/
@@ -570,7 +570,7 @@
/**
* Checks whether this thread group is a direct or indirect parent group of a
* given {@code ThreadGroup}.
- *
+ *
* @param g the potential child {@code ThreadGroup}
* @return true if this thread group is parent of {@code g}
*/
@@ -587,9 +587,9 @@
/**
* Removes a {@code Thread} from this group. This should only be visible to class
* java.lang.Thread, and should only be called when a Thread dies.
- *
+ *
* @param thread Thread to remove
- *
+ *
* @see #add(Thread)
*/
final void remove(java.lang.Thread thread) {
@@ -610,9 +610,9 @@
/**
* Removes an immediate subgroup.
- *
+ *
* @param g ThreadGroup to remove
- *
+ *
* @see #add(Thread)
* @see #add(ThreadGroup)
*/
@@ -633,13 +633,13 @@
/**
* Resumes every thread in this group and recursively in all its
* subgroups.
- *
+ *
* @throws SecurityException if {@code this.checkAccess()} fails with
* a SecurityException
- *
+ *
* @see Thread#resume
* @see #suspend
- *
+ *
* @deprecated Requires deprecated method Thread.resume().
*/
@SuppressWarnings("deprecation")
@@ -663,11 +663,11 @@
/**
* Sets whether this is a daemon {@code ThreadGroup} or not. Daemon
* thread groups are automatically destroyed when they become empty.
- *
+ *
* @param isDaemon the new value
* @throws SecurityException if {@code checkAccess()} for the parent
* group fails with a SecurityException
- *
+ *
* @see #isDaemon
* @see #destroy
*/
@@ -679,18 +679,18 @@
/**
* Configures the maximum allowed priority for a {@code Thread} in this group and
* recursively in all its subgroups.
- *
+ *
* <p>A caller can never increase the maximum priority of a thread group.
* Such an attempt will not result in an exception, it will
* simply leave the thread group with its current maximum priority.
- *
+ *
* @param newMax the new maximum priority to be set
- *
+ *
* @throws SecurityException if {@code checkAccess()} fails with a
* SecurityException
* @throws IllegalArgumentException if the new priority is greater than
* Thread.MAX_PRIORITY or less than Thread.MIN_PRIORITY
- *
+ *
* @see #getMaxPriority
*/
public final void setMaxPriority(int newMax) {
@@ -717,10 +717,10 @@
* Sets the parent {@code ThreadGroup} of this thread group, and adds this
* thread group to the parent's collection of immediate children (if {@code parent} is
* not {@code null}).
- *
+ *
* @param parent The parent ThreadGroup, or null to make this thread group
* the root ThreadGroup
- *
+ *
* @see #getParent
* @see #parentOf
*/
@@ -733,14 +733,14 @@
/**
* Stops every thread in this group and recursively in all its subgroups.
- *
+ *
* @throws SecurityException if {@code this.checkAccess()} fails with
* a SecurityException
- *
+ *
* @see Thread#stop()
* @see Thread#stop(Throwable)
* @see ThreadDeath
- *
+ *
* @deprecated Requires deprecated method Thread.stop().
*/
@SuppressWarnings("deprecation")
@@ -783,13 +783,13 @@
/**
* Suspends every thread in this group and recursively in all its
* subgroups.
- *
+ *
* @throws SecurityException if {@code this.checkAccess()} fails with
* a SecurityException
- *
+ *
* @see Thread#suspend
* @see #resume
- *
+ *
* @deprecated Requires deprecated method Thread.suspend().
*/
@SuppressWarnings("deprecation")
@@ -839,9 +839,9 @@
* Handles uncaught exceptions. Any uncaught exception in any {@code Thread}
* is forwarded to the thread's {@code ThreadGroup} by invoking this
* method.
- *
+ *
* <p>New code should use {@link Thread#setUncaughtExceptionHandler} instead of thread groups.
- *
+ *
* @param t the Thread that terminated with an uncaught exception
* @param e the uncaught exception itself
*/
@@ -862,27 +862,27 @@
// BEGIN android-added
/**
* Non-standard method for adding a thread to a group, required by Dalvik.
- *
+ *
* @param thread Thread to add
- *
+ *
* @throws IllegalThreadStateException if the thread has been destroyed
* already
- *
+ *
* @see #add(java.lang.Thread)
* @see #removeThread(java.lang.Thread)
*/
void addThread(Thread thread) throws IllegalThreadStateException {
add(thread);
}
-
+
/**
* Non-standard method for adding a thread to a group, required by Dalvik.
- *
+ *
* @param thread Thread to add
- *
+ *
* @throws IllegalThreadStateException if the thread has been destroyed
* already
- *
+ *
* @see #remove(java.lang.Thread)
* @see #addThread(java.lang.Thread)
*/
diff --git a/luni/src/main/java/java/lang/ThreadLocal.java b/luni/src/main/java/java/lang/ThreadLocal.java
index 90250b3..230c602 100644
--- a/luni/src/main/java/java/lang/ThreadLocal.java
+++ b/luni/src/main/java/java/lang/ThreadLocal.java
@@ -32,7 +32,7 @@
* but each sees a different value when accessing it, and changes made by one
* thread do not affect the other threads. The implementation supports
* {@code null} values.
- *
+ *
* @see java.lang.Thread
* @author Bob Lee
*/
@@ -50,7 +50,7 @@
* doesn't yet exist for this variable on this thread, this method will
* create an entry, populating the value with the result of
* {@link #initialValue()}.
- *
+ *
* @return the current value of the variable for the calling thread.
*/
@SuppressWarnings("unchecked")
@@ -74,7 +74,7 @@
/**
* Provides the initial value of this variable for the current thread.
* The default implementation returns {@code null}.
- *
+ *
* @return the initial value of the variable.
*/
protected T initialValue() {
@@ -85,7 +85,7 @@
* Sets the value of this variable for the current thread. If set to
* {@code null}, the value will be set to null and the underlying entry will
* still be present.
- *
+ *
* @param value the new value of the variable for the caller thread.
*/
public void set(T value) {
diff --git a/luni/src/main/java/java/lang/Throwable.java b/luni/src/main/java/java/lang/Throwable.java
index c94631b..4b80d28 100644
--- a/luni/src/main/java/java/lang/Throwable.java
+++ b/luni/src/main/java/java/lang/Throwable.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
* common {@code Throwable} without losing the detailed original error
* information. When printing the stack trace, the trace of the cause is
* included.
- *
+ *
* @see Error
* @see Exception
* @see RuntimeException
@@ -79,7 +79,7 @@
/**
* Constructs a new {@code Throwable} with the current stack trace and the
* specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this {@code Throwable}.
*/
@@ -91,7 +91,7 @@
/**
* Constructs a new {@code Throwable} with the current stack trace, the
* specified detail message and the specified cause.
- *
+ *
* @param detailMessage
* the detail message for this {@code Throwable}.
* @param throwable
@@ -106,7 +106,7 @@
/**
* Constructs a new {@code Throwable} with the current stack trace and the
* specified cause.
- *
+ *
* @param throwable
* the cause of this {@code Throwable}.
*/
@@ -122,7 +122,7 @@
* to this {@code Throwable}. The method is public so that code which
* catches a {@code Throwable} and then re-throws it can adjust the stack
* trace to represent the location where the exception was re-thrown.
- *
+ *
* @return this {@code Throwable} instance.
*/
public Throwable fillInStackTrace() {
@@ -138,7 +138,7 @@
* Returns the extra information message which was provided when this
* {@code Throwable} was created. Returns {@code null} if no message was
* provided at creation time.
- *
+ *
* @return this {@code Throwable}'s detail message.
*/
public String getMessage() {
@@ -150,7 +150,7 @@
* {@code Throwable} was created. Returns {@code null} if no message was
* provided at creation time. Subclasses may override this method to return
* localized text for the message. Android returns the regular detail message.
- *
+ *
* @return this {@code Throwable}'s localized detail message.
*/
public String getLocalizedMessage() {
@@ -162,7 +162,7 @@
* {@code StackTraceElement} represents an entry in the call stack. The
* element at position 0 is the top of the stack, that is, the stack frame
* where this {@code Throwable} is thrown.
- *
+ *
* @return a copy of the array of {@code StackTraceElement}s representing
* the call stack. Changes in the array obtained from this call will
* not change the call stack stored in this {@code Throwable}.
@@ -177,7 +177,7 @@
* represents an entry in the call stack. A copy of the specified array is
* stored in this {@code Throwable}. will be returned by {@code
* getStackTrace()} and printed by {@code printStackTrace()}.
- *
+ *
* @param trace
* the new array of {@code StackTraceElement}s. A copy of the
* array is stored in this {@code Throwable}, so subsequent
@@ -200,7 +200,7 @@
/**
* Writes a printable representation of this {@code Throwable}'s stack trace
* to the {@code System.err} stream.
- *
+ *
*/
public void printStackTrace() {
printStackTrace(System.err);
@@ -209,10 +209,10 @@
/**
* Counts the number of duplicate stack frames, starting from the
* end of the stack.
- *
+ *
* @param currentStack a stack to compare
* @param parentStack a stack to compare
- *
+ *
* @return the number of duplicate stack frames.
*/
private static int countDuplicates(StackTraceElement[] currentStack,
@@ -233,7 +233,7 @@
/**
* Returns an array of StackTraceElement. Each StackTraceElement
* represents a entry on the stack.
- *
+ *
* @return an array of StackTraceElement representing the stack
*/
private StackTraceElement[] getInternalStackTrace() {
@@ -251,7 +251,7 @@
* to the specified print stream. If the {@code Throwable} contains a
* {@link #getCause() cause}, the method will be invoked recursively for
* the nested {@code Throwable}.
- *
+ *
* @param err
* the stream to write the stack trace on.
*/
@@ -287,7 +287,7 @@
* to the specified print writer. If the {@code Throwable} contains a
* {@link #getCause() cause}, the method will be invoked recursively for the
* nested {@code Throwable}.
- *
+ *
* @param err
* the writer to write the stack trace on.
*/
@@ -332,7 +332,7 @@
/**
* Initializes the cause of this {@code Throwable}. The cause can only be
* initialized once.
- *
+ *
* @param throwable
* the cause of this {@code Throwable}.
* @return this {@code Throwable} instance.
@@ -358,7 +358,7 @@
/**
* Returns the cause of this {@code Throwable}, or {@code null} if there is
* no cause.
- *
+ *
* @return Throwable this {@code Throwable}'s cause.
*/
public Throwable getCause() {
diff --git a/luni/src/main/java/java/lang/TypeNotPresentException.java b/luni/src/main/java/java/lang/TypeNotPresentException.java
index d96f766..0a8853e 100644
--- a/luni/src/main/java/java/lang/TypeNotPresentException.java
+++ b/luni/src/main/java/java/lang/TypeNotPresentException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@
* Constructs a new {@code TypeNotPresentException} with the current stack
* trace, a detail message that includes the name of the type that could not
* be found and the {@code Throwable} that caused this exception.
- *
+ *
* @param typeName
* the fully qualified name of the type that could not be found.
* @param cause
@@ -46,7 +46,7 @@
/**
* Gets the fully qualified name of the type that could not be found.
- *
+ *
* @return the name of the type that caused this exception.
*/
public String typeName() {
diff --git a/luni/src/main/java/java/lang/UnknownError.java b/luni/src/main/java/java/lang/UnknownError.java
index ecdb008..f005837 100644
--- a/luni/src/main/java/java/lang/UnknownError.java
+++ b/luni/src/main/java/java/lang/UnknownError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code UnknownError} with the current stack trace and
* the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/UnsatisfiedLinkError.java b/luni/src/main/java/java/lang/UnsatisfiedLinkError.java
index 12429a0..1ff0ba6 100644
--- a/luni/src/main/java/java/lang/UnsatisfiedLinkError.java
+++ b/luni/src/main/java/java/lang/UnsatisfiedLinkError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code UnsatisfiedLinkError} with the current stack
* trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/UnsupportedClassVersionError.java b/luni/src/main/java/java/lang/UnsupportedClassVersionError.java
index 7670f70..08f98c7 100644
--- a/luni/src/main/java/java/lang/UnsupportedClassVersionError.java
+++ b/luni/src/main/java/java/lang/UnsupportedClassVersionError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code UnsupportedClassVersionError} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/UnsupportedOperationException.java b/luni/src/main/java/java/lang/UnsupportedOperationException.java
index ac27518..c1b1a3d 100644
--- a/luni/src/main/java/java/lang/UnsupportedOperationException.java
+++ b/luni/src/main/java/java/lang/UnsupportedOperationException.java
@@ -34,18 +34,18 @@
/**
* Constructs a new {@code UnsupportedOperationException} with the current
* stack trace and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
public UnsupportedOperationException(String detailMessage) {
super(detailMessage);
}
-
+
/**
* Constructs a new {@code UnsupportedOperationException} with the current
* stack trace, the specified detail message and the specified cause.
- *
+ *
* @param message
* the detail message for this exception.
* @param cause
@@ -55,11 +55,11 @@
public UnsupportedOperationException(String message, Throwable cause) {
super(message, cause);
}
-
+
/**
* Constructs a new {@code UnsupportedOperationException} with the current
* stack trace and the specified cause.
- *
+ *
* @param cause
* the optional cause of this exception, may be {@code null}.
* @since 1.5
diff --git a/luni/src/main/java/java/lang/VerifyError.java b/luni/src/main/java/java/lang/VerifyError.java
index 35cf34b..706f7aa 100644
--- a/luni/src/main/java/java/lang/VerifyError.java
+++ b/luni/src/main/java/java/lang/VerifyError.java
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code VerifyError} with the current stack trace and the
* specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/VirtualMachineError.java b/luni/src/main/java/java/lang/VirtualMachineError.java
index 87a6342..174e4f6 100644
--- a/luni/src/main/java/java/lang/VirtualMachineError.java
+++ b/luni/src/main/java/java/lang/VirtualMachineError.java
@@ -21,7 +21,7 @@
/**
* {@code VirtualMachineError} is the superclass of all error classes that occur
* during the operation of the virtual machine.
- *
+ *
* @see Error
*/
public abstract class VirtualMachineError extends Error {
@@ -39,7 +39,7 @@
/**
* Constructs a new {@code VirtualMachineError} with the current stack trace
* and the specified detail message.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/lang/Void.java b/luni/src/main/java/java/lang/Void.java
index aa08839..56d7c74 100644
--- a/luni/src/main/java/java/lang/Void.java
+++ b/luni/src/main/java/java/lang/Void.java
@@ -25,7 +25,7 @@
* @since 1.1
*/
public final class Void extends Object {
-
+
/**
* The {@link Class} object that represents the primitive type {@code void}.
*/
@@ -38,7 +38,7 @@
private static Class<Void> lookupType() {
Class<?> voidType = null;
try {
- Method method = Runnable.class.getMethod("run", new Class[0]);
+ Method method = Runnable.class.getMethod("run", new Class[0]);
voidType = method.getReturnType();
} catch (Exception e) {
throw new RuntimeException(e);
diff --git a/luni/src/main/java/java/lang/annotation/Annotation.java b/luni/src/main/java/java/lang/annotation/Annotation.java
index 00707b1..2922093 100644
--- a/luni/src/main/java/java/lang/annotation/Annotation.java
+++ b/luni/src/main/java/java/lang/annotation/Annotation.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -37,7 +37,7 @@
/**
* Determines whether or not this annotation is equivalent to the annotation
* passed. This is determined according to the following rules:
- *
+ *
* <ul>
* <li>
* Two annotations {@code x} and {@code y} are equal if and only if
@@ -80,7 +80,7 @@
/**
* Returns the hash code of this annotation. The hash code is determined
* according to the following rules:
- *
+ *
* <ul>
* <li>
* The hash code of an annotation is the sum of the hash codes of
@@ -118,7 +118,7 @@
* consists of the name of the annotation, preceded by a "@". If the
* annotation contains field members, their names and values are also
* included in the result.
- *
+ *
* @return the {@code String} that represents this annotation.
*/
String toString();
diff --git a/luni/src/main/java/java/lang/annotation/AnnotationFormatError.java b/luni/src/main/java/java/lang/annotation/AnnotationFormatError.java
index 67775c7..50ac430 100644
--- a/luni/src/main/java/java/lang/annotation/AnnotationFormatError.java
+++ b/luni/src/main/java/java/lang/annotation/AnnotationFormatError.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/AnnotationTypeMismatchException.java b/luni/src/main/java/java/lang/annotation/AnnotationTypeMismatchException.java
index 75f1bed..cc67a2b 100644
--- a/luni/src/main/java/java/lang/annotation/AnnotationTypeMismatchException.java
+++ b/luni/src/main/java/java/lang/annotation/AnnotationTypeMismatchException.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/Documented.java b/luni/src/main/java/java/lang/annotation/Documented.java
index 7e7f72f..967f294 100644
--- a/luni/src/main/java/java/lang/annotation/Documented.java
+++ b/luni/src/main/java/java/lang/annotation/Documented.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/ElementType.java b/luni/src/main/java/java/lang/annotation/ElementType.java
index f0f52aa..29be59f 100644
--- a/luni/src/main/java/java/lang/annotation/ElementType.java
+++ b/luni/src/main/java/java/lang/annotation/ElementType.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java b/luni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java
index 9b7aa6a..0fa7b3a 100644
--- a/luni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java
+++ b/luni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/Inherited.java b/luni/src/main/java/java/lang/annotation/Inherited.java
index 730d30a..c50f804 100644
--- a/luni/src/main/java/java/lang/annotation/Inherited.java
+++ b/luni/src/main/java/java/lang/annotation/Inherited.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/Retention.java b/luni/src/main/java/java/lang/annotation/Retention.java
index 275739e..12a5c4f 100644
--- a/luni/src/main/java/java/lang/annotation/Retention.java
+++ b/luni/src/main/java/java/lang/annotation/Retention.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/RetentionPolicy.java b/luni/src/main/java/java/lang/annotation/RetentionPolicy.java
index 70de3b0..7da5898 100644
--- a/luni/src/main/java/java/lang/annotation/RetentionPolicy.java
+++ b/luni/src/main/java/java/lang/annotation/RetentionPolicy.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/annotation/Target.java b/luni/src/main/java/java/lang/annotation/Target.java
index 4ba0938..7414e47 100644
--- a/luni/src/main/java/java/lang/annotation/Target.java
+++ b/luni/src/main/java/java/lang/annotation/Target.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/luni/src/main/java/java/lang/ref/PhantomReference.java b/luni/src/main/java/java/lang/ref/PhantomReference.java
index 46ffcad..379584c 100644
--- a/luni/src/main/java/java/lang/ref/PhantomReference.java
+++ b/luni/src/main/java/java/lang/ref/PhantomReference.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -52,7 +52,7 @@
* reference queue. The reference queue may be {@code null}, but this case
* does not make any sense, since the reference will never be enqueued, and
* the {@link #get()} method always returns {@code null}.
- *
+ *
* @param r the referent to track
* @param q the queue to register the phantom reference object with
*/
@@ -65,7 +65,7 @@
/**
* Returns {@code null}. The referent of a phantom reference is not
* accessible.
- *
+ *
* @return {@code null} (always)
*/
@Override
diff --git a/luni/src/main/java/java/lang/ref/Reference.java b/luni/src/main/java/java/lang/ref/Reference.java
index 9b59b35..77f619d 100644
--- a/luni/src/main/java/java/lang/ref/Reference.java
+++ b/luni/src/main/java/java/lang/ref/Reference.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -96,7 +96,7 @@
* the VM may not call the overridden method.
* VM requirement: this method <em>must</em> be called "enqueueInternal",
* have the signature "()Z", and be private.
- *
+ *
* @return {@code true} if this call has caused the {@code Reference} to
* become enqueued, or {@code false} otherwise
*/
@@ -119,7 +119,7 @@
/**
* Forces the reference object to be enqueued if it has been associated with
* a queue.
- *
+ *
* @return {@code true} if this call has caused the {@code Reference} to
* become enqueued, or {@code false} otherwise
*/
@@ -129,7 +129,7 @@
/**
* Returns the referent of the reference object.
- *
+ *
* @return the referent to which reference refers, or {@code null} if the
* object has been cleared.
*/
@@ -139,7 +139,7 @@
/**
* Checks whether the reference object has been enqueued.
- *
+ *
* @return {@code true} if the {@code Reference} has been enqueued, {@code
* false} otherwise
*/
diff --git a/luni/src/main/java/java/lang/ref/SoftReference.java b/luni/src/main/java/java/lang/ref/SoftReference.java
index 2bf8746..5db8b8f 100644
--- a/luni/src/main/java/java/lang/ref/SoftReference.java
+++ b/luni/src/main/java/java/lang/ref/SoftReference.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
* references. Once the garbage collector has decided that an object {@code obj}
* is softly-reachable, the following
* may happen, either immediately or at a later point:
- *
+ *
* <ul>
* <li>
* A set {@code ref} of references is determined. {@code ref} contains the
@@ -58,20 +58,20 @@
* <li>
* At the same time or some time in the future, all references in {@code
* ref} will be enqueued with their corresponding reference queues, if any.
- * </li>
+ * </li>
* </ul>
- *
+ *
* The system may decide not to clear and enqueue soft references until a later
* time, yet all {@code SoftReference}s pointing to softly reachable objects are
* guaranteed to be cleared before the VM will throw an {@link
* java.lang.OutOfMemoryError}.
- *
+ *
* Soft references are useful for caches that should automatically have
* their entries removed once they are not referenced any more (from outside),
* and there is a need for memory. The difference between a {@code
* SoftReference} and a {@code WeakReference} is the point of time at which the
* decision is made to clear and enqueue the reference:
- *
+ *
* <ul>
* <li>
* A {@code SoftReference} should be cleared and enqueued <em>as late as
@@ -80,7 +80,7 @@
* </li>
* <li>
* A {@code WeakReference} may be cleared and enqueued as soon as is
- * known to be weakly-referenced.
+ * known to be weakly-referenced.
* </li>
* </ul>
*/
@@ -89,18 +89,18 @@
/**
* Constructs a new soft reference to the given referent. The newly created
* reference is not registered with any reference queue.
- *
+ *
* @param r the referent to track
*/
public SoftReference(T r) {
super();
referent = r;
}
-
+
/**
* Constructs a new soft reference to the given referent. The newly created
* reference is registered with the given reference queue.
- *
+ *
* @param r the referent to track
* @param q the queue to register to the reference object with. A null value
* results in a weak reference that is not associated with any
diff --git a/luni/src/main/java/java/lang/ref/WeakReference.java b/luni/src/main/java/java/lang/ref/WeakReference.java
index e326a24..47aa0e9 100644
--- a/luni/src/main/java/java/lang/ref/WeakReference.java
+++ b/luni/src/main/java/java/lang/ref/WeakReference.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
* references. Once the garbage collector decides that an object {@code obj} is
* is weakly-reachable, the following
* happens:
- *
+ *
* <ul>
* <li>
* A set {@code ref} of references is determined. {@code ref} contains the
@@ -64,13 +64,13 @@
* with their corresponding reference queues, if any.
* </li>
* </ul>
- *
+ *
* Weak references are useful for mappings that should have their entries
* removed automatically once they are not referenced any more (from outside).
* The difference between a {@code SoftReference} and a {@code WeakReference} is
* the point of time at which the decision is made to clear and enqueue the
* reference:
- *
+ *
* <ul>
* <li>
* A {@code SoftReference} should be cleared and enqueued <em>as late as
@@ -79,7 +79,7 @@
* </li>
* <li>
* A {@code WeakReference} may be cleared and enqueued as soon as is
- * known to be weakly-referenced.
+ * known to be weakly-referenced.
* </li>
* </ul>
*/
@@ -88,7 +88,7 @@
/**
* Constructs a new weak reference to the given referent. The newly created
* reference is not registered with any reference queue.
- *
+ *
* @param r the referent to track
*/
public WeakReference(T r) {
@@ -99,7 +99,7 @@
/**
* Constructs a new weak reference to the given referent. The newly created
* reference is registered with the given reference queue.
- *
+ *
* @param r the referent to track
* @param q the queue to register to the reference object with. A null value
* results in a weak reference that is not associated with any
diff --git a/luni/src/main/java/java/lang/reflect/AccessibleObject.java b/luni/src/main/java/java/lang/reflect/AccessibleObject.java
index 8990156..a0f289e 100644
--- a/luni/src/main/java/java/lang/reflect/AccessibleObject.java
+++ b/luni/src/main/java/java/lang/reflect/AccessibleObject.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@
* checks are omitted. This allows privileged code, such as Java object
* serialization, object inspectors, and debuggers to have complete access to
* objects.
- *
+ *
* @see Field
* @see Constructor
* @see Method
@@ -64,7 +64,7 @@
* one dimensional array
*/
private static final String DIMENSION_1 = "[]";
-
+
/**
* two dimensional array
*/
@@ -74,10 +74,10 @@
* three dimensional array
*/
private static final String DIMENSION_3 = "[][][]";
-
+
// Holds a mapping from Java type names to native type codes.
static Hashtable<String, String> trans;
-
+
static {
trans = new Hashtable<String, String>(9);
trans.put("byte", "B");
@@ -97,15 +97,15 @@
* flag to {@code false} will enable access checks, setting to {@code true}
* will disable them. If there is a security manager, checkPermission is
* called with a {@code ReflectPermission("suppressAccessChecks")}.
- *
+ *
* @param objects
* the accessible objects
* @param flag
* the new value for the accessible flag
- *
+ *
* @throws SecurityException
* if the request is denied
- *
+ *
* @see #setAccessible(boolean)
* @see ReflectPermission
*/
@@ -115,7 +115,7 @@
if (smgr != null) {
smgr.checkPermission(new ReflectPermission("suppressAccessChecks"));
}
-
+
synchronized(AccessibleObject.class) {
for (int i = 0; i < objects.length; i++) {
objects[i].flag = flag;
@@ -135,7 +135,7 @@
/**
* Indicates whether this object is accessible without security checks being
* performed. Returns the accessible flag.
- *
+ *
* @return {@code true} if this object is accessible without security
* checks, {@code false} otherwise
*/
@@ -148,13 +148,13 @@
* {@code false} will enable access checks, setting to {@code true} will
* disable them. If there is a security manager, checkPermission is called
* with a {@code ReflectPermission("suppressAccessChecks")}.
- *
+ *
* @param flag
* the new value for the accessible flag
- *
+ *
* @throws SecurityException
* if the request is denied
- *
+ *
* @see ReflectPermission
*/
public void setAccessible(boolean flag) throws SecurityException {
@@ -162,20 +162,20 @@
if (smgr != null) {
smgr.checkPermission(new ReflectPermission("suppressAccessChecks"));
}
-
+
this.flag = flag;
}
/**
* Sets the accessible flag on this instance without doing any checks.
- *
+ *
* @param flag
* the new value for the accessible flag
*/
/*package*/ void setAccessibleNoCheck(boolean flag) {
this.flag = flag;
}
-
+
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
return getAnnotation(annotationType) != null;
}
@@ -210,18 +210,18 @@
*
* @param clazz
* the class for which a signature is required
- *
+ *
* @return The signature as a string
*/
String getSignature(Class<?> clazz) {
String result = "";
String nextType = clazz.getName();
-
+
if(trans.containsKey(nextType)) {
result = trans.get(nextType);
} else {
if(clazz.isArray()) {
- result = "[" + getSignature(clazz.getComponentType());
+ result = "[" + getSignature(clazz.getComponentType());
} else {
result = "L" + nextType + ";";
}
@@ -237,7 +237,7 @@
*
* @param types
* the array of classes
- *
+ *
* @return The String of names
*/
String toString(Class<?>[] types) {
@@ -250,7 +250,7 @@
result.append(types[i].getCanonicalName());
}
}
-
+
return result.toString();
}
@@ -296,16 +296,16 @@
static /*package*/ ReflectionAccess getReflectionAccess() {
return ReflectionAccessImpl.THE_ONE;
}
-
-
+
+
/**
* Appends the specified class name to the buffer. The class may represent
* a simple type, a reference type or an array type.
*
* @param sb buffer
* @param obj the class which name should be appended to the buffer
- *
- * @throws NullPointerException if any of the arguments is null
+ *
+ * @throws NullPointerException if any of the arguments is null
*/
void appendArrayType(StringBuilder sb, Class<?> obj) {
if (!obj.isArray()) {
@@ -344,8 +344,8 @@
*
* @param sb buffer
* @param objs array of classes to print the names
- *
- * @throws NullPointerException if any of the arguments is null
+ *
+ * @throws NullPointerException if any of the arguments is null
*/
void appendArrayType(StringBuilder sb, Class[] objs) {
if (objs.length > 0) {
@@ -364,8 +364,8 @@
*
* @param sb buffer
* @param objs array of classes to print the names
- *
- * @throws NullPointerException if any of the arguments is null
+ *
+ * @throws NullPointerException if any of the arguments is null
*/
void appendArrayGenericType(StringBuilder sb, Type[] objs) {
if (objs.length > 0) {
@@ -382,8 +382,8 @@
*
* @param sb buffer
* @param obj the generic type which representation should be appended to the buffer
- *
- * @throws NullPointerException if any of the arguments is null
+ *
+ * @throws NullPointerException if any of the arguments is null
*/
void appendGenericType(StringBuilder sb, Type obj) {
if (obj instanceof TypeVariable) {
@@ -435,13 +435,13 @@
* Appends names of the specified array classes to the buffer. The array
* elements may represent a simple type, a reference type or an array type.
* In case if the specified array element represents an array type its
- * internal will be appended to the buffer.
+ * internal will be appended to the buffer.
* Output format: [Ljava.lang.Object;, java.io.File, void
*
* @param sb buffer
* @param objs array of classes to print the names
- *
- * @throws NullPointerException if any of the arguments is null
+ *
+ * @throws NullPointerException if any of the arguments is null
*/
void appendSimpleType(StringBuilder sb, Class<?>[] objs) {
if (objs.length > 0) {
diff --git a/luni/src/main/java/java/lang/reflect/AnnotatedElement.java b/luni/src/main/java/java/lang/reflect/AnnotatedElement.java
index 426daba..a0de6d4 100644
--- a/luni/src/main/java/java/lang/reflect/AnnotatedElement.java
+++ b/luni/src/main/java/java/lang/reflect/AnnotatedElement.java
@@ -30,7 +30,7 @@
* Returns, for this element, the annotation with the specified type, or
* {@code null} if no annotation with the specified type is present
* (including inherited annotations).
- *
+ *
* @param annotationType
* the type of the annotation to search for
* @return the annotation with the specified type or {@code null}
@@ -43,7 +43,7 @@
* Returns, for this element, an array containing all annotations (including
* inherited annotations). If there are no annotations present, this method
* returns a zero length array.
- *
+ *
* @return an array of all annotations for this element
*/
Annotation[] getAnnotations();
@@ -52,7 +52,7 @@
* Returns, for this element, all annotations that are explicitly declared
* (not inherited). If there are no declared annotations present, this
* method returns a zero length array.
- *
+ *
* @return an array of annotations declared for this element
*/
Annotation[] getDeclaredAnnotations();
@@ -60,7 +60,7 @@
/**
* Indicates whether or not this element has an annotation with the
* specified annotation type (including inherited annotations).
- *
+ *
* @param annotationType
* the type of the annotation to search for
* @return {@code true} if the annotation exists, {@code false} otherwise
diff --git a/luni/src/main/java/java/lang/reflect/Array.java b/luni/src/main/java/java/lang/reflect/Array.java
index 8a12f71..7d408ad 100644
--- a/luni/src/main/java/java/lang/reflect/Array.java
+++ b/luni/src/main/java/java/lang/reflect/Array.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,14 +36,14 @@
* This class provides static methods to create and access arrays dynamically.
*/
public final class Array {
-
+
/**
* Prevent this class from being instantiated.
*/
private Array(){
//do nothing
}
-
+
/**
* Returns the element of the array at the specified index. This reproduces
* the effect of {@code array[index]}. If the array component is a primitive
@@ -53,9 +53,9 @@
* the array
* @param index
* the index
- *
+ *
* @return the requested element, possibly wrapped
- *
+ *
* @throws NullPointerException
* if the array is null
* @throws IllegalArgumentException
@@ -67,34 +67,34 @@
throws IllegalArgumentException, ArrayIndexOutOfBoundsException {
if (array instanceof Object[])
return ((Object[]) array)[index];
-
+
if (array instanceof boolean[])
return ((boolean[]) array)[index] ? Boolean.TRUE : Boolean.FALSE;
-
+
if (array instanceof byte[])
return Byte.valueOf(((byte[]) array)[index]);
-
+
if (array instanceof char[])
return Character.valueOf(((char[]) array)[index]);
-
+
if (array instanceof short[])
return Short.valueOf(((short[]) array)[index]);
-
+
if (array instanceof int[])
return Integer.valueOf(((int[]) array)[index]);
-
+
if (array instanceof long[])
return Long.valueOf(((long[]) array)[index]);
-
+
if (array instanceof float[])
return new Float(((float[]) array)[index]);
-
+
if (array instanceof double[])
return new Double(((double[]) array)[index]);
-
+
if (array == null)
throw new NullPointerException();
-
+
throw new IllegalArgumentException("Not an array");
}
@@ -102,14 +102,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code boolean}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -135,14 +135,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code byte}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -164,14 +164,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code char}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -197,14 +197,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code double}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -226,14 +226,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code float}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -255,14 +255,14 @@
* Returns the element of the array at the specified index, converted to an
* {@code int}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -283,12 +283,12 @@
/**
* Returns the length of the array. This reproduces the effect of {@code
* array.length}
- *
+ *
* @param array
* the array
- *
+ *
* @return the length of the array
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -297,34 +297,34 @@
public static int getLength(Object array) {
if (array instanceof Object[])
return ((Object[]) array).length;
-
+
if (array instanceof boolean[])
return ((boolean[]) array).length;
-
+
if (array instanceof byte[])
return ((byte[]) array).length;
-
+
if (array instanceof char[])
return ((char[]) array).length;
-
+
if (array instanceof short[])
return ((short[]) array).length;
-
+
if (array instanceof int[])
return ((int[]) array).length;
-
+
if (array instanceof long[])
return ((long[]) array).length;
-
+
if (array instanceof float[])
return ((float[]) array).length;
-
+
if (array instanceof double[])
return ((double[]) array).length;
-
+
if (array == null)
throw new NullPointerException();
-
+
throw new IllegalArgumentException("Not an array");
}
@@ -332,14 +332,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code long}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -361,14 +361,14 @@
* Returns the element of the array at the specified index, converted to a
* {@code short}, if possible. This reproduces the effect of {@code
* array[index]}
- *
+ *
* @param array
* the array
* @param index
* the index
- *
+ *
* @return the requested element
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -381,7 +381,7 @@
throws IllegalArgumentException, ArrayIndexOutOfBoundsException {
if (array instanceof short[])
return ((short[]) array)[index];
-
+
return getByte(array, index);
}
@@ -390,14 +390,14 @@
* dimensions. This reproduces the effect of {@code new
* componentType[d0][d1]...[dn]} for a dimensions array of { d0, d1, ... ,
* dn }.
- *
+ *
* @param componentType
* the component type of the new array
* @param dimensions
* the dimensions of the new array
- *
+ *
* @return the new array
- *
+ *
* @throws NullPointerException
* if the component type is {@code null}
* @throws NegativeArraySizeException
@@ -410,13 +410,13 @@
throws NegativeArraySizeException, IllegalArgumentException {
if (dimensions.length <= 0 || dimensions.length > 255)
throw new IllegalArgumentException("Bad number of dimensions");
-
+
if (componentType == Void.TYPE)
throw new IllegalArgumentException();
-
+
if (componentType == null)
throw new NullPointerException();
-
+
return createMultiArray(componentType, dimensions);
}
@@ -434,9 +434,9 @@
* the component type of the new array
* @param size
* the length of the new array
- *
+ *
* @return the new array
- *
+ *
* @throws NullPointerException
* if the component type is null
* @throws NegativeArraySizeException
@@ -446,31 +446,31 @@
throws NegativeArraySizeException {
if (!componentType.isPrimitive())
return createObjectArray(componentType, size);
-
+
if (componentType == Boolean.TYPE)
return new boolean[size];
-
+
if (componentType == Byte.TYPE)
return new byte[size];
-
+
if (componentType == Character.TYPE)
return new char[size];
-
+
if (componentType == Short.TYPE)
return new short[size];
-
+
if (componentType == Integer.TYPE)
return new int[size];
-
+
if (componentType == Long.TYPE)
return new long[size];
-
+
if (componentType == Float.TYPE)
return new float[size];
-
+
if (componentType == Double.TYPE)
return new double[size];
-
+
if (componentType == Void.TYPE)
throw new IllegalArgumentException();
@@ -482,19 +482,19 @@
*/
native private static Object createObjectArray(Class<?> componentType,
int length) throws NegativeArraySizeException;
-
+
/**
* Sets the element of the array at the specified index to the value. This
* reproduces the effect of {@code array[index] = value}. If the array
* component is a primitive type, the value is automatically unwrapped.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -508,20 +508,20 @@
if (!array.getClass().isArray()) {
throw new IllegalArgumentException("Not an array type");
}
-
+
if (array instanceof Object[]) {
if (value != null &&
!array.getClass().getComponentType().isInstance(value)) {
// incompatible object type for this array
throw new IllegalArgumentException("Wrong array type");
}
-
+
((Object[]) array)[index] = value;
} else {
if (value == null) {
throw new IllegalArgumentException("Primitive array can't take null values.");
}
-
+
if (value instanceof Boolean)
setBoolean(array, index, ((Boolean) value).booleanValue());
else if (value instanceof Byte)
@@ -545,14 +545,14 @@
* Sets the element of the array at the specified index to the {@code
* boolean} value. This reproduces the effect of {@code array[index] =
* value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -572,14 +572,14 @@
/**
* Sets the element of the array at the specified index to the {@code byte}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -600,14 +600,14 @@
/**
* Set the element of the array at the specified index to the {@code char}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -632,14 +632,14 @@
/**
* Set the element of the array at the specified index to the {@code double}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -664,14 +664,14 @@
/**
* Set the element of the array at the specified index to the {@code float}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -692,14 +692,14 @@
/**
* Set the element of the array at the specified index to the {@code int}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -720,14 +720,14 @@
/**
* Set the element of the array at the specified index to the {@code long}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
@@ -748,14 +748,14 @@
/**
* Set the element of the array at the specified index to the {@code short}
* value. This reproduces the effect of {@code array[index] = value}.
- *
+ *
* @param array
* the array
* @param index
* the index
* @param value
* the new value
- *
+ *
* @throws NullPointerException
* if the {@code array} is {@code null}
* @throws IllegalArgumentException
diff --git a/luni/src/main/java/java/lang/reflect/Constructor.java b/luni/src/main/java/java/lang/reflect/Constructor.java
index 784f273..98b4c99 100644
--- a/luni/src/main/java/java/lang/reflect/Constructor.java
+++ b/luni/src/main/java/java/lang/reflect/Constructor.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,18 +44,18 @@
/**
* This class represents a constructor. Information about the constructor can be
* accessed, and the constructor can be invoked dynamically.
- *
+ *
* @param <T> the class that declares this constructor
*/
public final class Constructor<T> extends AccessibleObject implements GenericDeclaration,
Member {
-
+
Class<T> declaringClass;
-
+
Class<?>[] parameterTypes;
-
+
Class<?>[] exceptionTypes;
-
+
ListOfTypes genericExceptionTypes;
ListOfTypes genericParameterTypes;
TypeVariable<Constructor<T>>[] formalTypeParameters;
@@ -154,11 +154,11 @@
appendArrayType(sb, getDeclaringClass());
// append parameters
sb.append('(');
- appendArrayGenericType(sb,
+ appendArrayGenericType(sb,
Types.getClonedTypeArray(genericParameterTypes));
sb.append(')');
// append exceptions if any
- Type[] genericExceptionTypeArray =
+ Type[] genericExceptionTypeArray =
Types.getClonedTypeArray(genericExceptionTypes);
if (genericExceptionTypeArray.length > 0) {
sb.append(" throws ");
@@ -171,9 +171,9 @@
* Returns the generic parameter types as an array of {@code Type}
* instances, in declaration order. If this constructor has no generic
* parameters, an empty array is returned.
- *
+ *
* @return the parameter types
- *
+ *
* @throws GenericSignatureFormatError
* if the generic constructor signature is invalid
* @throws TypeNotPresentException
@@ -191,9 +191,9 @@
* Returns the exception types as an array of {@code Type} instances. If
* this constructor has no declared exceptions, an empty array will be
* returned.
- *
+ *
* @return an array of generic exception types
- *
+ *
* @throws GenericSignatureFormatError
* if the generic constructor signature is invalid
* @throws TypeNotPresentException
@@ -219,7 +219,7 @@
* parameters of this constructor. If there are no parameters on this
* constructor, then an empty array is returned. If there are no annotations
* set, then an array of empty arrays is returned.
- *
+ *
* @return an array of arrays of {@code Annotation} instances
*/
public Annotation[][] getParameterAnnotations() {
@@ -248,7 +248,7 @@
/**
* Indicates whether or not this constructor is synthetic (artificially
* introduced by the compiler).
- *
+ *
* @return {@code true} if this constructor is synthetic, {@code false}
* otherwise
*/
@@ -262,13 +262,13 @@
* constructor. To be equal, the specified object must be an instance
* of {@code Constructor} with the same declaring class and parameter types
* as this constructor.
- *
+ *
* @param object
* the object to compare
- *
+ *
* @return {@code true} if the specified object is equal to this
* constructor, {@code false} otherwise
- *
+ *
* @see #hashCode
*/
@Override
@@ -289,7 +289,7 @@
* Returns the exception types as an array of {@code Class} instances. If
* this constructor has no declared exceptions, an empty array will be
* returned.
- *
+ *
* @return the declared exception classes
*/
public Class<?>[] getExceptionTypes() {
@@ -301,9 +301,9 @@
/**
* Returns the modifiers for this constructor. The {@link Modifier} class
* should be used to decode the result.
- *
+ *
* @return the modifiers for this constructor
- *
+ *
* @see Modifier
*/
public int getModifiers() {
@@ -311,7 +311,7 @@
}
private native int getConstructorModifiers(Class<T> declaringClass, int slot);
-
+
/**
* Returns the name of this constructor.
*
@@ -342,13 +342,13 @@
@SuppressWarnings("unused")
private String getSignature() {
StringBuilder result = new StringBuilder();
-
+
result.append('(');
- for(int i = 0; i < parameterTypes.length; i++) {
+ for(int i = 0; i < parameterTypes.length; i++) {
result.append(getSignature(parameterTypes[i]));
}
result.append(")V");
-
+
return result.toString();
}
@@ -358,7 +358,7 @@
* Constructor is the hash code of the name of the declaring class.
*
* @return the hash code
- *
+ *
* @see #equals
*/
@Override
@@ -394,12 +394,12 @@
* then thrown. If the invocation completes normally, the newly initialized
* object is returned.
* </ul>
- *
+ *
* @param args
* the arguments to the constructor
- *
+ *
* @return the new, initialized, object
- *
+ *
* @exception InstantiationException
* if the class cannot be instantiated
* @exception IllegalAccessException
@@ -409,7 +409,7 @@
* argument could not be converted by a widening conversion
* @exception InvocationTargetException
* if an exception was thrown by the invoked constructor
- *
+ *
* @see AccessibleObject
*/
public T newInstance(Object... args) throws InstantiationException, IllegalAccessException,
@@ -425,7 +425,7 @@
/**
* Returns a string containing a concise, human-readable description of this
* constructor. The format of the string is:
- *
+ *
* <ol>
* <li>modifiers (if any)
* <li>declaring class name
@@ -434,7 +434,7 @@
* <li>')'
* <li>'throws' plus exception types, separated by ',' (if any)
* </ol>
- *
+ *
* For example:
* {@code public String(byte[],String) throws UnsupportedEncodingException}
*
@@ -454,7 +454,7 @@
result.append(" throws ");
result.append(toString(exceptionTypes));
}
-
+
return result.toString();
}
}
diff --git a/luni/src/main/java/java/lang/reflect/Field.java b/luni/src/main/java/java/lang/reflect/Field.java
index baaafdd..efb316d 100644
--- a/luni/src/main/java/java/lang/reflect/Field.java
+++ b/luni/src/main/java/java/lang/reflect/Field.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -81,7 +81,7 @@
*/
/*package*/ Field(Field orig) {
this(orig.declaringClass, orig.type, orig.name, orig.slot);
-
+
// Copy the accessible flag.
if (orig.flag) {
this.flag = true;
@@ -128,7 +128,7 @@
/**
* Indicates whether or not this field is synthetic.
- *
+ *
* @return {@code true} if this field is synthetic, {@code false} otherwise
*/
public boolean isSynthetic() {
@@ -139,7 +139,7 @@
/**
* Returns the string representation of this field, including the field's
* generic type.
- *
+ *
* @return the string representation of this field
*/
public String toGenericString() {
@@ -159,7 +159,7 @@
/**
* Indicates whether or not this field is an enumeration constant.
- *
+ *
* @return {@code true} if this field is an enumeration constant, {@code
* false} otherwise
*/
@@ -170,7 +170,7 @@
/**
* Returns the generic type of this field.
- *
+ *
* @return the generic type
* @throws GenericSignatureFormatError
* if the generic field signature is invalid
@@ -196,7 +196,7 @@
* Indicates whether or not the specified {@code object} is equal to this
* field. To be equal, the specified object must be an instance of
* {@code Field} with the same declaring class, type and name as this field.
- *
+ *
* @param object
* the object to compare
* @return {@code true} if the specified object is equal to this method,
@@ -224,7 +224,7 @@
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
* <p>
- *
+ *
* @param object
* the object to access
* @return the field value, possibly wrapped
@@ -251,7 +251,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -279,7 +279,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -306,7 +306,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -342,7 +342,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -369,7 +369,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -396,7 +396,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -423,7 +423,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -472,7 +472,7 @@
* If this Field object is enforcing access control (see AccessibleObject)
* and this field is not accessible from the current context, an
* IllegalAccessException is thrown.
- *
+ *
* @param object
* the object to access
* @return the field value
@@ -491,7 +491,7 @@
* Returns the constructor's signature in non-printable form. This is called
* (only) from IO native code and needed for deriving the serialVersionUID
* of the class
- *
+ *
* @return the constructor's signature.
*/
@SuppressWarnings("unused")
@@ -501,7 +501,7 @@
/**
* Return the {@link Class} associated with the type of this field.
- *
+ *
* @return the type of this field
*/
public Class<?> getType() {
@@ -515,7 +515,7 @@
* The hash code for a Field is the exclusive-or combination of the hash
* code of the field's name and the hash code of the name of its declaring
* class.
- *
+ *
* @return the hash code for this field
* @see #equals
*/
@@ -543,7 +543,7 @@
* unwrapped. If the unwrap fails, an IllegalArgumentException is thrown. If
* the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -576,7 +576,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -608,7 +608,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -640,7 +640,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -672,7 +672,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -704,7 +704,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -736,7 +736,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -768,7 +768,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -800,7 +800,7 @@
* <p>
* If the value cannot be converted to the field type via a widening
* conversion, an IllegalArgumentException is thrown.
- *
+ *
* @param object
* the object to access
* @param value
@@ -832,7 +832,7 @@
* <p>
* For example: {@code public static java.io.InputStream
* java.lang.System.in}
- *
+ *
* @return a printable representation for this field
*/
@Override
diff --git a/luni/src/main/java/java/lang/reflect/GenericArrayType.java b/luni/src/main/java/java/lang/reflect/GenericArrayType.java
index 56f873d..6344019 100644
--- a/luni/src/main/java/java/lang/reflect/GenericArrayType.java
+++ b/luni/src/main/java/java/lang/reflect/GenericArrayType.java
@@ -20,7 +20,7 @@
/**
* This interface represents an array type with a component type that is either
* a parameterized type or a type variable.
- *
+ *
* @since 1.5
*/
public interface GenericArrayType extends Type {
diff --git a/luni/src/main/java/java/lang/reflect/GenericDeclaration.java b/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
index 880350b..ceeda92 100644
--- a/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
+++ b/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@
/**
* Returns the declared type parameters in declaration order. If there are
* no type parameters, this method returns a zero length array.
- *
+ *
* @return the declared type parameters in declaration order
* @throws GenericSignatureFormatError
* if the signature is malformed
diff --git a/luni/src/main/java/java/lang/reflect/GenericSignatureFormatError.java b/luni/src/main/java/java/lang/reflect/GenericSignatureFormatError.java
index c113006..d9363c0 100644
--- a/luni/src/main/java/java/lang/reflect/GenericSignatureFormatError.java
+++ b/luni/src/main/java/java/lang/reflect/GenericSignatureFormatError.java
@@ -20,7 +20,7 @@
/**
* Indicates that a malformed signature has been encountered via a reflective
* method.
- *
+ *
* @since 1.5
*/
public class GenericSignatureFormatError extends ClassFormatError {
diff --git a/luni/src/main/java/java/lang/reflect/InvocationHandler.java b/luni/src/main/java/java/lang/reflect/InvocationHandler.java
index fe3eaba..c5bd7d2 100644
--- a/luni/src/main/java/java/lang/reflect/InvocationHandler.java
+++ b/luni/src/main/java/java/lang/reflect/InvocationHandler.java
@@ -19,7 +19,7 @@
/**
* Implementors of this interface dispatch methods invoked on proxy instances.
- *
+ *
* @see Proxy
*/
public interface InvocationHandler {
@@ -27,18 +27,18 @@
/**
* Handles the method which was originally invoked on the proxy instance. A
* typical usage pattern follows below:
- *
+ *
* <pre>
* public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
* //do some processing before the method invocation
- *
+ *
* //invoke the method
* Object result = method.invoke(proxy, args);
- *
+ *
* //do some processing after the method invocation
* return result;
* }</pre>
- *
+ *
* @param proxy
* the proxy instance on which the method was invoked
* @param method
@@ -47,10 +47,10 @@
* an array of objects containing the parameters passed to the
* method, or {@code null} if no arguments are expected.
* Primitive types are wrapped in the appropriate wrapper type
- *
+ *
* @return the result of executing the method. Primitive types need to be
* wrapped in the appropriate wrapper type
- *
+ *
* @throws Throwable
* the exception to throw from the invoked method on the proxy.
* The exception must match one of the declared exception types
diff --git a/luni/src/main/java/java/lang/reflect/InvocationTargetException.java b/luni/src/main/java/java/lang/reflect/InvocationTargetException.java
index 6dc44e7..a87441f 100644
--- a/luni/src/main/java/java/lang/reflect/InvocationTargetException.java
+++ b/luni/src/main/java/java/lang/reflect/InvocationTargetException.java
@@ -20,7 +20,7 @@
/**
* This class provides a wrapper for an exception thrown by a {@code Method} or
* {@code Constructor} invocation.
- *
+ *
* @see Method#invoke
* @see Constructor#newInstance
*/
@@ -41,7 +41,7 @@
/**
* Constructs a new {@code InvocationTargetException} instance with its
* cause / target exception filled in.
- *
+ *
* @param exception
* the exception which occurred while running the Method or
* Constructor
@@ -54,7 +54,7 @@
/**
* Constructs a new {@code InvocationTargetException} instance with its
* cause / target exception and message filled in.
- *
+ *
* @param detailMessage
* the detail message for the exception
* @param exception
@@ -68,7 +68,7 @@
/**
* Returns the target exception, which may be {@code null}.
- *
+ *
* @return the target exception
*/
public Throwable getTargetException() {
@@ -77,7 +77,7 @@
/**
* Returns the cause of this exception, which may be {@code null}.
- *
+ *
* @return the cause of this exception
*/
@Override
diff --git a/luni/src/main/java/java/lang/reflect/MalformedParameterizedTypeException.java b/luni/src/main/java/java/lang/reflect/MalformedParameterizedTypeException.java
index 71f2819..952db94 100644
--- a/luni/src/main/java/java/lang/reflect/MalformedParameterizedTypeException.java
+++ b/luni/src/main/java/java/lang/reflect/MalformedParameterizedTypeException.java
@@ -20,7 +20,7 @@
/**
* Indicates that a malformed parameterized type has been encountered by a
* reflective method.
- *
+ *
* @since 1.5
*/
public class MalformedParameterizedTypeException extends RuntimeException {
diff --git a/luni/src/main/java/java/lang/reflect/Member.java b/luni/src/main/java/java/lang/reflect/Member.java
index a91e108..80f6966 100644
--- a/luni/src/main/java/java/lang/reflect/Member.java
+++ b/luni/src/main/java/java/lang/reflect/Member.java
@@ -19,7 +19,7 @@
/**
* Common interface providing access to reflective information on class members.
- *
+ *
* @see Field
* @see Constructor
* @see Method
@@ -70,7 +70,7 @@
/**
* Indicates whether or not this member is synthetic (artificially
* introduced by the compiler).
- *
+ *
* @return {@code true} if this member is synthetic, {@code false} otherwise
*/
boolean isSynthetic();
diff --git a/luni/src/main/java/java/lang/reflect/Method.java b/luni/src/main/java/java/lang/reflect/Method.java
index 6678f8c..0795a5d 100644
--- a/luni/src/main/java/java/lang/reflect/Method.java
+++ b/luni/src/main/java/java/lang/reflect/Method.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,17 +46,17 @@
* and the method can be invoked dynamically.
*/
public final class Method extends AccessibleObject implements GenericDeclaration, Member {
-
+
private int slot;
-
+
private Class<?> declaringClass;
-
+
private String name;
-
+
private Class<?>[] parameterTypes;
-
+
private Class<?>[] exceptionTypes;
-
+
private Class<?> returnType;
private ListOfTypes genericExceptionTypes;
@@ -119,7 +119,7 @@
return StringUtils.combineStrings(annotation);
}
-
+
/**
* Returns the Signature annotation for this method. Returns {@code null} if
* not found.
@@ -135,13 +135,13 @@
*/
public String toGenericString() {
StringBuilder sb = new StringBuilder(80);
-
+
initGenericTypes();
// append modifiers if any
int modifier = getModifiers();
if (modifier != 0) {
- sb.append(Modifier.toString(modifier & ~(Modifier.BRIDGE +
+ sb.append(Modifier.toString(modifier & ~(Modifier.BRIDGE +
Modifier.VARARGS))).append(' ');
}
// append type parameters
@@ -163,7 +163,7 @@
sb.append("."+getName());
// append parameters
sb.append('(');
- appendArrayGenericType(sb,
+ appendArrayGenericType(sb,
Types.getClonedTypeArray(genericParameterTypes));
sb.append(')');
// append exceptions if any
@@ -182,7 +182,7 @@
* returned.
*
* @return the parameter types
- *
+ *
* @throws GenericSignatureFormatError
* if the generic method signature is invalid
* @throws TypeNotPresentException
@@ -199,9 +199,9 @@
/**
* Returns the exception types as an array of {@code Type} instances. If
* this method has no declared exceptions, an empty array will be returned.
- *
+ *
* @return an array of generic exception types
- *
+ *
* @throws GenericSignatureFormatError
* if the generic method signature is invalid
* @throws TypeNotPresentException
@@ -219,7 +219,7 @@
* Returns the return type of this method as a {@code Type} instance.
*
* @return the return type of this method
- *
+ *
* @throws GenericSignatureFormatError
* if the generic method signature is invalid
* @throws TypeNotPresentException
@@ -306,9 +306,9 @@
/**
* Returns the default value for the annotation member represented by this
* method.
- *
+ *
* @return the default value, or {@code null} if none
- *
+ *
* @throws TypeNotPresentException
* if this annotation member is of type {@code Class} and no
* definition can be found
@@ -323,13 +323,13 @@
* method. To be equal, the specified object must be an instance
* of {@code Method} with the same declaring class and parameter types
* as this method.
- *
+ *
* @param object
* the object to compare
- *
+ *
* @return {@code true} if the specified object is equal to this
* method, {@code false} otherwise
- *
+ *
* @see #hashCode
*/
@Override
@@ -349,7 +349,7 @@
/**
* Returns the exception types as an array of {@code Class} instances. If
* this method has no declared exceptions, an empty array is returned.
- *
+ *
* @return the declared exception classes
*/
public Class<?>[] getExceptionTypes() {
@@ -365,7 +365,7 @@
* be used to decode the result.
*
* @return the modifiers for this method
- *
+ *
* @see Modifier
*/
public int getModifiers() {
@@ -377,7 +377,7 @@
/**
* Returns the name of the method represented by this {@code Method}
* instance.
- *
+ *
* @return the name of this method
*/
public String getName() {
@@ -388,7 +388,7 @@
* Returns an array of {@code Class} objects associated with the parameter
* types of this method. If the method was declared with no parameters, an
* empty array will be returned.
- *
+ *
* @return the parameter types
*/
public Class<?>[] getParameterTypes() {
@@ -398,7 +398,7 @@
/**
* Returns the {@code Class} associated with the return type of this
* method.
- *
+ *
* @return the return type
*/
public Class<?> getReturnType() {
@@ -409,9 +409,9 @@
* Returns an integer hash code for this method. Objects which are equal
* return the same value for this method. The hash code for this Method is
* the hash code of the name of this method.
- *
+ *
* @return hash code for this method
- *
+ *
* @see #equals
*/
@Override
@@ -452,14 +452,14 @@
* return value is first wrapped. If the return type is void, null is
* returned.</li>
* </ul>
- *
+ *
* @param receiver
* the object on which to call this method
* @param args
* the arguments to the method
- *
+ *
* @return the new, initialized, object
- *
+ *
* @throws NullPointerException
* if the receiver is null for a non-static method
* @throws IllegalAccessException
@@ -470,7 +470,7 @@
* could not be converted by a widening conversion
* @throws InvocationTargetException
* if an exception was thrown by the invoked method
- *
+ *
* @see AccessibleObject
*/
public Object invoke(Object receiver, Object... args)
@@ -491,7 +491,7 @@
/**
* Returns a string containing a concise, human-readable description of this
* method. The format of the string is:
- *
+ *
* <ol>
* <li>modifiers (if any)
* <li>return type or 'void'
@@ -506,7 +506,7 @@
* java.lang.Method.invoke(Object,Object) throws
* IllegalAccessException,IllegalArgumentException
* ,InvocationTargetException}
- *
+ *
* @return a printable representation for this method
*/
@Override
@@ -527,10 +527,10 @@
result.append(" throws ");
result.append(toString(exceptionTypes));
}
-
+
return result.toString();
}
-
+
/**
* Returns the constructor's signature in non-printable form. This is called
* (only) from IO native code and needed for deriving the serialVersionUID
@@ -541,15 +541,15 @@
@SuppressWarnings("unused")
private String getSignature() {
StringBuilder result = new StringBuilder();
-
+
result.append('(');
- for(int i = 0; i < parameterTypes.length; i++) {
+ for(int i = 0; i < parameterTypes.length; i++) {
result.append(getSignature(parameterTypes[i]));
}
result.append(')');
result.append(getSignature(returnType));
-
+
return result.toString();
}
-
+
}
diff --git a/luni/src/main/java/java/lang/reflect/Modifier.java b/luni/src/main/java/java/lang/reflect/Modifier.java
index 9005647..4ae460b 100644
--- a/luni/src/main/java/java/lang/reflect/Modifier.java
+++ b/luni/src/main/java/java/lang/reflect/Modifier.java
@@ -113,7 +113,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* abstract} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -126,7 +126,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* final} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -139,7 +139,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* interface} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -152,7 +152,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* native} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -165,7 +165,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* private} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -178,7 +178,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* protected} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -191,7 +191,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* public} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -204,7 +204,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* static} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -217,7 +217,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* strict} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -230,7 +230,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* synchronized} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -243,7 +243,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* transient} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
@@ -256,7 +256,7 @@
/**
* Indicates whether or not the specified modifiers contain the {@code
* volatile} modifier.
- *
+ *
* @param modifiers
* the modifiers to test
* @return {@code true} if the specified modifiers contain the {@code
diff --git a/luni/src/main/java/java/lang/reflect/ParameterizedType.java b/luni/src/main/java/java/lang/reflect/ParameterizedType.java
index 91f2520..e98827b 100644
--- a/luni/src/main/java/java/lang/reflect/ParameterizedType.java
+++ b/luni/src/main/java/java/lang/reflect/ParameterizedType.java
@@ -55,7 +55,7 @@
/**
* Returns the parent / owner type, if this type is an inner type, otherwise
* {@code null} is returned if this is a top-level type.
- *
+ *
* @return the owner type or {@code null} if this is a top-level type
*
* @throws TypeNotPresentException
diff --git a/luni/src/main/java/java/lang/reflect/Proxy.java b/luni/src/main/java/java/lang/reflect/Proxy.java
index 3124dd4..affaac4 100644
--- a/luni/src/main/java/java/lang/reflect/Proxy.java
+++ b/luni/src/main/java/java/lang/reflect/Proxy.java
@@ -108,32 +108,32 @@
}
String name = next.getName();
if (!next.isInterface()) {
- throw new IllegalArgumentException(Msg.getString("K00ed", name));
+ throw new IllegalArgumentException(Msg.getString("K00ed", name));
}
if (loader != next.getClassLoader()) {
try {
if (next != Class.forName(name, false, loader)) {
throw new IllegalArgumentException(Msg.getString(
- "K00ee", name));
+ "K00ee", name));
}
} catch (ClassNotFoundException ex) {
- throw new IllegalArgumentException(Msg.getString("K00ee",
+ throw new IllegalArgumentException(Msg.getString("K00ee",
name));
}
}
for (int j = i + 1; j < length; j++) {
if (next == interfaces[j]) {
- throw new IllegalArgumentException(Msg.getString("K00ef",
+ throw new IllegalArgumentException(Msg.getString("K00ef",
name));
}
}
if (!Modifier.isPublic(next.getModifiers())) {
int last = name.lastIndexOf('.');
- String p = last == -1 ? "" : name.substring(0, last);
+ String p = last == -1 ? "" : name.substring(0, last);
if (commonPackageName == null) {
commonPackageName = p;
} else if (!commonPackageName.equals(p)) {
- throw new IllegalArgumentException(Msg.getString("K00f0"));
+ throw new IllegalArgumentException(Msg.getString("K00f0"));
}
}
}
@@ -149,7 +149,7 @@
(interfaceCache = new HashMap<String, WeakReference<Class<?>>>()));
}
- String interfaceKey = "";
+ String interfaceKey = "";
if (interfaces.length == 1) {
interfaceKey = interfaces[0].getName();
} else {
@@ -164,9 +164,9 @@
Class<?> newClass;
WeakReference<Class<?>> ref = interfaceCache.get(interfaceKey);
if (ref == null) {
- String nextClassName = "$Proxy" + NextClassNameIndex++;
+ String nextClassName = "$Proxy" + NextClassNameIndex++;
if (commonPackageName != null && commonPackageName.length() > 0) {
- nextClassName = commonPackageName + "." + nextClassName;
+ nextClassName = commonPackageName + "." + nextClassName;
}
// BEGIN android-changed
// byte[] classFileBytes = ProxyClassFile.generateBytes(
@@ -185,7 +185,7 @@
newClass));
synchronized (proxyCache) {
// the value is unused
- proxyCache.put(newClass, "");
+ proxyCache.put(newClass, "");
}
} else {
newClass = ref.get();
@@ -282,7 +282,7 @@
return ((Proxy) proxy).h;
}
- throw new IllegalArgumentException(Msg.getString("K00f1"));
+ throw new IllegalArgumentException(Msg.getString("K00f1"));
}
// BEGIN android-changed
diff --git a/luni/src/main/java/java/lang/reflect/ReflectPermission.java b/luni/src/main/java/java/lang/reflect/ReflectPermission.java
index 93eef39..ce69dec 100644
--- a/luni/src/main/java/java/lang/reflect/ReflectPermission.java
+++ b/luni/src/main/java/java/lang/reflect/ReflectPermission.java
@@ -30,7 +30,7 @@
/**
* Constructs a new {@code ReflectPermission} instance with the specified
* name.
- *
+ *
* @param permissionName
* the name of the new permission
* @throws IllegalArgumentException
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code ReflectPermission} instance with the specified
* name and action list. The action list will be ignored.
- *
+ *
* @param name
* the name of the new permission
* @param actions
diff --git a/luni/src/main/java/java/lang/reflect/Type.java b/luni/src/main/java/java/lang/reflect/Type.java
index a057088..b8b0081 100644
--- a/luni/src/main/java/java/lang/reflect/Type.java
+++ b/luni/src/main/java/java/lang/reflect/Type.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/lang/reflect/TypeVariable.java b/luni/src/main/java/java/lang/reflect/TypeVariable.java
index e3f8c1d..0ba57fb 100644
--- a/luni/src/main/java/java/lang/reflect/TypeVariable.java
+++ b/luni/src/main/java/java/lang/reflect/TypeVariable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/lang/reflect/UndeclaredThrowableException.java b/luni/src/main/java/java/lang/reflect/UndeclaredThrowableException.java
index bd5adfa..4b545bb 100644
--- a/luni/src/main/java/java/lang/reflect/UndeclaredThrowableException.java
+++ b/luni/src/main/java/java/lang/reflect/UndeclaredThrowableException.java
@@ -32,7 +32,7 @@
/**
* Constructs a new {@code UndeclaredThrowableException} instance with the
* undeclared, checked exception that occurred.
- *
+ *
* @param exception
* the undeclared, checked exception that occurred
*/
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code UndeclaredThrowableException} instance with the
* undeclared, checked exception that occurred and a message.
- *
+ *
* @param detailMessage
* the detail message for the exception
* @param exception
diff --git a/luni/src/main/java/java/math/BigInteger.java b/luni/src/main/java/java/math/BigInteger.java
index adef534..c113d6b 100644
--- a/luni/src/main/java/java/math/BigInteger.java
+++ b/luni/src/main/java/java/math/BigInteger.java
@@ -161,13 +161,13 @@
/**/
private transient int firstNonzeroDigit = -2;
-
+
/** sign field, used for serialization. */
private int signum;
/** absolute value field, used for serialization */
private byte[] magnitude;
-
+
/** Cache for the hash code. */
private transient int hashCode = 0;
@@ -189,7 +189,7 @@
/**
* Constructs a number without creating new space. This construct should be
* used only if the three fields of representation are known.
- *
+ *
* @param sign
* the sign of the number.
* @param numberLength
@@ -208,7 +208,7 @@
/**
* Constructs a random non-negative {@code BigInteger} instance in the range
* [0, 2^(numBits)-1].
- *
+ *
* @param numBits
* maximum length of the new {@code BigInteger} in bits.
* @param rnd
@@ -246,11 +246,11 @@
* <p>
* <b>Implementation Note:</b>
* Currently {@code rnd} is ignored. The implementation always uses
- * method {@code bn_rand} from the OpenSSL library. {@code bn_rand}
+ * method {@code bn_rand} from the OpenSSL library. {@code bn_rand}
* generates cryptographically strong pseudo-random numbers.
* @see <a href="http://www.openssl.org/docs/crypto/BN_rand.html">
* Specification of random generator used from OpenSSL library</a>
- *
+ *
* @param bitLength
* length of the new {@code BigInteger} in bits.
* @param certainty
@@ -274,7 +274,7 @@
* representation. The string representation consists of an optional plus or minus
* sign followed by a non-empty sequence of decimal digits.
* Digits are interpreted as if by {@code Character.digit(char, 10)}.
- *
+ *
* @param val
* string representation of the new {@code BigInteger}.
* @throws NullPointerException
@@ -295,7 +295,7 @@
* representation. The string representation consists of an optional plus or minus
* sign followed by a non-empty sequence of digits in the specified radix.
* Digits are interpreted as if by {@code Character.digit(char, radix)}.
- *
+ *
* @param val
* string representation of the new {@code BigInteger}.
* @param radix
@@ -338,7 +338,7 @@
* given magnitude. The sign is given as an integer (-1 for negative, 0 for
* zero, 1 for positive). The magnitude is specified as a byte array. The
* most significant byte is the entry at index 0.
- *
+ *
* @param signum
* sign of the new {@code BigInteger} (-1 for negative, 0 for
* zero, 1 for positive).
@@ -375,7 +375,7 @@
* representation. The most significant byte is the entry at index 0. The
* most significant bit of this entry determines the sign of the new {@code
* BigInteger} instance. The given array must not be empty.
- *
+ *
* @param val
* two's complement representation of the new {@code BigInteger}.
* @throws NullPointerException
@@ -396,7 +396,7 @@
/**
* Creates a new {@code BigInteger} whose value is equal to the specified
* {@code long} argument.
- *
+ *
* @param val
* the value of the new {@code BigInteger}.
* @return {@code BigInteger} instance with the value {@code val}.
@@ -417,7 +417,7 @@
/**
* Returns the two's complement representation of this BigInteger in a byte
* array.
- *
+ *
* @return two's complement representation of {@code this}.
*/
public byte[] toByteArray() {
@@ -427,7 +427,7 @@
/**
* Returns a (new) {@code BigInteger} whose value is the absolute value of
* {@code this}.
- *
+ *
* @return {@code abs(this)}.
*/
public BigInteger abs() {
@@ -442,7 +442,7 @@
/**
* Returns a new {@code BigInteger} whose value is the {@code -this}.
- *
+ *
* @return {@code -this}.
*/
public BigInteger negate() {
@@ -458,7 +458,7 @@
/**
* Returns a new {@code BigInteger} whose value is {@code this + val}.
- *
+ *
* @param val
* value to be added to {@code this}.
* @return {@code this + val}.
@@ -474,7 +474,7 @@
/**
* Returns a new {@code BigInteger} whose value is {@code this - val}.
- *
+ *
* @param val
* value to be subtracted from {@code this}.
* @return {@code this - val}.
@@ -489,8 +489,8 @@
/**
* Returns the sign of this {@code BigInteger}.
- *
- * @return {@code -1} if {@code this < 0},
+ *
+ * @return {@code -1} if {@code this < 0},
* {@code 0} if {@code this == 0},
* {@code 1} if {@code this > 0}.
*/
@@ -509,7 +509,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method on negative values is
* not recommended as the current implementation is not efficient.
- *
+ *
* @param n
* shift distance
* @return {@code this >> n} if {@code n >= 0}; {@code this << (-n)}
@@ -527,7 +527,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method on negative values is
* not recommended as the current implementation is not efficient.
- *
+ *
* @param n
* shift distance.
* @return {@code this << n} if {@code n >= 0}; {@code this >> (-n)}.
@@ -564,7 +564,7 @@
* <p>
* The value will fit into an {@code int} if {@code bitLength() < 32} or
* into a {@code long} if {@code bitLength() < 64}.
- *
+ *
* @return the length of the minimal two's complement representation for
* {@code this} without the sign bit.
*/
@@ -582,7 +582,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param n
* position where the bit in {@code this} has to be inspected.
* @return {@code this & (2^n) != 0}.
@@ -634,7 +634,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param n
* position where the bit in {@code this} has to be set.
* @return {@code this | 2^n}.
@@ -657,7 +657,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param n
* position where the bit in {@code this} has to be cleared.
* @return {@code this & ~(2^n)}.
@@ -680,7 +680,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param n
* position where the bit in {@code this} has to be flipped.
* @return {@code this ^ 2^n}.
@@ -702,7 +702,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @return position of lowest bit if {@code this != 0}, {@code -1} otherwise
*/
public int getLowestSetBit() {
@@ -727,7 +727,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @return number of bits in the binary representation of {@code this} which
* differ from the sign bit
*/
@@ -742,7 +742,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @return {@code ~this}.
*/
public BigInteger not() {
@@ -755,7 +755,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param val
* value to be and'ed with {@code this}.
* @return {@code this & val}.
@@ -773,7 +773,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param val
* value to be or'ed with {@code this}.
* @return {@code this | val}.
@@ -791,7 +791,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param val
* value to be xor'ed with {@code this}
* @return {@code this ^ val}
@@ -811,7 +811,7 @@
* <p>
* <b>Implementation Note:</b> Usage of this method is not recommended as
* the current implementation is not efficient.
- *
+ *
* @param val
* value to be not'ed and then and'ed with {@code this}.
* @return {@code this & ~val}.
@@ -827,7 +827,7 @@
/**
* Returns this {@code BigInteger} as an int value. If {@code this} is too
* big to be represented as an int, then {@code this} % 2^32 is returned.
- *
+ *
* @return this {@code BigInteger} as an int value.
*/
@Override
@@ -844,7 +844,7 @@
/**
* Returns this {@code BigInteger} as an long value. If {@code this} is too
* big to be represented as an long, then {@code this} % 2^64 is returned.
- *
+ *
* @return this {@code BigInteger} as a long value.
*/
@Override
@@ -868,7 +868,7 @@
* integers x in the range [-Float.MAX_VALUE, Float.MAX_VALUE] can be
* represented as a float. The float representation has a mantissa of length
* 24. For example, 2^24+1 = 16777217 is returned as float 16777216.0.
- *
+ *
* @return this {@code BigInteger} as a float value.
*/
@Override
@@ -885,7 +885,7 @@
* Double.MAX_VALUE] can be represented as a double. The double
* representation has a mantissa of length 53. For example, 2^53+1 =
* 9007199254740993 is returned as double 9007199254740992.0.
- *
+ *
* @return this {@code BigInteger} as a double value
*/
@Override
@@ -897,7 +897,7 @@
/**
* Compares this {@code BigInteger} with {@code val}. Returns one of the
* three values 1, 0, or -1.
- *
+ *
* @param val
* value to be compared with {@code this}.
* @return {@code 1} if {@code this > val}, {@code -1} if {@code this < val}
@@ -912,7 +912,7 @@
/**
* Returns the minimum of this {@code BigInteger} and {@code val}.
- *
+ *
* @param val
* value to be used to compute the minimum with {@code this}.
* @return {@code min(this, val)}.
@@ -925,7 +925,7 @@
/**
* Returns the maximum of this {@code BigInteger} and {@code val}.
- *
+ *
* @param val
* value to be used to compute the maximum with {@code this}
* @return {@code max(this, val)}
@@ -938,19 +938,19 @@
/**
* Returns a hash code for this {@code BigInteger}.
- *
+ *
* @return hash code for {@code this}.
*/
@Override
public int hashCode() {
validate1("hashCode", this);
if (hashCode != 0) {
- return hashCode;
- }
+ return hashCode;
+ }
establishOldRepresentation("hashCode");
for (int i = 0; i < digits.length; i ++) {
- hashCode = (int)(hashCode * 33 + (digits[i] & 0xffffffff));
- }
+ hashCode = (int)(hashCode * 33 + (digits[i] & 0xffffffff));
+ }
hashCode = hashCode * sign;
return hashCode;
}
@@ -958,10 +958,10 @@
/**
* Returns {@code true} if {@code x} is a BigInteger instance and if this
* instance is equal to this {@code BigInteger}.
- *
+ *
* @param x
* object to be compared with {@code this}.
- * @return true if {@code x} is a BigInteger and {@code this == x},
+ * @return true if {@code x} is a BigInteger and {@code this == x},
* {@code false} otherwise.
*/
@Override
@@ -973,12 +973,12 @@
return this.compareTo((BigInteger)x) == 0;
}
return false;
- }
+ }
/**
* Returns a string representation of this {@code BigInteger} in decimal
* form.
- *
+ *
* @return a string representation of {@code this} in decimal form.
*/
@Override
@@ -993,7 +993,7 @@
* {@code radix > Character.MAX_RADIX} then a decimal representation is
* returned. The characters of the string representation are generated with
* method {@code Character.forDigit}.
- *
+ *
* @param radix
* base to be used for the string representation.
* @return a string representation of this with radix 10.
@@ -1014,7 +1014,7 @@
* Returns a new {@code BigInteger} whose value is greatest common divisor
* of {@code this} and {@code val}. If {@code this==0} and {@code val==0}
* then zero is returned, otherwise the result is positive.
- *
+ *
* @param val
* value with which the greatest common divisor is computed.
* @return {@code gcd(this, val)}.
@@ -1028,7 +1028,7 @@
/**
* Returns a new {@code BigInteger} whose value is {@code this * val}.
- *
+ *
* @param val
* value to be multiplied with {@code this}.
* @return {@code this * val}.
@@ -1042,7 +1042,7 @@
/**
* Returns a new {@code BigInteger} whose value is {@code this ^ exp}.
- *
+ *
* @param exp
* exponent to which {@code this} is raised.
* @return {@code this ^ exp}.
@@ -1060,7 +1060,7 @@
/**
* Returns a {@code BigInteger} array which contains {@code this / divisor}
* at index 0 and {@code this % divisor} at index 1.
- *
+ *
* @param divisor
* value by which {@code this} is divided.
* @return {@code [this / divisor, this % divisor]}.
@@ -1086,7 +1086,7 @@
/**
* Returns a new {@code BigInteger} whose value is {@code this / divisor}.
- *
+ *
* @param divisor
* value by which {@code this} is divided.
* @return {@code this / divisor}.
@@ -1106,7 +1106,7 @@
* Returns a new {@code BigInteger} whose value is {@code this % divisor}.
* Regarding signs this methods has the same behavior as the % operator on
* int's, i.e. the sign of the remainder is the same as the sign of this.
- *
+ *
* @param divisor
* value by which {@code this} is divided.
* @return {@code this % divisor}.
@@ -1127,7 +1127,7 @@
* modulus {@code m} must be positive. The result is guaranteed to be in the
* interval {@code [0, m)} (0 inclusive, m exclusive). If {@code this} is
* not relatively prime to m, then an exception is thrown.
- *
+ *
* @param m
* the modulus.
* @return {@code 1/this mod m}.
@@ -1152,7 +1152,7 @@
* exponent is negative, then {@code this.modInverse(m)^(-exponent) mod m)}
* is computed. The inverse of this only exists if {@code this} is
* relatively prime to m, otherwise an exception is thrown.
- *
+ *
* @param exponent
* the exponent.
* @param m
@@ -1185,7 +1185,7 @@
* interval {@code [0, m)} (0 inclusive, m exclusive). The behavior of this
* function is not equivalent to the behavior of the % operator defined for
* the built-in {@code int}'s.
- *
+ *
* @param m
* the modulus.
* @return {@code this mod m}.
@@ -1208,7 +1208,7 @@
* (1-1/2^certainty). If {@code false} is returned, then this is definitely
* composite. If the argument {@code certainty} <= 0, then this method
* returns true.
- *
+ *
* @param certainty
* tolerated primality uncertainty.
* @return {@code true}, if {@code this} is probably prime, {@code false}
@@ -1226,7 +1226,7 @@
* Returns the smallest integer x > {@code this} which is probably prime as
* a {@code BigInteger} instance. The probability that the returned {@code
* BigInteger} is prime is beyond (1-1/2^80).
- *
+ *
* @return smallest integer > {@code this} which is probably prime.
* @throws ArithmeticException
* if {@code this < 0}.
@@ -1244,7 +1244,7 @@
* returned {@code BigInteger} is prime is beyond (1-1/2^80).
* <p>
* <b>Implementation Note:</b> Currently {@code rnd} is ignored.
- *
+ *
* @param bitLength
* length of the new {@code BigInteger} in bits.
* @param rnd
@@ -1262,7 +1262,7 @@
/**
* Returns the two's complement representation of this BigInteger in a byte
* array.
- *
+ *
* @return two's complement representation of {@code this}
*/
private byte[] twosComplement() {
@@ -1292,10 +1292,10 @@
hB = bytesLen & 3;
highBytes = (hB == 0) ? 4 : hB;
}
-
+
digitIndex = iThis;
bytesLen -= iThis << 2;
-
+
if (sign < 0) {
digit = -temp.digits[digitIndex];
digitIndex++;
@@ -1479,7 +1479,7 @@
out.defaultWriteObject();
}
-
+
void unCache(){
firstNonzeroDigit = -2;
}
diff --git a/luni/src/main/java/java/math/BitLevel.java b/luni/src/main/java/java/math/BitLevel.java
index 22a486c..1646082 100644
--- a/luni/src/main/java/java/math/BitLevel.java
+++ b/luni/src/main/java/java/math/BitLevel.java
@@ -70,7 +70,7 @@
if (val.sign == 0) {
return 0;
}
-
+
int i = val.getFirstNonzeroDigit();;
if (val.sign > 0) {
for ( ; i < val.numberLength; i++) {
@@ -102,7 +102,7 @@
/**
* Check if there are 1s in the lowest bits of this BigInteger
- *
+ *
* @param numberOfBits the number of the lowest bits to check
* @return false if all bits are 0s, true otherwise
*/
@@ -125,13 +125,13 @@
// int resLength = source.numberLength + intCount
// + ( ( count == 0 ) ? 0 : 1 );
// int resDigits[] = new int[resLength];
- //
+ //
// shiftLeft(resDigits, source.digits, intCount, count);
// BigInteger result = new BigInteger(source.sign, resLength, resDigits);
// result.cutOffLeadingZeroes();
// return result;
// }
- //
+ //
// /**
// * Performs {@code val <<= count}.
// */
@@ -146,11 +146,11 @@
// val.cutOffLeadingZeroes();
// val.unCache();
// }
- //
+ //
// /**
// * Abstractly shifts left an array of integers in little endian (i.e. shift
// * it right). Total shift distance in bits is intCount * 32 + count
- // *
+ // *
// * @param result the destination array
// * @param source the source array
// * @param intCount the shift distance in integers
@@ -162,14 +162,14 @@
// - intCount);
// } else {
// int rightShiftCount = 32 - count;
- //
+ //
// result[result.length - 1] = 0;
// for (int i = result.length - 1; i > intCount; i--) {
// result[i] |= source[i - intCount - 1] >>> rightShiftCount;
// result[i - 1] = source[i - intCount - 1] << count;
// }
// }
- //
+ //
// for (int i = 0; i < intCount; i++) {
// result[i] = 0;
// }
@@ -271,7 +271,7 @@
/**
* Shifts right an array of integers. Total shift distance in bits is
* intCount * 32 + count.
- *
+ *
* @param result
* the destination array
* @param resultLen
@@ -304,11 +304,11 @@
result[i] = ( source[i + intCount] >>> count );
i++;
}
-
+
return allZero;
}
-
+
/**
* Performs a flipBit on the BigInteger, returning a BigInteger with the the
* specified bit flipped.
@@ -325,10 +325,10 @@
int resLength = Math.max(intCount + 1, val.numberLength) + 1;
int resDigits[] = new int[resLength];
int i;
-
+
int bitNumber = 1 << bitN;
System.arraycopy(val.digits, 0, resDigits, 0, val.numberLength);
-
+
if (val.sign < 0) {
if (intCount >= val.numberLength) {
resDigits[intCount] = bitNumber;
diff --git a/luni/src/main/java/java/math/Conversion.java b/luni/src/main/java/java/math/Conversion.java
index 2d0ad53..ec86168 100644
--- a/luni/src/main/java/java/math/Conversion.java
+++ b/luni/src/main/java/java/math/Conversion.java
@@ -48,7 +48,7 @@
387420489, 481890304, 594823321, 729000000, 887503681, 1073741824,
1291467969, 1544804416, 1838265625, 60466176 };
-
+
/** @see BigInteger#toString(int) */
static String bigInteger2String(BigInteger val, int radix) {
// BEGIN android-added
@@ -59,7 +59,7 @@
int digits[] = val.digits;
if (sign == 0) {
- return "0";
+ return "0";
}
if (numberLength == 1) {
int highDigit = digits[numberLength - 1];
@@ -132,7 +132,7 @@
/**
* Builds the correspondent {@code String} representation of {@code val}
* being scaled by {@code scale}.
- *
+ *
* @see BigInteger#toString()
* @see BigDecimal#toString()
*/
@@ -150,25 +150,25 @@
if (sign == 0) {
switch (scale) {
case 0:
- return "0";
+ return "0";
case 1:
- return "0.0";
+ return "0.0";
case 2:
- return "0.00";
+ return "0.00";
case 3:
- return "0.000";
+ return "0.000";
case 4:
- return "0.0000";
+ return "0.0000";
case 5:
- return "0.00000";
+ return "0.00000";
case 6:
- return "0.000000";
+ return "0.000000";
default:
StringBuffer result1 = new StringBuffer();
if (scale < 0) {
- result1.append("0E+");
+ result1.append("0E+");
} else {
- result1.append("0E");
+ result1.append("0E");
}
result1.append(-scale);
return result1.toString();
@@ -308,21 +308,21 @@
}
if (value == 0) {
switch (scale) {
- case 0: return "0";
- case 1: return "0.0";
- case 2: return "0.00";
- case 3: return "0.000";
- case 4: return "0.0000";
- case 5: return "0.00000";
- case 6: return "0.000000";
+ case 0: return "0";
+ case 1: return "0.0";
+ case 2: return "0.00";
+ case 3: return "0.000";
+ case 4: return "0.0000";
+ case 5: return "0.00000";
+ case 6: return "0.000000";
default:
StringBuffer result1 = new StringBuffer();
if (scale < 0) {
- result1.append("0E+");
+ result1.append("0E+");
} else {
- result1.append("0E");
+ result1.append("0E");
}
- result1.append( (scale == Integer.MIN_VALUE) ? "2147483648" : Integer.toString(-scale));
+ result1.append( (scale == Integer.MIN_VALUE) ? "2147483648" : Integer.toString(-scale));
return result1.toString();
}
}
@@ -342,7 +342,7 @@
v /= 10;
result[--currentChar] = (char) (0x0030 + (prev - v * 10));
} while (v != 0);
-
+
long exponent = (long)resLengthInChars - (long)currentChar - scale - 1L;
if (scale == 0) {
if (negNumber) {
@@ -394,7 +394,7 @@
result1.append(Long.toString(exponent));
return result1.toString();
}
-
+
static long divideLongByBillion(long a) {
long quot;
long rem;
diff --git a/luni/src/main/java/java/math/Logical.java b/luni/src/main/java/java/math/Logical.java
index 677f7f0..66c2fa3 100644
--- a/luni/src/main/java/java/math/Logical.java
+++ b/luni/src/main/java/java/math/Logical.java
@@ -251,12 +251,12 @@
}
}
}
-
+
/** @return sign = 1, magnitude = val.magnitude & ~that.magnitude*/
static BigInteger andNotPositive(BigInteger val, BigInteger that) {
// PRE: both arguments are positive
int resDigits[] = new int[val.numberLength];
-
+
int limit = Math.min(val.numberLength, that.numberLength);
int i;
for (i = val.getFirstNonzeroDigit(); i < limit; i++) {
@@ -265,25 +265,25 @@
for ( ; i < val.numberLength; i++) {
resDigits[i] = val.digits[i];
}
-
+
BigInteger result = new BigInteger(1, val.numberLength, resDigits);
result.cutOffLeadingZeroes();
return result;
}
-
+
/** @return sign = 1, magnitude = positive.magnitude & ~(-negative.magnitude)*/
static BigInteger andNotPositiveNegative(BigInteger positive, BigInteger negative) {
// PRE: positive > 0 && negative < 0
int iNeg = negative.getFirstNonzeroDigit();
int iPos = positive.getFirstNonzeroDigit();
-
+
if (iNeg >= positive.numberLength) {
return positive;
}
-
+
int resLength = Math.min(positive.numberLength, negative.numberLength);
int resDigits[] = new int[resLength];
-
+
// Always start from first non zero of positive
int i = iPos;
for ( ; i < iNeg; i++) {
@@ -298,12 +298,12 @@
// resDigits[i] = positive.digits[i] & ~(~negative.digits[i]);
resDigits[i] = positive.digits[i] & negative.digits[i];
}
-
+
BigInteger result = new BigInteger(1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
}
-
+
/** @return sign = -1, magnitude = -(-negative.magnitude & ~positive.magnitude)*/
static BigInteger andNotNegativePositive(BigInteger negative, BigInteger positive) {
// PRE: negative < 0 && positive > 0
@@ -311,14 +311,14 @@
int resDigits[];
int limit;
int digit;
-
+
int iNeg = negative.getFirstNonzeroDigit();
int iPos = positive.getFirstNonzeroDigit();
-
+
if (iNeg >= positive.numberLength) {
return negative;
}
-
+
resLength = Math.max(negative.numberLength, positive.numberLength);
int i = iNeg;
if (iPos > iNeg) {
@@ -351,7 +351,7 @@
resLength++;
resDigits = new int[resLength];
resDigits[resLength - 1] = 1;
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
return result;
}
@@ -361,7 +361,7 @@
resDigits[i] = -digit;
i++;
}
-
+
limit = Math.min(positive.numberLength, negative.numberLength);
for ( ; i < limit; i++) {
//resDigits[i] = ~(~negative.digits[i] & ~positive.digits[i]);
@@ -374,21 +374,21 @@
for ( ; i < positive.numberLength; i++) {
resDigits[i] = positive.digits[i];
}
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
return result;
}
-
+
/** @return sign = 1, magnitude = -val.magnitude & ~(-that.magnitude)*/
static BigInteger andNotNegative(BigInteger val, BigInteger that) {
// PRE: val < 0 && that < 0
int iVal = val.getFirstNonzeroDigit();
int iThat = that.getFirstNonzeroDigit();
-
+
if (iVal >= that.numberLength) {
return BigInteger.ZERO;
}
-
+
int resLength = that.numberLength;
int resDigits[] = new int[resLength];
int limit;
@@ -419,7 +419,7 @@
// resDigits[i] = -val.digits[i] & ~-that.digits[i];
resDigits[i] = -val.digits[i] & (that.digits[i] - 1);
}
-
+
limit = Math.min(val.numberLength, that.numberLength);
for (i++; i < limit; i++) {
// resDigits[i] = ~val.digits[i] & ~~that.digits[i];
@@ -429,7 +429,7 @@
// resDigits[i] = -1 & ~~that.digits[i];
resDigits[i] = that.digits[i];
}
-
+
BigInteger result = new BigInteger(1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
@@ -467,14 +467,14 @@
}
}
}
-
+
/** @return sign = 1, magnitude = longer.magnitude | shorter.magnitude*/
static BigInteger orPositive(BigInteger longer, BigInteger shorter) {
// PRE: longer and shorter are positive;
// PRE: longer has at least as many digits as shorter
int resLength = longer.numberLength;
int resDigits[] = new int[resLength];
-
+
int i = Math.min(longer.getFirstNonzeroDigit(), shorter.getFirstNonzeroDigit());
for (i = 0; i < shorter.numberLength; i++) {
resDigits[i] = longer.digits[i] | shorter.digits[i];
@@ -482,11 +482,11 @@
for ( ; i < resLength; i++) {
resDigits[i] = longer.digits[i];
}
-
+
BigInteger result = new BigInteger(1, resLength, resDigits);
return result;
}
-
+
/** @return sign = -1, magnitude = -(-val.magnitude | -that.magnitude) */
static BigInteger orNegative(BigInteger val, BigInteger that){
// PRE: val and that are negative;
@@ -494,16 +494,16 @@
int iThat = that.getFirstNonzeroDigit();
int iVal = val.getFirstNonzeroDigit();
int i;
-
+
if (iVal >= that.numberLength) {
return that;
}else if (iThat >= val.numberLength) {
return val;
}
-
+
int resLength = Math.min(val.numberLength, that.numberLength);
int resDigits[] = new int[resLength];
-
+
//Looking for the first non-zero digit of the result
if (iThat == iVal) {
resDigits[iVal] = -(-val.digits[iVal] | -that.digits[iVal]);
@@ -514,16 +514,16 @@
}
resDigits[i] = that.digits[i] & (val.digits[i] - 1);
}
-
+
for (i++; i < resLength; i++) {
resDigits[i] = val.digits[i] & that.digits[i];
}
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
}
-
+
/** @return sign = -1, magnitude = -(positive.magnitude | -negative.magnitude) */
static BigInteger orDiffSigns(BigInteger positive, BigInteger negative){
// Jumping over the least significant zero bits
@@ -531,7 +531,7 @@
int iPos = positive.getFirstNonzeroDigit();
int i;
int limit;
-
+
// Look if the trailing zeros of the positive will "copy" all
// the negative digits
if (iPos >= negative.numberLength) {
@@ -539,7 +539,7 @@
}
int resLength = negative.numberLength;
int resDigits[] = new int[resLength];
-
+
if (iNeg < iPos ) {
// We know for sure that this will
// be the first non zero digit in the result
@@ -553,8 +553,8 @@
for(i++; i < limit; i++ ) {
resDigits[i] = ~positive.digits[i];
}
- if (i != positive.numberLength) {
- resDigits[i] = ~(-negative.digits[i] | positive.digits[i]);
+ if (i != positive.numberLength) {
+ resDigits[i] = ~(-negative.digits[i] | positive.digits[i]);
} else{
for (; i<iNeg; i++) {
resDigits[i] = -1;
@@ -578,7 +578,7 @@
for( ; i < negative.numberLength; i++) {
resDigits[i] = negative.digits[i];
}
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
@@ -598,7 +598,7 @@
if (val.equals(BigInteger.MINUS_ONE)) {
return that.not();
}
-
+
if (val.sign > 0) {
if (that.sign > 0) {
if (val.numberLength > that.numberLength) {
@@ -619,7 +619,7 @@
}
}
}
-
+
/** @return sign = 0, magnitude = longer.magnitude | shorter.magnitude */
static BigInteger xorPositive(BigInteger longer, BigInteger shorter) {
// PRE: longer and shorter are positive;
@@ -633,12 +633,12 @@
for( ; i < longer.numberLength; i++ ){
resDigits[i] = longer.digits[i];
}
-
+
BigInteger result = new BigInteger(1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
}
-
+
/** @return sign = 0, magnitude = -val.magnitude ^ -that.magnitude */
static BigInteger xorNegative(BigInteger val, BigInteger that){
// PRE: val and that are negative
@@ -649,8 +649,8 @@
int iThat = that.getFirstNonzeroDigit();
int i = iThat;
int limit;
-
-
+
+
if (iVal == iThat) {
resDigits[i] = -val.digits[i] ^ -that.digits[i];
} else {
@@ -672,7 +672,7 @@
resDigits[i] = -val.digits[i] ^ ~that.digits[i];
}
}
-
+
limit = Math.min(val.numberLength, that.numberLength);
//Perform ^ between that al val until that ends
for (i++; i < limit; i++) {
@@ -688,12 +688,12 @@
//resDigits[i] = -1 ^ ~that.digits[i] ;
resDigits[i] = that.digits[i];
}
-
+
BigInteger result = new BigInteger(1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
}
-
+
/** @return sign = 1, magnitude = -(positive.magnitude ^ -negative.magnitude)*/
static BigInteger xorDiffSigns(BigInteger positive, BigInteger negative){
int resLength = Math.max(negative.numberLength, positive.numberLength);
@@ -702,7 +702,7 @@
int iPos = positive.getFirstNonzeroDigit();
int i;
int limit;
-
+
//The first
if (iNeg < iPos) {
resDigits = new int[resLength];
@@ -769,7 +769,7 @@
resLength = resLength + 1;
resDigits = new int[resLength];
resDigits[resLength - 1] = 1;
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
return result;
}
@@ -779,7 +779,7 @@
resDigits[i] = -digit;
i++;
}
-
+
limit = Math.min(negative.numberLength, positive.numberLength);
for ( ; i < limit; i++) {
resDigits[i] = ~(~negative.digits[i] ^ positive.digits[i]);
@@ -788,11 +788,11 @@
// resDigits[i] = ~(positive.digits[i] ^ -1)
resDigits[i] = positive.digits[i];
}
- for ( ; i < negative.numberLength; i++) {
+ for ( ; i < negative.numberLength; i++) {
// resDigits[i] = ~(0 ^ ~negative.digits[i])
resDigits[i] = negative.digits[i];
}
-
+
BigInteger result = new BigInteger(-1, resLength, resDigits);
result.cutOffLeadingZeroes();
return result;
diff --git a/luni/src/main/java/java/net/AddressCache.java b/luni/src/main/java/java/net/AddressCache.java
index c0d8d97..54835a8 100644
--- a/luni/src/main/java/java/net/AddressCache.java
+++ b/luni/src/main/java/java/net/AddressCache.java
@@ -1,12 +1,12 @@
/*
* Copyright (C) 2010 The Android Open Source Project
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,39 +32,39 @@
* This should be a power of two to avoid wasted space in our custom map.
*/
private static final int MAX_ENTRIES = 512;
-
+
// This isn't used by our HashMap implementation, but the API demands it.
private static final float DEFAULT_LOAD_FACTOR = .75F;
-
+
// Default time-to-live for positive cache entries. 600 seconds (10 minutes).
private static final long DEFAULT_POSITIVE_TTL_NANOS = 600 * 1000000000L;
// Default time-to-live for negative cache entries. 10 seconds.
private static final long DEFAULT_NEGATIVE_TTL_NANOS = 10 * 1000000000L;
-
+
// Failed lookups are represented in the cache my mappings to this empty array.
private static final InetAddress[] NO_ADDRESSES = new InetAddress[0];
-
+
// The actual cache.
private final Map<String, AddressCacheEntry> map;
-
+
static class AddressCacheEntry {
// The addresses. May be the empty array for a negative cache entry.
InetAddress[] addresses;
-
+
/**
* The absolute expiry time in nanoseconds. Nanoseconds from System.nanoTime is ideal
* because -- unlike System.currentTimeMillis -- it can never go backwards.
- *
+ *
* Unless we need to cope with DNS TTLs of 292 years, we don't need to worry about overflow.
*/
long expiryNanos;
-
+
AddressCacheEntry(InetAddress[] addresses, long expiryNanos) {
this.addresses = addresses;
this.expiryNanos = expiryNanos;
}
}
-
+
public AddressCache() {
// We pass 'true' so removeEldestEntry removes the least-recently accessed entry, rather
// than the least-recently inserted.
@@ -76,7 +76,7 @@
}
};
}
-
+
/**
* Returns the cached addresses associated with 'hostname'. Returns null if nothing is known
* about 'hostname'. Returns an empty array if 'hostname' is known not to exist.
@@ -94,7 +94,7 @@
// No need to remove expired entries: the caller will provide a replacement shortly.
return null;
}
-
+
/**
* Associates the given 'addresses' with 'hostname'. The association will expire after a
* certain length of time.
@@ -118,7 +118,7 @@
map.put(hostname, new AddressCacheEntry(addresses, expiryNanos));
}
}
-
+
/**
* Records that 'hostname' is known not to have any associated addresses. (I.e. insert a
* negative cache entry.)
@@ -126,7 +126,7 @@
public void putUnknownHost(String hostname) {
put(hostname, NO_ADDRESSES);
}
-
+
private long customTtl(String propertyName, long defaultTtlNanos) {
String ttlString = AccessController.doPrivileged(new PriviAction<String>(propertyName, null));
if (ttlString == null) {
diff --git a/luni/src/main/java/java/net/Authenticator.java b/luni/src/main/java/java/net/Authenticator.java
index 3bdecba..903f170 100644
--- a/luni/src/main/java/java/net/Authenticator.java
+++ b/luni/src/main/java/java/net/Authenticator.java
@@ -24,7 +24,7 @@
* setDefault(Authenticator a)}. Then it should override {@code
* getPasswordAuthentication()} which dictates how the authentication info is
* obtained. Usually, it prompts the user for the required input.
- *
+ *
* @see #setDefault
* @see #getPasswordAuthentication
*/
@@ -34,10 +34,10 @@
private static Authenticator thisAuthenticator;
private static final NetPermission requestPasswordAuthenticationPermission = new NetPermission(
- "requestPasswordAuthentication");
+ "requestPasswordAuthentication");
private static final NetPermission setDefaultAuthenticatorPermission = new NetPermission(
- "setDefaultAuthenticator");
+ "setDefaultAuthenticator");
// the requester connection info
private String host;
@@ -71,7 +71,7 @@
/**
* Returns the port of the connection that requests authorization.
- *
+ *
* @return port of the connection.
*/
protected final int getRequestingPort() {
@@ -81,7 +81,7 @@
/**
* Returns the address of the connection that requests authorization or
* {@code null} if unknown.
- *
+ *
* @return address of the connection.
*/
protected final InetAddress getRequestingSite() {
@@ -91,7 +91,7 @@
/**
* Returns the realm (prompt string) of the connection that requests
* authorization.
- *
+ *
* @return prompt string of the connection.
*/
protected final String getRequestingPrompt() {
@@ -100,7 +100,7 @@
/**
* Returns the protocol of the connection that requests authorization.
- *
+ *
* @return protocol of the connection.
*/
protected final String getRequestingProtocol() {
@@ -110,7 +110,7 @@
/**
* Returns the scheme of the connection that requests authorization, for
* example HTTP Basic Authentication.
- *
+ *
* @return scheme of the connection.
*/
protected final String getRequestingScheme() {
@@ -121,7 +121,7 @@
* If the permission check of the security manager does not result in a
* security exception, this method invokes the methods of the registered
* authenticator to get the authentication info.
- *
+ *
* @return password authentication info or {@code null} if no authenticator
* exists.
* @param rAddr
@@ -167,7 +167,7 @@
* the realm that the URL is pointing to requires authorization. If there is
* a security manager set then the caller must have the appropriate {@code
* NetPermission}.
- *
+ *
* @param a
* authenticator which has to be set as default.
* @throws SecurityException
@@ -186,7 +186,7 @@
* If the permission check of the security manager does not result in a
* security exception, this method invokes the methods of the registered
* authenticator to get the authentication info.
- *
+ *
* @return password authentication info or {@code null} if no authenticator
* exists.
* @param rHost
@@ -244,7 +244,7 @@
* If the permission check of the security manager does not result in a
* security exception, this method invokes the methods of the registered
* authenticator to get the authentication info.
- *
+ *
* @return password authentication info or {@code null} if no authenticator
* exists.
* @param rHost
@@ -297,7 +297,7 @@
/**
* Returns the URL of the authentication request.
- *
+ *
* @return authentication request url.
*/
protected URL getRequestingURL() {
@@ -306,7 +306,7 @@
/**
* Returns the type of this request, it can be {@code PROXY} or {@code SERVER}.
- *
+ *
* @return RequestorType of the authentication request.
*/
protected Authenticator.RequestorType getRequestorType() {
diff --git a/luni/src/main/java/java/net/BindException.java b/luni/src/main/java/java/net/BindException.java
index 48f1cf6..8a84914 100644
--- a/luni/src/main/java/java/net/BindException.java
+++ b/luni/src/main/java/java/net/BindException.java
@@ -34,7 +34,7 @@
/**
* Constructs a new instance with its walkback and message filled in.
- *
+ *
* @param detailMessage
* detail message of the exception.
*/
diff --git a/luni/src/main/java/java/net/CacheRequest.java b/luni/src/main/java/java/net/CacheRequest.java
index 778cb13..e7a7815 100644
--- a/luni/src/main/java/java/net/CacheRequest.java
+++ b/luni/src/main/java/java/net/CacheRequest.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
* current store operation by calling the method {@code abort}. If an {@code
* IOException} occurs while reading the response or writing data to the cache,
* the current cache store operation is abandoned.
- *
+ *
* @see ResponseCache
*/
public abstract class CacheRequest {
@@ -48,7 +48,7 @@
/**
* Returns an {@code OutputStream} which is used to write the response body.
- *
+ *
* @return an {@code OutputStream} which is used to write the response body.
* @throws IOException
* if an I/O error is encountered during writing response body
diff --git a/luni/src/main/java/java/net/CacheResponse.java b/luni/src/main/java/java/net/CacheResponse.java
index 6a2e587..f713391 100644
--- a/luni/src/main/java/java/net/CacheResponse.java
+++ b/luni/src/main/java/java/net/CacheResponse.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@
public abstract class CacheResponse {
/**
* Returns an {@code InputStream} to access the response body.
- *
+ *
* @return an {@code InputStream} which can be used to fetch the response
* body.
* @throws IOException
@@ -45,7 +45,7 @@
* a mapping from null to the original HTTP status line will prevent an
* {@code HttpURLConnection} from returning the correct response code.
* See {@link URLConnection#getHeaderFields}.
- *
+ *
* @return an immutable {@code Map} which contains the response headers.
* @throws IOException
* if an I/O error is encountered while retrieving the response
diff --git a/luni/src/main/java/java/net/ContentHandlerFactory.java b/luni/src/main/java/java/net/ContentHandlerFactory.java
index 3089c04..6206eff 100644
--- a/luni/src/main/java/java/net/ContentHandlerFactory.java
+++ b/luni/src/main/java/java/net/ContentHandlerFactory.java
@@ -19,13 +19,13 @@
/**
* Defines a factory which is responsible for creating a {@code ContentHandler}.
- *
+ *
* @see ContentHandler
*/
public interface ContentHandlerFactory {
/**
* Creates a content handler to handle {@code contentType}.
- *
+ *
* @param contentType
* specifies the content type which is handled by the returned
* {@code ContentHandler}.
diff --git a/luni/src/main/java/java/net/CookieHandler.java b/luni/src/main/java/java/net/CookieHandler.java
index da12856..d3cbb5a 100644
--- a/luni/src/main/java/java/net/CookieHandler.java
+++ b/luni/src/main/java/java/net/CookieHandler.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,10 +28,10 @@
private static CookieHandler systemWideCookieHandler;
private final static NetPermission getCookieHandlerPermission = new NetPermission(
- "getCookieHandler");
+ "getCookieHandler");
private final static NetPermission setCookieHandlerPermission = new NetPermission(
- "setCookieHandler");
+ "setCookieHandler");
/**
* Returns the system-wide cookie handler or {@code null} if not set.
diff --git a/luni/src/main/java/java/net/CookieManager.java b/luni/src/main/java/java/net/CookieManager.java
index 25ecfc8..8543012 100644
--- a/luni/src/main/java/java/net/CookieManager.java
+++ b/luni/src/main/java/java/net/CookieManager.java
@@ -60,9 +60,9 @@
private CookiePolicy policy;
- private static final String VERSION_ZERO_HEADER = "Set-cookie";
+ private static final String VERSION_ZERO_HEADER = "Set-cookie";
- private static final String VERSION_ONE_HEADER = "Set-cookie2";
+ private static final String VERSION_ONE_HEADER = "Set-cookie2";
/**
* Constructs a new cookie manager.
@@ -108,7 +108,7 @@
public Map<String, List<String>> get(URI uri,
Map<String, List<String>> requestHeaders) throws IOException {
if (uri == null || requestHeaders == null) {
- throw new IllegalArgumentException(Msg.getString("KB004"));
+ throw new IllegalArgumentException(Msg.getString("KB004"));
}
List<HttpCookie> cookies = store.get(uri);
for (int i = 0; i < cookies.size(); i++) {
@@ -139,14 +139,14 @@
}
}
if (versionOne && !cookies.isEmpty()) {
- cookieStr.add("$Version=\"1\"");
+ cookieStr.add("$Version=\"1\"");
}
// add every cookie's string representation into map
for (HttpCookie cookie : cookies) {
cookieStr.add(cookie.toString());
}
// TODO So far only "Cookie" head detected
- map.put("Cookie", cookieStr);
+ map.put("Cookie", cookieStr);
return Collections.unmodifiableMap(map);
}
@@ -164,7 +164,7 @@
public void put(URI uri, Map<String, List<String>> responseHeaders)
throws IOException {
if (uri == null || responseHeaders == null) {
- throw new IllegalArgumentException(Msg.getString("KA019"));
+ throw new IllegalArgumentException(Msg.getString("KA019"));
}
// parse and construct cookies according to the map
List<HttpCookie> cookies = parseCookie(responseHeaders);
diff --git a/luni/src/main/java/java/net/CookieStoreImpl.java b/luni/src/main/java/java/net/CookieStoreImpl.java
index c722a1e..d7af0d2 100644
--- a/luni/src/main/java/java/net/CookieStoreImpl.java
+++ b/luni/src/main/java/java/net/CookieStoreImpl.java
@@ -51,7 +51,7 @@
public List<HttpCookie> get(URI uri) {
if (uri == null) {
- throw new NullPointerException(Msg.getString("KA019"));
+ throw new NullPointerException(Msg.getString("KA019"));
}
// get cookies associated with given URI. If none, returns an empty list
List<HttpCookie> cookies = storeMap.get(uri);
@@ -110,7 +110,7 @@
public boolean remove(URI uri, HttpCookie cookie) {
if (cookie == null) {
- throw new NullPointerException(Msg.getString("KA020"));
+ throw new NullPointerException(Msg.getString("KA020"));
}
boolean success = false;
Collection<ArrayList<HttpCookie>> values = storeMap.values();
diff --git a/luni/src/main/java/java/net/DatagramPacket.java b/luni/src/main/java/java/net/DatagramPacket.java
index 88f46e6..e41d0c3 100644
--- a/luni/src/main/java/java/net/DatagramPacket.java
+++ b/luni/src/main/java/java/net/DatagramPacket.java
@@ -23,7 +23,7 @@
* This class represents a datagram packet which contains data either to be sent
* or received through a {@code DatagramSocket}. It holds additional information
* such as its source or destination host.
- *
+ *
* @see DatagramSocket
*/
public final class DatagramPacket {
@@ -32,7 +32,7 @@
/**
* Length of the data to be sent or size of data that was received via
- * DatagramSocket#receive() method call.
+ * DatagramSocket#receive() method call.
*/
int length;
@@ -52,7 +52,7 @@
/**
* Constructs a new {@code DatagramPacket} object to receive data up to
* {@code length} bytes.
- *
+ *
* @param data
* a byte array to store the read characters.
* @param length
@@ -65,7 +65,7 @@
/**
* Constructs a new {@code DatagramPacket} object to receive data up to
* {@code length} bytes with a specified buffer offset.
- *
+ *
* @param data
* a byte array to store the read characters.
* @param offset
@@ -123,7 +123,7 @@
/**
* Gets the sender or destination IP address of this datagram packet.
- *
+ *
* @return the address from where the datagram was received or to which it
* is sent.
*/
@@ -133,7 +133,7 @@
/**
* Gets the data of this datagram packet.
- *
+ *
* @return the received data or the data to be sent.
*/
public synchronized byte[] getData() {
@@ -142,7 +142,7 @@
/**
* Gets the length of the data stored in this datagram packet.
- *
+ *
* @return the length of the received data or the data to be sent.
*/
public synchronized int getLength() {
@@ -151,7 +151,7 @@
/**
* Gets the offset of the data stored in this datagram packet.
- *
+ *
* @return the position of the received data or the data to be sent.
*/
public synchronized int getOffset() {
@@ -170,7 +170,7 @@
/**
* Sets the IP address of the target host.
- *
+ *
* @param addr
* the target host address.
*/
@@ -180,7 +180,7 @@
/**
* Sets the data buffer for this datagram packet.
- *
+ *
* @param buf
* the buffer to store the data.
* @param anOffset
@@ -192,7 +192,7 @@
public synchronized void setData(byte[] buf, int anOffset, int aLength) {
if (0 > anOffset || anOffset > buf.length || 0 > aLength
|| aLength > buf.length - anOffset) {
- throw new IllegalArgumentException(Msg.getString("K002f"));
+ throw new IllegalArgumentException(Msg.getString("K002f"));
}
data = buf;
offset = anOffset;
@@ -203,7 +203,7 @@
/**
* Sets the data buffer for this datagram packet. The length of the datagram
* packet is set to the buffer length.
- *
+ *
* @param buf
* the buffer to store the data.
*/
@@ -216,7 +216,7 @@
/**
* Gets the current capacity value.
- *
+ *
* @return the current capacity value
*/
synchronized int getCapacity() {
@@ -226,13 +226,13 @@
/**
* Sets the length of the datagram packet. This length plus the offset must
* be lesser than or equal to the buffer size.
- *
+ *
* @param len
* the length of this datagram packet.
*/
public synchronized void setLength(int len) {
if (0 > len || offset + len > data.length) {
- throw new IllegalArgumentException(Msg.getString("K002f"));
+ throw new IllegalArgumentException(Msg.getString("K002f"));
}
length = len;
capacity = len;
@@ -241,25 +241,25 @@
/**
* An alternative to {@link #setLength(int)}, that doesn't reset the {@link #capacity}
* field.
- *
+ *
* @param len the length of this datagram packet
*/
synchronized void setLengthOnly(int len) {
if (0 > len || offset + len > data.length) {
- throw new IllegalArgumentException(Msg.getString("K002f"));
+ throw new IllegalArgumentException(Msg.getString("K002f"));
}
length = len;
}
/**
* Sets the port number of the target host of this datagram packet.
- *
+ *
* @param aPort
* the target host port number.
*/
public synchronized void setPort(int aPort) {
if (aPort < 0 || aPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0325", aPort));
+ throw new IllegalArgumentException(Msg.getString("K0325", aPort));
}
port = aPort;
}
@@ -269,7 +269,7 @@
* address {@code sockAddr}. The {@code length} must be lesser than or equal
* to the size of {@code data}. The first {@code length} bytes of the data
* are sent.
- *
+ *
* @param data
* the byte array to store the data.
* @param length
@@ -290,7 +290,7 @@
* address {@code sockAddr}. The {@code length} must be lesser than or equal
* to the size of {@code data}. The first {@code length} bytes of the data
* are sent.
- *
+ *
* @param data
* the byte array to store the data.
* @param offset
@@ -320,14 +320,14 @@
/**
* Sets the {@code SocketAddress} for this datagram packet.
- *
+ *
* @param sockAddr
* the SocketAddress of the target host.
*/
public synchronized void setSocketAddress(SocketAddress sockAddr) {
if (!(sockAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", sockAddr == null ? null : sockAddr.getClass()));
+ "K0316", sockAddr == null ? null : sockAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) sockAddr;
port = inetAddr.getPort();
diff --git a/luni/src/main/java/java/net/DatagramSocket.java b/luni/src/main/java/java/net/DatagramSocket.java
index 43b00a2..74c60cf 100644
--- a/luni/src/main/java/java/net/DatagramSocket.java
+++ b/luni/src/main/java/java/net/DatagramSocket.java
@@ -108,7 +108,7 @@
*/
void checkListen(int aPort) {
if (aPort < 0 || aPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0325", aPort));
+ throw new IllegalArgumentException(Msg.getString("K0325", aPort));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -140,7 +140,7 @@
*/
public void connect(InetAddress anAddress, int aPort) {
if (anAddress == null || aPort < 0 || aPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0032"));
+ throw new IllegalArgumentException(Msg.getString("K0032"));
}
synchronized (lock) {
@@ -355,7 +355,7 @@
senderAddr = tempPack.getAddress();
} catch (SocketException e) {
if (e.getMessage().equals(
- "The socket does not support the operation")) {
+ "The socket does not support the operation")) {
// receive packet to temporary buffer
tempPack = new DatagramPacket(new byte[pack.getCapacity()],
pack.getCapacity());
@@ -429,7 +429,7 @@
if (address != null) { // The socket is connected
if (packAddr != null) {
if (!address.equals(packAddr) || port != pack.getPort()) {
- throw new IllegalArgumentException(Msg.getString("K0034"));
+ throw new IllegalArgumentException(Msg.getString("K0034"));
}
} else {
pack.setAddress(address);
@@ -440,7 +440,7 @@
if (packAddr == null) {
if (pack.getPort() == -1) {
// KA019 Destination address is null
- throw new NullPointerException(Msg.getString("KA019"));
+ throw new NullPointerException(Msg.getString("KA019"));
}
return;
}
@@ -470,7 +470,7 @@
*/
public synchronized void setSendBufferSize(int size) throws SocketException {
if (size < 1) {
- throw new IllegalArgumentException(Msg.getString("K0035"));
+ throw new IllegalArgumentException(Msg.getString("K0035"));
}
checkClosedAndBind(false);
impl.setOption(SocketOptions.SO_SNDBUF, Integer.valueOf(size));
@@ -490,7 +490,7 @@
public synchronized void setReceiveBufferSize(int size)
throws SocketException {
if (size < 1) {
- throw new IllegalArgumentException(Msg.getString("K0035"));
+ throw new IllegalArgumentException(Msg.getString("K0035"));
}
checkClosedAndBind(false);
impl.setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
@@ -511,7 +511,7 @@
*/
public synchronized void setSoTimeout(int timeout) throws SocketException {
if (timeout < 0) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
checkClosedAndBind(false);
impl.setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
@@ -538,7 +538,7 @@
security.checkSetFactory();
}
if (factory != null) {
- throw new SocketException(Msg.getString("K0044"));
+ throw new SocketException(Msg.getString("K0044"));
}
factory = fac;
}
@@ -574,7 +574,7 @@
if (localAddr != null) {
if (!(localAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", localAddr.getClass()));
+ "K0316", localAddr.getClass()));
}
checkListen(((InetSocketAddress) localAddr).getPort());
}
@@ -595,7 +595,7 @@
void checkClosedAndBind(boolean bind) throws SocketException {
if (isClosed()) {
- throw new SocketException(Msg.getString("K003d"));
+ throw new SocketException(Msg.getString("K003d"));
}
if (bind && !isBound()) {
checkListen(0);
@@ -624,13 +624,13 @@
if (localAddr != null) {
if (!(localAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", localAddr.getClass()));
+ "K0316", localAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) localAddr;
addr = inetAddr.getAddress();
if (addr == null) {
throw new SocketException(Msg.getString(
- "K0317", inetAddr.getHostName()));
+ "K0317", inetAddr.getHostName()));
}
localPort = inetAddr.getPort();
checkListen(localPort);
@@ -652,18 +652,18 @@
*/
public void connect(SocketAddress remoteAddr) throws SocketException {
if (remoteAddr == null) {
- throw new IllegalArgumentException(Msg.getString("K0318"));
+ throw new IllegalArgumentException(Msg.getString("K0318"));
}
if (!(remoteAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", remoteAddr.getClass()));
+ "K0316", remoteAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) remoteAddr;
if (inetAddr.getAddress() == null) {
throw new SocketException(Msg.getString(
- "K0317", inetAddr.getHostName()));
+ "K0317", inetAddr.getHostName()));
}
synchronized (lock) {
diff --git a/luni/src/main/java/java/net/DatagramSocketImpl.java b/luni/src/main/java/java/net/DatagramSocketImpl.java
index 7a29256..8ed4342 100644
--- a/luni/src/main/java/java/net/DatagramSocketImpl.java
+++ b/luni/src/main/java/java/net/DatagramSocketImpl.java
@@ -48,7 +48,7 @@
/**
* Binds the datagram socket to the given localhost/port. Sockets must be
* bound prior to attempting to send or receive data.
- *
+ *
* @param port
* the port on the localhost to bind.
* @param addr
@@ -77,7 +77,7 @@
/**
* Gets the {@code FileDescriptor} of this datagram socket, which is invalid
* if the socket is closed or not bound.
- *
+ *
* @return the current file descriptor of this socket.
*/
protected FileDescriptor getFileDescriptor() {
@@ -86,7 +86,7 @@
/**
* Gets the local address to which the socket is bound.
- *
+ *
* @return the local address to which the socket is bound.
*/
InetAddress getLocalAddress() {
@@ -95,7 +95,7 @@
/**
* Gets the local port of this socket.
- *
+ *
* @return the local port to which this socket is bound.
*/
protected int getLocalPort() {
@@ -104,7 +104,7 @@
/**
* Gets the time-to-live (TTL) for multicast packets sent on this socket.
- *
+ *
* @return the time-to-live option as a byte value.
* @throws IOException
* if an error occurs while getting the time-to-live option
@@ -131,7 +131,7 @@
* Adds this socket to the multicast group {@code addr}. A socket must join
* a group before being able to receive data. Further, a socket may be a
* member of multiple groups but may join any group only once.
- *
+ *
* @param addr
* the multicast group to which this socket has to be joined.
* @throws IOException
@@ -144,7 +144,7 @@
* Adds this socket to the multicast group {@code addr}. A socket must join
* a group before being able to receive data. Further, a socket may be a
* member of multiple groups but may join any group only once.
- *
+ *
* @param addr
* the multicast group to which this socket has to be joined.
* @param netInterface
@@ -159,7 +159,7 @@
/**
* Removes this socket from the multicast group {@code addr}.
- *
+ *
* @param addr
* the multicast group to be left.
* @throws IOException
@@ -170,7 +170,7 @@
/**
* Removes this socket from the multicast group {@code addr}.
- *
+ *
* @param addr
* the multicast group to be left.
* @param netInterface
@@ -186,7 +186,7 @@
* Peeks at the incoming packet to this socket and returns the address of
* the {@code sender}. The method will block until a packet is received or
* timeout expires.
- *
+ *
* @param sender
* the origin address of a packet.
* @return the address of {@code sender} as an integer value.
@@ -200,7 +200,7 @@
* This call will block until either data has been received or, if a timeout
* is set, the timeout has expired. If the timeout expires an {@code
* InterruptedIOException} is thrown.
- *
+ *
* @param pack
* the datagram packet container to fill in the received data.
* @throws IOException
@@ -211,7 +211,7 @@
/**
* Sends the given datagram packet {@code pack}. The packet contains the
* data and the address and port information of the target host as well.
- *
+ *
* @param pack
* the datagram packet to be sent.
* @throws IOException
@@ -222,7 +222,7 @@
/**
* Sets the time-to-live (TTL) option for multicast packets sent on this
* socket.
- *
+ *
* @param ttl
* the time-to-live option value. Valid values are 0 < ttl
* <= 255.
@@ -234,7 +234,7 @@
/**
* Sets the time-to-live (TTL) option for multicast packets sent on this
* socket.
- *
+ *
* @param ttl
* the time-to-live option value. Valid values are 0 < ttl
* <= 255.
@@ -248,7 +248,7 @@
/**
* Connects this socket to the specified remote address and port.
- *
+ *
* @param inetAddr
* the address of the target host which has to be connected.
* @param port
@@ -275,7 +275,7 @@
* {@code peekData()} or {@code receive()} call. This call blocks until
* either data has been received or, if a timeout is set, the timeout has
* been expired.
- *
+ *
* @param pack
* the datagram packet used to store the data.
* @return the port the packet was received from.
diff --git a/luni/src/main/java/java/net/DatagramSocketImplFactory.java b/luni/src/main/java/java/net/DatagramSocketImplFactory.java
index ce91738..9a1df2a 100644
--- a/luni/src/main/java/java/net/DatagramSocketImplFactory.java
+++ b/luni/src/main/java/java/net/DatagramSocketImplFactory.java
@@ -21,14 +21,14 @@
* This interface defines a factory for datagram socket implementations. It is
* used by the class {@code DatagramSocket} to create a new datagram socket
* implementation.
- *
+ *
* @see DatagramSocket
*/
public interface DatagramSocketImplFactory {
-
+
/**
* Creates a new {@code DatagramSocketImpl} instance.
- *
+ *
* @return the new datagram socket implementation.
*/
DatagramSocketImpl createDatagramSocketImpl();
diff --git a/luni/src/main/java/java/net/FileNameMap.java b/luni/src/main/java/java/net/FileNameMap.java
index 16fa0e0..1b4f953 100644
--- a/luni/src/main/java/java/net/FileNameMap.java
+++ b/luni/src/main/java/java/net/FileNameMap.java
@@ -21,7 +21,7 @@
* Defines a scheme for mapping a filename type to a MIME content type. Mainly
* used by {@code URLStreamHandler} for determining the right content handler to
* handle the resource.
- *
+ *
* @see ContentHandler
* @see URLConnection#getFileNameMap()
* @see URLConnection#guessContentTypeFromName(String)
@@ -31,7 +31,7 @@
/**
* Determines the MIME type for a file {@code fileName} of a URL.
- *
+ *
* @param fileName
* the name of the file to consider.
* @return the appropriate MIME type of the given file.
diff --git a/luni/src/main/java/java/net/HttpCookie.java b/luni/src/main/java/java/net/HttpCookie.java
index 0988b23..afc9cbc 100644
--- a/luni/src/main/java/java/net/HttpCookie.java
+++ b/luni/src/main/java/java/net/HttpCookie.java
@@ -61,27 +61,27 @@
}
}
- private static final String DOT_STR = ".";
+ private static final String DOT_STR = ".";
- private static final String LOCAL_STR = ".local";
+ private static final String LOCAL_STR = ".local";
- private static final String QUOTE_STR = "\"";
+ private static final String QUOTE_STR = "\"";
- private static final String COMMA_STR = ",";
+ private static final String COMMA_STR = ",";
- private static Pattern HEAD_PATTERN = Pattern.compile("Set-Cookie2?:",
+ private static Pattern HEAD_PATTERN = Pattern.compile("Set-Cookie2?:",
Pattern.CASE_INSENSITIVE);
private static Pattern NAME_PATTERN = Pattern
.compile(
- "([^$=,\u0085\u2028\u2029][^,\n\t\r\r\n\u0085\u2028\u2029]*?)=([^;]*)(;)?",
+ "([^$=,\u0085\u2028\u2029][^,\n\t\r\r\n\u0085\u2028\u2029]*?)=([^;]*)(;)?",
Pattern.DOTALL | Pattern.CASE_INSENSITIVE);
private static Pattern ATTR_PATTERN0 = Pattern
- .compile("([^;=]*)(?:=([^;]*))?");
+ .compile("([^;=]*)(?:=([^;]*))?");
private static Pattern ATTR_PATTERN1 = Pattern
- .compile("(,?[^;=]*)(?:=([^;,]*))?((?=.))?");
+ .compile("(,?[^;=]*)(?:=([^;,]*))?((?=.))?");
private HashMap<String, Setter> attributeSet = new HashMap<String, Setter>();
@@ -179,7 +179,7 @@
// process set-cookie | set-cookie2 head
if (matcher.find()) {
String cookieHead = matcher.group();
- if ("set-cookie2:".equalsIgnoreCase(cookieHead)) {
+ if ("set-cookie2:".equalsIgnoreCase(cookieHead)) {
version = 1;
}
headerString = header.substring(cookieHead.length());
@@ -225,8 +225,8 @@
// If port is the attribute, then comma will not be used as a
// delimiter
- if (attrName.equalsIgnoreCase("port")
- || attrName.equalsIgnoreCase("expires")) {
+ if (attrName.equalsIgnoreCase("port")
+ || attrName.equalsIgnoreCase("expires")) {
int start = matcher.regionStart();
matcher = ATTR_PATTERN0.matcher(headerString);
matcher.region(start, headerString.length());
@@ -287,7 +287,7 @@
private int version = 1;
{
- attributeSet.put("comment", new Setter() {
+ attributeSet.put("comment", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setComment(value);
@@ -296,7 +296,7 @@
}
}
});
- attributeSet.put("commenturl", new Setter() {
+ attributeSet.put("commenturl", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setCommentURL(value);
@@ -305,14 +305,14 @@
}
}
});
- attributeSet.put("discard", new Setter() {
+ attributeSet.put("discard", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setDiscard(true);
set(true);
}
});
- attributeSet.put("domain", new Setter() {
+ attributeSet.put("domain", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setDomain(value);
@@ -321,24 +321,24 @@
}
}
});
- attributeSet.put("max-age", new Setter() {
+ attributeSet.put("max-age", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
try {
cookie.setMaxAge(Long.parseLong(value));
} catch (NumberFormatException e) {
throw new IllegalArgumentException(Msg.getString(
- "KB001", "max-age"));
+ "KB001", "max-age"));
}
set(true);
- if (!attributeSet.get("version").isSet()) {
+ if (!attributeSet.get("version").isSet()) {
cookie.setVersion(1);
}
}
});
- attributeSet.put("path", new Setter() {
+ attributeSet.put("path", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setPath(value);
@@ -347,7 +347,7 @@
}
}
});
- attributeSet.put("port", new Setter() {
+ attributeSet.put("port", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setPortlist(value);
@@ -361,14 +361,14 @@
return;
}
});
- attributeSet.put("secure", new Setter() {
+ attributeSet.put("secure", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setSecure(true);
set(true);
}
});
- attributeSet.put("version", new Setter() {
+ attributeSet.put("version", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
try {
@@ -386,14 +386,14 @@
}
});
- attributeSet.put("expires", new Setter() {
+ attributeSet.put("expires", new Setter() {
@Override
void setValue(String value, HttpCookie cookie) {
cookie.setVersion(0);
- attributeSet.get("version").set(true);
- if (!attributeSet.get("max-age").isSet()) {
- attributeSet.get("max-age").set(true);
- if (!"en".equalsIgnoreCase(Locale.getDefault()
+ attributeSet.get("version").set(true);
+ if (!attributeSet.get("max-age").isSet()) {
+ attributeSet.get("max-age").set(true);
+ if (!"en".equalsIgnoreCase(Locale.getDefault()
.getLanguage())) {
cookie.setMaxAge(0);
return;
@@ -441,7 +441,7 @@
public HttpCookie(String name, String value) {
String ntrim = name.trim(); // erase leading and trailing whitespaces
if (!isValidName(ntrim)) {
- throw new IllegalArgumentException(Msg.getString("KB002"));
+ throw new IllegalArgumentException(Msg.getString("KB002"));
}
this.name = ntrim;
@@ -451,10 +451,10 @@
private void attrToString(StringBuilder builder, String attrName,
String attrValue) {
if (attrValue != null && builder != null) {
- builder.append(";");
+ builder.append(";");
builder.append("$");
builder.append(attrName);
- builder.append("=\"");
+ builder.append("=\"");
builder.append(attrValue);
builder.append(QUOTE_STR);
}
@@ -610,7 +610,7 @@
private boolean isValidName(String n) {
// name cannot be empty or begin with '$' or equals the reserved
// attributes (case-insensitive)
- boolean isValid = !(n.length() == 0 || n.startsWith("$") || attributeSet.containsKey(n.toLowerCase()));
+ boolean isValid = !(n.length() == 0 || n.startsWith("$") || attributeSet.containsKey(n.toLowerCase()));
if (isValid) {
for (int i = 0; i < n.length(); i++) {
char nameChar = n.charAt(i);
@@ -748,7 +748,7 @@
*/
public void setVersion(int v) {
if (v != 0 && v != 1) {
- throw new IllegalArgumentException(Msg.getString("KB003"));
+ throw new IllegalArgumentException(Msg.getString("KB003"));
}
version = v;
}
@@ -763,7 +763,7 @@
public String toString() {
StringBuilder cookieStr = new StringBuilder();
cookieStr.append(name);
- cookieStr.append("=");
+ cookieStr.append("=");
if (version == 0) {
cookieStr.append(value);
} else if (version == 1) {
@@ -771,8 +771,8 @@
cookieStr.append(value);
cookieStr.append(QUOTE_STR);
- attrToString(cookieStr, "Path", path);
- attrToString(cookieStr, "Domain", domain);
+ attrToString(cookieStr, "Path", path);
+ attrToString(cookieStr, "Domain", domain);
attrToString(cookieStr, "Port", portList);
}
return cookieStr.toString();
diff --git a/luni/src/main/java/java/net/HttpRetryException.java b/luni/src/main/java/java/net/HttpRetryException.java
index 4ad14bd..2e9fda3 100644
--- a/luni/src/main/java/java/net/HttpRetryException.java
+++ b/luni/src/main/java/java/net/HttpRetryException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,7 +33,7 @@
/**
* Creates a new {@code HttpRetryException} instance with the specified
* response code and the given detail message.
- *
+ *
* @param detail
* the detail message for this exception.
* @param code
@@ -48,7 +48,7 @@
* Creates a new {@code HttpRetryException} instance with the specified
* response code, the given detail message and the value of the location
* field from the response header.
- *
+ *
* @param detail
* the detail message for this exception.
* @param code
diff --git a/luni/src/main/java/java/net/HttpURLConnection.java b/luni/src/main/java/java/net/HttpURLConnection.java
index 69aa2a0..539c88e 100644
--- a/luni/src/main/java/java/net/HttpURLConnection.java
+++ b/luni/src/main/java/java/net/HttpURLConnection.java
@@ -24,7 +24,7 @@
/**
* This abstract subclass of {@code URLConnection} defines methods for managing
* HTTP connection according to the description given by RFC 2068.
- *
+ *
* @see ContentHandler
* @see URL
* @see URLConnection
@@ -39,7 +39,7 @@
* The HTTP request method of this {@code HttpURLConnection}. The default
* value is {@code "GET"}.
*/
- protected String method = "GET";
+ protected String method = "GET";
/**
* The status code of the response obtained from the HTTP request. The
@@ -272,7 +272,7 @@
/**
* Constructs a new {@code HttpURLConnection} instance pointing to the
* resource specified by the {@code url}.
- *
+ *
* @param url
* the URL of this connection.
* @see URL
@@ -284,7 +284,7 @@
/**
* Closes the connection to the HTTP server.
- *
+ *
* @see URLConnection#connect()
* @see URLConnection#connected
*/
@@ -294,7 +294,7 @@
* Returns an input stream from the server in the case of an error such as
* the requested file has not been found on the remote server. This stream
* can be used to read the data the server will send back.
- *
+ *
* @return the error input stream returned by the server.
*/
public java.io.InputStream getErrorStream() {
@@ -305,7 +305,7 @@
* Returns the value of {@code followRedirects} which indicates if this
* connection follows a different URL redirected by the server. It is
* enabled by default.
- *
+ *
* @return the value of the flag.
* @see #setFollowRedirects
*/
@@ -318,7 +318,7 @@
* with the host and the port number as the target name and {@code
* "resolve, connect"} as the action list. If the port number of this URL
* instance is lower than {@code 0} the port will be set to {@code 80}.
- *
+ *
* @return the permission object required for this connection.
* @throws IOException
* if an IO exception occurs during the creation of the
@@ -330,15 +330,15 @@
if (port < 0) {
port = 80;
}
- return new SocketPermission(url.getHost() + ":" + port,
- "connect, resolve");
+ return new SocketPermission(url.getHost() + ":" + port,
+ "connect, resolve");
}
/**
* Returns the request method which will be used to make the request to the
* remote HTTP server. All possible methods of this HTTP implementation is
* listed in the class definition.
- *
+ *
* @return the request method string.
* @see #method
* @see #setRequestMethod
@@ -349,7 +349,7 @@
/**
* Returns the response code returned by the remote HTTP server.
- *
+ *
* @return the response code, -1 if no valid response code.
* @throws IOException
* if there is an IO error during the retrieval.
@@ -364,7 +364,7 @@
return -1;
}
response = response.trim();
- int mark = response.indexOf(" ") + 1;
+ int mark = response.indexOf(" ") + 1;
if (mark == 0) {
return -1;
}
@@ -381,7 +381,7 @@
/**
* Returns the response message returned by the remote HTTP server.
- *
+ *
* @return the response message. {@code null} if no such response exists.
* @throws IOException
* if there is an error during the retrieval.
@@ -399,7 +399,7 @@
* Sets the flag of whether this connection will follow redirects returned
* by the remote server. This method can only be called with the permission
* from the security manager.
- *
+ *
* @param auto
* the value to enable or disable this option.
* @see SecurityManager#checkSetFactory()
@@ -415,7 +415,7 @@
/**
* Sets the request command which will be sent to the remote HTTP server.
* This method can only be called before the connection is made.
- *
+ *
* @param method
* the string representing the method to be used.
* @throws ProtocolException
@@ -426,7 +426,7 @@
*/
public void setRequestMethod(String method) throws ProtocolException {
if (connected) {
- throw new ProtocolException(Msg.getString("K0037"));
+ throw new ProtocolException(Msg.getString("K0037"));
}
for (int i = 0; i < methodTokens.length; i++) {
if (methodTokens[i].equals(method)) {
@@ -442,7 +442,7 @@
/**
* Returns whether this connection uses a proxy server or not.
- *
+ *
* @return {@code true} if this connection passes a proxy server, false
* otherwise.
*/
@@ -450,7 +450,7 @@
/**
* Returns whether this connection follows redirects.
- *
+ *
* @return {@code true} if this connection follows redirects, false
* otherwise.
*/
@@ -460,7 +460,7 @@
/**
* Sets whether this connection follows redirects.
- *
+ *
* @param followRedirects
* {@code true} if this connection will follows redirects, false
* otherwise.
@@ -473,7 +473,7 @@
* Returns the date value in milliseconds since {@code 01.01.1970, 00:00h}
* corresponding to the header field {@code field}. The {@code defaultValue}
* will be returned if no such field can be found in the response header.
- *
+ *
* @param field
* the header field name.
* @param defaultValue
@@ -491,7 +491,7 @@
* If the length of a HTTP request body is known ahead, sets fixed length to
* enable streaming without buffering. Sets after connection will cause an
* exception.
- *
+ *
* @see #setChunkedStreamingMode
* @param contentLength
* the fixed length of the HTTP request body.
@@ -502,13 +502,13 @@
*/
public void setFixedLengthStreamingMode(int contentLength) {
if (super.connected) {
- throw new IllegalStateException(Msg.getString("K0079"));
+ throw new IllegalStateException(Msg.getString("K0079"));
}
if (0 < chunkLength) {
- throw new IllegalStateException(Msg.getString("KA003"));
+ throw new IllegalStateException(Msg.getString("KA003"));
}
if (0 > contentLength) {
- throw new IllegalArgumentException(Msg.getString("K0051"));
+ throw new IllegalArgumentException(Msg.getString("K0051"));
}
this.fixedContentLength = contentLength;
}
@@ -518,7 +518,7 @@
* transfer encoding to enable streaming with buffering. Notice that not all
* http servers support this mode. Sets after connection will cause an
* exception.
- *
+ *
* @see #setFixedLengthStreamingMode
* @param chunklen
* the length of a chunk.
@@ -527,10 +527,10 @@
*/
public void setChunkedStreamingMode(int chunklen) {
if (super.connected) {
- throw new IllegalStateException(Msg.getString("K0079"));
+ throw new IllegalStateException(Msg.getString("K0079"));
}
if (0 <= fixedContentLength) {
- throw new IllegalStateException(Msg.getString("KA003"));
+ throw new IllegalStateException(Msg.getString("KA003"));
}
if (0 >= chunklen) {
chunkLength = DEFAULT_CHUNK_LENGTH;
diff --git a/luni/src/main/java/java/net/IDN.java b/luni/src/main/java/java/net/IDN.java
index 51cebeb..3ac9340 100644
--- a/luni/src/main/java/java/net/IDN.java
+++ b/luni/src/main/java/java/net/IDN.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,15 +44,15 @@
/**
* Transform a Unicode String to ASCII Compatible Encoding String according
* to the algorithm defined in RFC 3490.
- *
+ *
* <p>If the transformation fails (because the input is not a valid IDN), an
* exception will be thrown.
- *
+ *
* <p>This method can handle either an individual label or an entire domain name.
* In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
* U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
* All of these will become U+002E (full stop) in the result.
- *
+ *
* @param input the Unicode name
* @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
* or {@code ALLOW_UNASSIGNED | USE_STD3_ASCII_RULES}
@@ -65,7 +65,7 @@
/**
* Equivalent to {@code toASCII(input, 0)}.
- *
+ *
* @param input the Unicode name
* @return the ACE name
* @throws IllegalArgumentException if {@code input} does not conform to RFC 3490
@@ -77,13 +77,13 @@
/**
* Translates a string from ASCII Compatible Encoding (ACE) to Unicode
* according to the algorithm defined in RFC 3490.
- *
+ *
* <p>Unlike {@code toASCII}, this transformation cannot fail.
- *
+ *
* <p>This method can handle either an individual label or an entire domain name.
* In the latter case, the separators are: U+002E (full stop), U+3002 (ideographic full stop),
* U+FF0E (fullwidth full stop), and U+FF61 (halfwidth ideographic full stop).
- *
+ *
* @param input the ACE name
* @return the Unicode name
* @param flags 0, {@code ALLOW_UNASSIGNED}, {@code USE_STD3_ASCII_RULES},
@@ -95,7 +95,7 @@
/**
* Equivalent to {@code toUnicode(input, 0)}.
- *
+ *
* @param input the ACE name
* @return the Unicode name
*/
diff --git a/luni/src/main/java/java/net/Inet4Address.java b/luni/src/main/java/java/net/Inet4Address.java
index 2917550..93f25f8 100644
--- a/luni/src/main/java/java/net/Inet4Address.java
+++ b/luni/src/main/java/java/net/Inet4Address.java
@@ -35,7 +35,7 @@
final static InetAddress ANY = new Inet4Address(new byte[] { 0, 0, 0, 0 });
final static InetAddress LOOPBACK = new Inet4Address(
- new byte[] { 127, 0, 0, 1 }, "localhost");
+ new byte[] { 127, 0, 0, 1 }, "localhost");
Inet4Address(byte[] address) {
family = AF_INET;
@@ -51,7 +51,7 @@
/**
* Returns whether the represented address is a multicast address or not.
* Valid IPv4 multicast addresses are prefixed with 1110 = 0xE.
- *
+ *
* @return {@code true} if this instance represents a multicast address,
* {@code false} otherwise.
*/
@@ -63,7 +63,7 @@
/**
* Returns whether the represented address is the local wildcard ANY address
* or not.
- *
+ *
* @return {@code true} if this instance represents the wildcard ANY
* address, {@code false} otherwise.
*/
@@ -80,7 +80,7 @@
/**
* Returns whether the represented address is a loopback address or not.
* Loopback IPv4 addresses are prefixed with: 011111111 = 127.
- *
+ *
* @return {@code true} if this instance represents a lookback address,
* {@code false} otherwise.
*/
@@ -114,7 +114,7 @@
* Default Address Selection for Internet Protocol Version 6 (IPv6) states
* IPv4 private addresses, prefixes 10/8, 172.16/12, and 192.168/16, are
* assigned site-local scope.
- *
+ *
* @return {@code true} if this instance represents a site-local address,
* {@code false} otherwise.
*/
@@ -129,7 +129,7 @@
/**
* Returns whether the address is a global multicast address or not. Valid
* MCGlobal IPv4 addresses are 224.0.1.0 - 238.255.255.255.
- *
+ *
* @return {@code true} if the address is in the global multicast group,
* {@code false} otherwise.
*/
@@ -168,7 +168,7 @@
* Returns whether the address has a node-local scope or not. This method
* returns always {@code false} because there are no valid IPv4 node-local
* addresses.
- *
+ *
* @return {@code false} for all IPv4 addresses.
*/
@Override
@@ -180,7 +180,7 @@
* Returns whether the address is a link-local multicast address or not. The
* valid range for IPv4 link-local addresses is: 224.0.0.0 to 239.0.0.255
* Hence a mask of 111000000000000000000000 = 0xE00000.
- *
+ *
* @return {@code true} if this instance represents a link-local address,
* {@code false} otherwise.
*/
@@ -193,7 +193,7 @@
* Returns whether the address is a site-local multicast address or not. The
* valid range for IPv4 site-local addresses is: 239.255.0.0 to
* 239.255.255.255 Hence a mask of 11101111 11111111 = 0xEFFF.
- *
+ *
* @return {@code true} if this instance represents a site-local address,
* {@code false} otherwise.
*/
@@ -207,7 +207,7 @@
* not. The valid range for IPv4 organization-local addresses is:
* 239.192.0.0 to 239.195.255.255 Hence masks of 11101111 11000000 to
* 11101111 11000011 are valid. 0xEFC0 to 0xEFC3
- *
+ *
* @return {@code true} if this instance represents a organization-local
* address, {@code false} otherwise.
*/
diff --git a/luni/src/main/java/java/net/Inet6Address.java b/luni/src/main/java/java/net/Inet6Address.java
index 5b17c80..5b4cf34 100644
--- a/luni/src/main/java/java/net/Inet6Address.java
+++ b/luni/src/main/java/java/net/Inet6Address.java
@@ -36,7 +36,7 @@
static final InetAddress ANY = new Inet6Address(new byte[]
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 });
static final InetAddress LOOPBACK = new Inet6Address(new byte[]
- {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, "localhost");
+ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }, "localhost");
int scope_id;
@@ -67,7 +67,7 @@
/**
* Constructs an {@code InetAddress} representing the {@code address} and
* {@code name} and {@code scope_id}.
- *
+ *
* @param address
* the network address.
* @param name
@@ -88,7 +88,7 @@
/**
* Constructs an IPv6 address according to the given {@code host}, {@code
* addr} and {@code scope_id}.
- *
+ *
* @param host
* the host name associated with the address.
* @param addr
@@ -103,7 +103,7 @@
int scope_id) throws UnknownHostException {
if (null == addr || 16 != addr.length) {
// KA020=Illegal IPv6 address
- throw new UnknownHostException(Msg.getString("KA020"));
+ throw new UnknownHostException(Msg.getString("KA020"));
}
if (scope_id < 0) {
scope_id = 0;
@@ -116,7 +116,7 @@
* {@code addr} and {@code nif}. {@code scope_id} is set according to the
* given {@code nif} and the {@code addr} type (for example site-local or
* link-local).
- *
+ *
* @param host
* the hostname associated with the address.
* @param addr
@@ -161,7 +161,7 @@
// UnknownHostException.
if (!address.scope_id_set) {
// KA021=Scope id is not found for the given address
- throw new UnknownHostException(Msg.getString("KA021"));
+ throw new UnknownHostException(Msg.getString("KA021"));
}
return address;
}
@@ -191,7 +191,7 @@
/**
* Constructs an {@code InetAddress} representing the {@code address} and
* {@code scope_id}.
- *
+ *
* @param address
* the network address.
* @param scope_id
@@ -208,7 +208,7 @@
/**
* Returns whether this address is an IP multicast address or not. Valid
* IPv6 multicast addresses are binary prefixed with 11111111 or FF (hex).
- *
+ *
* @return {@code true} if this address is in the multicast group, {@code
* false} otherwise.
*/
@@ -221,7 +221,7 @@
/**
* Returns whether this address is a unspecified wildcard address "::" or
* not.
- *
+ *
* @return {@code true} if this instance represents a wildcard address,
* {@code false} otherwise.
*/
@@ -238,7 +238,7 @@
/**
* Returns whether this address is the loopback address or not. The only
* valid IPv6 loopback address is "::1".
- *
+ *
* @return {@code true} if this instance represents the loopback address,
* {@code false} otherwise.
*/
@@ -263,7 +263,7 @@
/**
* Returns whether this address is a link-local address or not. A valid IPv6
* link-local address is prefixed with 1111111010.
- *
+ *
* @return {@code true} if this instance represents a link-local address,
* {@code false} otherwise.
*/
@@ -277,7 +277,7 @@
/**
* Returns whether this address is a site-local address or not. A valid IPv6
* site-local address is prefixed with 1111111011.
- *
+ *
* @return {@code true} if this instance represents a site-local address,
* {@code false} otherwise.
*/
@@ -291,7 +291,7 @@
/**
* Returns whether this address is a global multicast address or not. A
* valid IPv6 global multicast address is 11111111xxxx1110 or FF0E hex.
- *
+ *
* @return {@code true} if this instance represents a global multicast
* address, {@code false} otherwise.
*/
@@ -306,7 +306,7 @@
* Returns whether this address is a node-local multicast address or not. A
* valid IPv6 node-local multicast address is prefixed with
* 11111111xxxx0001.
- *
+ *
* @return {@code true} if this instance represents a node-local multicast
* address, {@code false} otherwise.
*/
@@ -321,7 +321,7 @@
* Returns whether this address is a link-local multicast address or not. A
* valid IPv6 link-local multicast address is prefixed with
* 11111111xxxx0010.
- *
+ *
* @return {@code true} if this instance represents a link-local multicast
* address, {@code false} otherwise.
*/
@@ -336,7 +336,7 @@
* Returns whether this address is a site-local multicast address or not. A
* valid IPv6 site-local multicast address is prefixed with
* 11111111xxxx0101.
- *
+ *
* @return {@code true} if this instance represents a site-local multicast
* address, {@code false} otherwise.
*/
@@ -351,7 +351,7 @@
* Returns whether this address is a organization-local multicast address or
* not. A valid IPv6 org-local multicast address is prefixed with
* 11111111xxxx1000.
- *
+ *
* @return {@code true} if this instance represents a org-local multicast
* address, {@code false} otherwise.
*/
@@ -370,7 +370,7 @@
/**
* Gets the scope id as a number if this address is linked to an interface.
* Otherwise returns {@code 0}.
- *
+ *
* @return the scope_id of this address or 0 when not linked with an
* interface.
*/
@@ -384,7 +384,7 @@
/**
* Gets the network interface if this address is instanced with a scoped
* network interface. Otherwise returns {@code null}.
- *
+ *
* @return the scoped network interface of this address.
*/
public NetworkInterface getScopedInterface() {
@@ -406,7 +406,7 @@
* Returns whether this address is IPv4 compatible or not. An IPv4
* compatible address is prefixed with 96 bits of 0's. The last 32-bits are
* varied corresponding with the 32-bit IPv4 address space.
- *
+ *
* @return {@code true} if this instance represents an IPv4 compatible
* address, {@code false} otherwise.
*/
@@ -420,35 +420,35 @@
}
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("ipaddress", new byte[0].getClass()),
- new ObjectStreamField("scope_id", Integer.TYPE),
- new ObjectStreamField("scope_id_set", Boolean.TYPE),
- new ObjectStreamField("scope_ifname_set", Boolean.TYPE),
- new ObjectStreamField("ifname", String.class), };
+ new ObjectStreamField("ipaddress", new byte[0].getClass()),
+ new ObjectStreamField("scope_id", Integer.TYPE),
+ new ObjectStreamField("scope_id_set", Boolean.TYPE),
+ new ObjectStreamField("scope_ifname_set", Boolean.TYPE),
+ new ObjectStreamField("ifname", String.class), };
private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
if (ipaddress == null) {
- fields.put("ipaddress", null);
+ fields.put("ipaddress", null);
} else {
- fields.put("ipaddress", ipaddress);
+ fields.put("ipaddress", ipaddress);
}
- fields.put("scope_id", scope_id);
- fields.put("scope_id_set", scope_id_set);
- fields.put("scope_ifname_set", scope_ifname_set);
- fields.put("ifname", ifname);
+ fields.put("scope_id", scope_id);
+ fields.put("scope_id_set", scope_id_set);
+ fields.put("scope_ifname_set", scope_ifname_set);
+ fields.put("ifname", ifname);
stream.writeFields();
}
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = stream.readFields();
- ipaddress = (byte[]) fields.get("ipaddress", null);
- scope_id = fields.get("scope_id", 0);
- scope_id_set = fields.get("scope_id_set", false);
- ifname = (String) fields.get("ifname", null);
- scope_ifname_set = fields.get("scope_ifname_set", false);
+ ipaddress = (byte[]) fields.get("ipaddress", null);
+ scope_id = fields.get("scope_id", 0);
+ scope_id_set = fields.get("scope_id_set", false);
+ ifname = (String) fields.get("ifname", null);
+ scope_ifname_set = fields.get("scope_ifname_set", false);
if (scope_ifname_set && null != ifname) {
scopedIf = NetworkInterface.getByName(ifname);
}
@@ -457,16 +457,16 @@
/**
* Returns a string containing a concise, human-readable description of this
* IP address.
- *
+ *
* @return the description, as host/address.
*/
@Override
public String toString() {
if (ifname != null) {
- return super.toString() + "%" + ifname;
+ return super.toString() + "%" + ifname;
}
if (scope_id != 0) {
- return super.toString() + "%" + scope_id;
+ return super.toString() + "%" + scope_id;
}
return super.toString();
}
diff --git a/luni/src/main/java/java/net/InetAddress.java b/luni/src/main/java/java/net/InetAddress.java
index e2e715c..3ad4e8b 100644
--- a/luni/src/main/java/java/net/InetAddress.java
+++ b/luni/src/main/java/java/net/InetAddress.java
@@ -51,7 +51,7 @@
* Note also that on Android – unlike the RI – the cache is not unbounded. The current
* implementation caches around 512 entries, removed on a least-recently-used basis.
* (Obviously, you should not rely on these details.)
- *
+ *
* @see Inet4Address
* @see Inet6Address
*/
diff --git a/luni/src/main/java/java/net/InetSocketAddress.java b/luni/src/main/java/java/net/InetSocketAddress.java
index 5536a41..88836be 100644
--- a/luni/src/main/java/java/net/InetSocketAddress.java
+++ b/luni/src/main/java/java/net/InetSocketAddress.java
@@ -186,7 +186,7 @@
} else {
host = hostname;
}
- return host + ":" + port;
+ return host + ":" + port;
}
/**
diff --git a/luni/src/main/java/java/net/JarURLConnection.java b/luni/src/main/java/java/net/JarURLConnection.java
index d689392..0ea065d 100644
--- a/luni/src/main/java/java/net/JarURLConnection.java
+++ b/luni/src/main/java/java/net/JarURLConnection.java
@@ -66,7 +66,7 @@
super(url);
file = url.getFile();
int sepIdx;
- if ((sepIdx = file.indexOf("!/")) < 0) {
+ if ((sepIdx = file.indexOf("!/")) < 0) {
throw new MalformedURLException();
}
fileURL = new URL(url.getFile().substring(0,sepIdx));
@@ -76,7 +76,7 @@
}
entryName = file.substring(sepIdx, file.length());
if (null != url.getRef()) {
- entryName += "#" + url.getRef();
+ entryName += "#" + url.getRef();
}
}
diff --git a/luni/src/main/java/java/net/MalformedURLException.java b/luni/src/main/java/java/net/MalformedURLException.java
index cf8aa46..2c6dbd9 100644
--- a/luni/src/main/java/java/net/MalformedURLException.java
+++ b/luni/src/main/java/java/net/MalformedURLException.java
@@ -22,7 +22,7 @@
/**
* This exception is thrown when a program attempts to create an URL from an
* incorrect specification.
- *
+ *
* @see URL
*/
public class MalformedURLException extends IOException {
@@ -39,7 +39,7 @@
/**
* Constructs a new instance of this class with its walkback and message
* filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception instance.
*/
diff --git a/luni/src/main/java/java/net/MulticastSocket.java b/luni/src/main/java/java/net/MulticastSocket.java
index 06fa251..76ef300 100644
--- a/luni/src/main/java/java/net/MulticastSocket.java
+++ b/luni/src/main/java/java/net/MulticastSocket.java
@@ -193,7 +193,7 @@
public void joinGroup(InetAddress groupAddr) throws IOException {
checkClosedAndBind(false);
if (!groupAddr.isMulticastAddress()) {
- throw new IOException(Msg.getString("K0039"));
+ throw new IOException(Msg.getString("K0039"));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -224,27 +224,27 @@
NetworkInterface netInterface) throws IOException {
checkClosedAndBind(false);
if (null == groupAddress) {
- throw new IllegalArgumentException(Msg.getString("K0318"));
+ throw new IllegalArgumentException(Msg.getString("K0318"));
}
if ((netInterface != null) && (netInterface.getFirstAddress() == null)) {
// this is ok if we could set it at the
- throw new SocketException(Msg.getString("K0335"));
+ throw new SocketException(Msg.getString("K0335"));
}
if (!(groupAddress instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", groupAddress.getClass()));
+ "K0316", groupAddress.getClass()));
}
InetAddress groupAddr = ((InetSocketAddress) groupAddress).getAddress();
if (groupAddr == null) {
- throw new SocketException(Msg.getString("K0331"));
+ throw new SocketException(Msg.getString("K0331"));
}
if (!groupAddr.isMulticastAddress()) {
- throw new IOException(Msg.getString("K0039"));
+ throw new IOException(Msg.getString("K0039"));
}
SecurityManager security = System.getSecurityManager();
@@ -269,7 +269,7 @@
public void leaveGroup(InetAddress groupAddr) throws IOException {
checkClosedAndBind(false);
if (!groupAddr.isMulticastAddress()) {
- throw new IOException(Msg.getString("K003a"));
+ throw new IOException(Msg.getString("K003a"));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -298,27 +298,27 @@
NetworkInterface netInterface) throws IOException {
checkClosedAndBind(false);
if (null == groupAddress) {
- throw new IllegalArgumentException(Msg.getString("K0318"));
+ throw new IllegalArgumentException(Msg.getString("K0318"));
}
if ((netInterface != null) && (netInterface.getFirstAddress() == null)) {
// this is ok if we could set it at the
- throw new SocketException(Msg.getString("K0335"));
+ throw new SocketException(Msg.getString("K0335"));
}
if (!(groupAddress instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", groupAddress.getClass()));
+ "K0316", groupAddress.getClass()));
}
InetAddress groupAddr = ((InetSocketAddress) groupAddress).getAddress();
if (groupAddr == null) {
- throw new SocketException(Msg.getString("K0331"));
+ throw new SocketException(Msg.getString("K0331"));
}
if (!groupAddr.isMulticastAddress()) {
- throw new IOException(Msg.getString("K003a"));
+ throw new IOException(Msg.getString("K003a"));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -412,7 +412,7 @@
// Ignored
}
} else if (addr instanceof Inet6Address) {
- throw new SocketException(Msg.getString("K0338"));
+ throw new SocketException(Msg.getString("K0338"));
}
}
@@ -434,13 +434,13 @@
if (netInterface == null) {
// throw a socket exception indicating that we do not support this
- throw new SocketException(Msg.getString("K0334"));
+ throw new SocketException(Msg.getString("K0334"));
}
InetAddress firstAddress = netInterface.getFirstAddress();
if (firstAddress == null) {
// this is ok if we could set it at the
- throw new SocketException(Msg.getString("K0335"));
+ throw new SocketException(Msg.getString("K0335"));
}
if (netInterface.getIndex() == NetworkInterface.UNSET_INTERFACE_INDEX) {
@@ -487,7 +487,7 @@
* interfaces which have no IPV4 address and which does not have
* the network interface index not set correctly
*/
- throw new SocketException(Msg.getString("K0335"));
+ throw new SocketException(Msg.getString("K0335"));
}
} else {
// set the address using IP_MULTICAST_IF to make sure this
@@ -523,7 +523,7 @@
public void setTimeToLive(int ttl) throws IOException {
checkClosedAndBind(false);
if (ttl < 0 || ttl > 255) {
- throw new IllegalArgumentException(Msg.getString("K003c"));
+ throw new IllegalArgumentException(Msg.getString("K003c"));
}
impl.setTimeToLive(ttl);
}
diff --git a/luni/src/main/java/java/net/NetPermission.java b/luni/src/main/java/java/net/NetPermission.java
index bac9d89..cb8bcdd 100644
--- a/luni/src/main/java/java/net/NetPermission.java
+++ b/luni/src/main/java/java/net/NetPermission.java
@@ -31,7 +31,7 @@
* <dd>Allows a stream (protocol) handler to be set when constructing an URL
* object</dd>
* </dl>
- *
+ *
* @see java.security.BasicPermission
* @see SecurityManager
*/
@@ -41,7 +41,7 @@
/**
* Creates an instance of this class with the given name.
- *
+ *
* @param name
* the name of the new NetPermission instance.
*/
@@ -52,7 +52,7 @@
/**
* Creates an instance of this class with the given name and an action list.
* The action list is ignored and should be {@code null}.
- *
+ *
* @param name
* the name of the new {@code NetPermission} instance.
* @param actions
diff --git a/luni/src/main/java/java/net/NetworkInterface.java b/luni/src/main/java/java/net/NetworkInterface.java
index 0396e6f..16fe1e4 100644
--- a/luni/src/main/java/java/net/NetworkInterface.java
+++ b/luni/src/main/java/java/net/NetworkInterface.java
@@ -84,7 +84,7 @@
/**
* This constructor is used by the native method in order to construct the
* NetworkInterface objects in the array that it returns.
- *
+ *
* @param name
* internal name associated with the interface.
* @param displayName
@@ -110,7 +110,7 @@
/**
* Returns the index for the network interface. Unless the system supports
* IPV6 this will be 0.
- *
+ *
* @return the index
*/
int getIndex() {
@@ -121,7 +121,7 @@
* Returns the first address for the network interface. This is used in the
* natives when we need one of the addresses for the interface and any one
* will do
- *
+ *
* @return the first address if one exists, otherwise null.
*/
InetAddress getFirstAddress() {
@@ -133,7 +133,7 @@
/**
* Gets the name associated with this network interface.
- *
+ *
* @return the name of this {@code NetworkInterface} instance.
*/
public String getName() {
@@ -142,7 +142,7 @@
/**
* Gets a list of addresses bound to this network interface.
- *
+ *
* @return the address list of the represented network interface.
*/
public Enumeration<InetAddress> getInetAddresses() {
@@ -165,7 +165,7 @@
/**
* Gets the human-readable name associated with this network interface.
- *
+ *
* @return the display name of this network interface or the name if the
* display name is not available.
*/
@@ -174,7 +174,7 @@
* we should return the display name unless it is blank in this case
* return the name so that something is displayed.
*/
- if (!(displayName.equals(""))) {
+ if (!(displayName.equals(""))) {
return displayName;
}
return name;
@@ -182,7 +182,7 @@
/**
* Gets the specific network interface according to a given name.
- *
+ *
* @param interfaceName
* the name to identify the searched network interface.
* @return the network interface with the specified name if one exists or
@@ -195,7 +195,7 @@
*/
public static NetworkInterface getByName(String interfaceName) throws SocketException {
if (interfaceName == null) {
- throw new NullPointerException(Msg.getString("K0330"));
+ throw new NullPointerException(Msg.getString("K0330"));
}
for (NetworkInterface networkInterface : getNetworkInterfacesList()) {
if (networkInterface.name.equals(interfaceName)) {
@@ -220,7 +220,7 @@
*/
public static NetworkInterface getByInetAddress(InetAddress address) throws SocketException {
if (address == null) {
- throw new NullPointerException(Msg.getString("K0331"));
+ throw new NullPointerException(Msg.getString("K0331"));
}
for (NetworkInterface networkInterface : getNetworkInterfacesList()) {
if (networkInterface.addresses.contains(address)) {
@@ -233,7 +233,7 @@
/**
* Gets a list of all network interfaces available on the local system or
* {@code null} if no interface is available.
- *
+ *
* @return the list of {@code NetworkInterface} instances representing the
* available interfaces.
* @throws SocketException
@@ -294,7 +294,7 @@
* returns whether they are equal or not. The object must be an instance of
* {@code NetworkInterface} with the same name, {@code displayName} and list
* of network interfaces to be equal.
- *
+ *
* @param obj
* the object to compare with this instance.
* @return {@code true} if the specified object is equal to this {@code
@@ -329,21 +329,21 @@
/**
* Gets a string containing a concise, human-readable description of this
* network interface.
- *
+ *
* @return the textual representation for this network interface.
*/
@Override
public String toString() {
StringBuilder string = new StringBuilder(25);
- string.append("[");
+ string.append("[");
string.append(name);
- string.append("][");
+ string.append("][");
string.append(displayName);
// BEGIN android-added: the RI shows this, and it's useful for IPv6 users.
- string.append("][");
+ string.append("][");
string.append(interfaceIndex);
// END android-added
- string.append("]");
+ string.append("]");
/*
* get the addresses through this call to make sure we only reveal those
@@ -353,9 +353,9 @@
if (theAddresses != null) {
while (theAddresses.hasMoreElements()) {
InetAddress nextAddress = theAddresses.nextElement();
- string.append("[");
+ string.append("[");
string.append(nextAddress.toString());
- string.append("]");
+ string.append("]");
}
}
return string.toString();
@@ -367,7 +367,7 @@
* If there is a security manager, its checkConnect method is called with
* the InetAddress for each InterfaceAddress. Only InterfaceAddresses where
* the checkConnect doesn't throw a SecurityException will be returned.
- *
+ *
* @return a List of the InterfaceAddresses for this network interface.
* @since 1.6
* @hide
@@ -395,7 +395,7 @@
* Sub-interfaces are also known as virtual interfaces.
* <p>
* For example, {@code eth0:1} would be a sub-interface of {@code eth0}.
- *
+ *
* @return an Enumeration of all the sub-interfaces of this network interface
* @since 1.6
* @hide
@@ -407,7 +407,7 @@
/**
* Returns the parent NetworkInterface of this interface if this is a
* sub-interface, or null if it's a physical (non virtual) interface.
- *
+ *
* @return the NetworkInterface this interface is attached to.
* @since 1.6
* @hide
@@ -418,7 +418,7 @@
/**
* Returns true if this network interface is up.
- *
+ *
* @return true if the interface is up.
* @throws SocketException if an I/O error occurs.
* @since 1.6
@@ -434,7 +434,7 @@
/**
* Returns true if this network interface is a loopback interface.
- *
+ *
* @return true if the interface is a loopback interface.
* @throws SocketException if an I/O error occurs.
* @since 1.6
@@ -451,7 +451,7 @@
/**
* Returns true if this network interface is a point-to-point interface.
* (For example, a PPP connection using a modem.)
- *
+ *
* @return true if the interface is point-to-point.
* @throws SocketException if an I/O error occurs.
* @since 1.6
@@ -467,7 +467,7 @@
/**
* Returns true if this network interface supports multicast.
- *
+ *
* @throws SocketException if an I/O error occurs.
* @since 1.6
* @hide
@@ -483,7 +483,7 @@
/**
* Returns the hardware address of the interface, if it has one, and the
* user has the necessary privileges to access the address.
- *
+ *
* @return a byte array containing the address or null if the address
* doesn't exist or is not accessible.
* @throws SocketException if an I/O error occurs.
@@ -500,7 +500,7 @@
/**
* Returns the Maximum Transmission Unit (MTU) of this interface.
- *
+ *
* @return the value of the MTU for the interface.
* @throws SocketException if an I/O error occurs.
* @since 1.6
@@ -522,7 +522,7 @@
* the parent followed by a colon (:) and a number identifying the child,
* since there can be several virtual interfaces attached to a single
* physical interface.
- *
+ *
* @return true if this interface is a virtual interface.
* @since 1.6
* @hide
diff --git a/luni/src/main/java/java/net/NoRouteToHostException.java b/luni/src/main/java/java/net/NoRouteToHostException.java
index f2e2c36..3a9309c 100644
--- a/luni/src/main/java/java/net/NoRouteToHostException.java
+++ b/luni/src/main/java/java/net/NoRouteToHostException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new instance of this exception with its walkback and message
* filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/net/PasswordAuthentication.java b/luni/src/main/java/java/net/PasswordAuthentication.java
index 735810d..faac204 100644
--- a/luni/src/main/java/java/net/PasswordAuthentication.java
+++ b/luni/src/main/java/java/net/PasswordAuthentication.java
@@ -32,7 +32,7 @@
/**
* Creates an instance of a password authentication with a specified
* username and password.
- *
+ *
* @param userName
* the username to store.
* @param password
@@ -47,7 +47,7 @@
* Gets a clone of the password stored by this instance. The user is
* responsible to finalize the returned array if the password clone is no
* longer needed.
- *
+ *
* @return the copied password.
*/
public char[] getPassword() {
@@ -56,7 +56,7 @@
/**
* Gets the username stored by this instance.
- *
+ *
* @return the stored username.
*/
public String getUserName() {
diff --git a/luni/src/main/java/java/net/PortUnreachableException.java b/luni/src/main/java/java/net/PortUnreachableException.java
index 2b5b25b..c59706e 100644
--- a/luni/src/main/java/java/net/PortUnreachableException.java
+++ b/luni/src/main/java/java/net/PortUnreachableException.java
@@ -34,7 +34,7 @@
/**
* Constructs a new instance of this class with its walkback and message
* filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/net/ProtocolException.java b/luni/src/main/java/java/net/ProtocolException.java
index ebbdc44..1be76ec 100644
--- a/luni/src/main/java/java/net/ProtocolException.java
+++ b/luni/src/main/java/java/net/ProtocolException.java
@@ -36,7 +36,7 @@
/**
* Constructs a new instance of this class with its walkback and message
* filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/net/Proxy.java b/luni/src/main/java/java/net/Proxy.java
index 5e24417..4f09a27 100644
--- a/luni/src/main/java/java/net/Proxy.java
+++ b/luni/src/main/java/java/net/Proxy.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,7 +45,7 @@
* {@code Proxy.Type.SOCKS}. To create a {@code Proxy} instance representing
* the proxy type {@code Proxy.Type.DIRECT}, use {@code Proxy.NO_PROXY}
* instead of this constructor.
- *
+ *
* @param type
* the proxy type of this instance.
* @param sa
@@ -62,7 +62,7 @@
*/
if (type == Type.DIRECT || null == sa) {
// KA022=Illegal Proxy.Type or SocketAddress argument
- throw new IllegalArgumentException(Msg.getString("KA022"));
+ throw new IllegalArgumentException(Msg.getString("KA022"));
}
this.type = type;
address = sa;
@@ -79,7 +79,7 @@
/**
* Gets the type of this {@code Proxy} instance.
- *
+ *
* @return the stored proxy type.
*/
public Proxy.Type type() {
@@ -88,7 +88,7 @@
/**
* Gets the address of this {@code Proxy} instance.
- *
+ *
* @return the stored proxy address or {@code null} if the proxy type is
* {@code DIRECT}.
*/
@@ -107,7 +107,7 @@
public String toString() {
String proxyString = String.valueOf(type);
if (null != address) {
- proxyString += "/" + address.toString();
+ proxyString += "/" + address.toString();
}
return proxyString;
}
@@ -117,7 +117,7 @@
* returns whether they are equal or not. The given object must be an
* instance of {@code Proxy} with the same address and the same type value
* to be equal.
- *
+ *
* @param obj
* the object to compare with this instance.
* @return {@code true} if the given object represents the same {@code
@@ -139,7 +139,7 @@
/**
* Gets the hashcode for this {@code Proxy} instance.
- *
+ *
* @return the hashcode value for this Proxy instance.
*/
@Override
diff --git a/luni/src/main/java/java/net/ProxySelector.java b/luni/src/main/java/java/net/ProxySelector.java
index f9fd70c..b9dee5e 100644
--- a/luni/src/main/java/java/net/ProxySelector.java
+++ b/luni/src/main/java/java/net/ProxySelector.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,14 +34,14 @@
* permission.
*/
private final static NetPermission getProxySelectorPermission = new NetPermission(
- "getProxySelector");
+ "getProxySelector");
/*
* "setProxySelector" permission. setDefault method requires this
* permission.
*/
private final static NetPermission setProxySelectorPermission = new NetPermission(
- "setProxySelector");
+ "setProxySelector");
/**
* Creates a new {@code ProxySelector} instance.
@@ -52,7 +52,7 @@
/**
* Gets the default {@code ProxySelector} of the system.
- *
+ *
* @return the currently set default {@code ProxySelector}.
* @throws SecurityException
* if a security manager is installed but it doesn't have the
@@ -70,7 +70,7 @@
* Sets the default {@code ProxySelector} of the system. Removes the system
* default {@code ProxySelector} if the parameter {@code selector} is set to
* {@code null}.
- *
+ *
* @param selector
* the {@code ProxySelector} instance to set as default or
* {@code null} to remove the current default {@code
@@ -111,7 +111,7 @@
* could not be established. A concrete implementation should upon this
* notification maintain the list of available proxies, since an updated
* version should be provided by {@code select()}.
- *
+ *
* @param uri
* the URI to which the connection could not be established.
* @param sa
diff --git a/luni/src/main/java/java/net/ProxySelectorImpl.java b/luni/src/main/java/java/net/ProxySelectorImpl.java
index ea17cfd..51fcc74 100644
--- a/luni/src/main/java/java/net/ProxySelectorImpl.java
+++ b/luni/src/main/java/java/net/ProxySelectorImpl.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,9 +49,9 @@
static {
AccessController.doPrivileged(new java.security.PrivilegedAction() {
public Object run() {
- File f = new File(System.getProperty("java.home")
- + File.separator + "lib" + File.separator
- + "net.properties");
+ File f = new File(System.getProperty("java.home")
+ + File.separator + "lib" + File.separator
+ + "net.properties");
if (f.exists()) {
try {
@@ -76,7 +76,7 @@
public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
if (null == uri || null == sa || null == ioe) {
// "KA001=Argument must not be null"
- throw new IllegalArgumentException(Msg.getString("KA001"));
+ throw new IllegalArgumentException(Msg.getString("KA001"));
}
}
@@ -85,7 +85,7 @@
// argument check
if (null == uri) {
// KA001=Argument must not be null
- throw new IllegalArgumentException(Msg.getString("KA001"));
+ throw new IllegalArgumentException(Msg.getString("KA001"));
}
// check scheme
String scheme = uri.getScheme();
@@ -96,13 +96,13 @@
String host = uri.getHost();
Proxy proxy = Proxy.NO_PROXY;
- if ("http".equals(scheme)) {
+ if ("http".equals(scheme)) {
proxy = selectHttpProxy(host);
- } else if ("https".equals(scheme)) {
+ } else if ("https".equals(scheme)) {
proxy = selectHttpsProxy();
- } else if ("ftp".equals(scheme)) {
+ } else if ("ftp".equals(scheme)) {
proxy = selectFtpProxy(host);
- } else if ("socket".equals(scheme)) {
+ } else if ("socket".equals(scheme)) {
proxy = selectSocksProxy();
}
List<Proxy> proxyList = new ArrayList<Proxy>(1);
@@ -123,29 +123,29 @@
String port = null;
Proxy.Type type = Proxy.Type.DIRECT;
- String nonProxyHosts = getSystemProperty("http.nonProxyHosts");
+ String nonProxyHosts = getSystemProperty("http.nonProxyHosts");
// if host is in non proxy host list, returns Proxy.NO_PROXY
if (isNonProxyHost(uriHost, nonProxyHosts)) {
return Proxy.NO_PROXY;
}
- host = getSystemProperty("http.proxyHost");
+ host = getSystemProperty("http.proxyHost");
if (null != host) {
// case 1: http.proxyHost is set, use exact http proxy
type = Proxy.Type.HTTP;
- port = getSystemPropertyOrAlternative("http.proxyPort",
- "proxyPort", String.valueOf(HTTP_PROXY_PORT));
- } else if ((host = getSystemProperty("proxyHost", null)) != null) {
+ port = getSystemPropertyOrAlternative("http.proxyPort",
+ "proxyPort", String.valueOf(HTTP_PROXY_PORT));
+ } else if ((host = getSystemProperty("proxyHost", null)) != null) {
// case 2: proxyHost is set, use exact http proxy
type = Proxy.Type.HTTP;
- port = getSystemPropertyOrAlternative("proxyPort",
- "http.proxyPort", String.valueOf(HTTP_PROXY_PORT));
+ port = getSystemPropertyOrAlternative("proxyPort",
+ "http.proxyPort", String.valueOf(HTTP_PROXY_PORT));
- } else if ((host = getSystemProperty("socksProxyHost")) != null) {
+ } else if ((host = getSystemProperty("socksProxyHost")) != null) {
// case 3: use socks proxy instead
type = Proxy.Type.SOCKS;
port = getSystemProperty(
- "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
+ "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
}
int defaultPort = (type == Proxy.Type.SOCKS) ? SOCKS_PROXY_PORT
: HTTP_PROXY_PORT;
@@ -160,19 +160,19 @@
String port = null;
Proxy.Type type = Proxy.Type.DIRECT;
- host = getSystemProperty("https.proxyHost");
+ host = getSystemProperty("https.proxyHost");
if (null != host) {
// case 1: use exact https proxy
type = Proxy.Type.HTTP;
port = getSystemProperty(
- "https.proxyPort", String.valueOf(HTTPS_PROXY_PORT));
+ "https.proxyPort", String.valueOf(HTTPS_PROXY_PORT));
} else {
- host = getSystemProperty("socksProxyHost");
+ host = getSystemProperty("socksProxyHost");
if (null != host) {
// case 2: use socks proxy instead
type = Proxy.Type.SOCKS;
port = getSystemProperty(
- "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
+ "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
}
}
int defaultPort = (type == Proxy.Type.SOCKS) ? SOCKS_PROXY_PORT
@@ -187,25 +187,25 @@
String host;
String port = null;
Proxy.Type type = Proxy.Type.DIRECT;
- String nonProxyHosts = getSystemProperty("ftp.nonProxyHosts");
+ String nonProxyHosts = getSystemProperty("ftp.nonProxyHosts");
// if host is in non proxy host list, returns Proxy.NO_PROXY
if (isNonProxyHost(uriHost, nonProxyHosts)) {
return Proxy.NO_PROXY;
}
- host = getSystemProperty("ftp.proxyHost");
+ host = getSystemProperty("ftp.proxyHost");
if (null != host) {
// case 1: use exact ftp proxy
type = Proxy.Type.HTTP;
port = getSystemProperty(
- "ftp.proxyPort", String.valueOf(FTP_PROXY_PORT));
+ "ftp.proxyPort", String.valueOf(FTP_PROXY_PORT));
} else {
- host = getSystemProperty("socksProxyHost");
+ host = getSystemProperty("socksProxyHost");
if (null != host) {
// case 2: use socks proxy instead
type = Proxy.Type.SOCKS;
port = getSystemProperty(
- "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
+ "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
}
}
int defaultPort = (type == Proxy.Type.SOCKS) ? SOCKS_PROXY_PORT
@@ -221,11 +221,11 @@
String port = null;
Proxy.Type type = Proxy.Type.DIRECT;
- host = getSystemProperty("socksProxyHost");
+ host = getSystemProperty("socksProxyHost");
if (null != host) {
type = Proxy.Type.SOCKS;
port = getSystemProperty(
- "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
+ "socksProxyPort", String.valueOf(SOCKS_PROXY_PORT));
}
return createProxy(type, host, port, SOCKS_PROXY_PORT);
}
@@ -247,10 +247,10 @@
ch = nonProxyHosts.charAt(i);
switch (ch) {
case '.':
- buf.append("\\.");
+ buf.append("\\.");
break;
case '*':
- buf.append(".*");
+ buf.append(".*");
break;
default:
buf.append(ch);
@@ -300,7 +300,7 @@
final String defaultValue) {
String value = AccessController.doPrivileged(new PriviAction<String>(
property));
- if (null == value || "".equals(value)) {
+ if (null == value || "".equals(value)) {
value = (netProps != null)
? netProps.getProperty(property, defaultValue)
: defaultValue;
diff --git a/luni/src/main/java/java/net/ResponseCache.java b/luni/src/main/java/java/net/ResponseCache.java
index 0bfe994..b92e6db 100644
--- a/luni/src/main/java/java/net/ResponseCache.java
+++ b/luni/src/main/java/java/net/ResponseCache.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,7 +55,7 @@
/**
* Returns the cached response corresponding to the given request.
- *
+ *
* @param uri
* the request URI.
* @param requestMethod
@@ -77,7 +77,7 @@
* {@code ResponseCache} decides whether the resource data should be cached
* or not. If so, this method returns a {@code CacheRequest} to write the
* resource data to. Otherwise, this method returns {@code null}.
- *
+ *
* @param uri
* the reference to the requested resource.
* @param conn
diff --git a/luni/src/main/java/java/net/SecureCacheResponse.java b/luni/src/main/java/java/net/SecureCacheResponse.java
index 0031b3a..9a35b08 100644
--- a/luni/src/main/java/java/net/SecureCacheResponse.java
+++ b/luni/src/main/java/java/net/SecureCacheResponse.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
* A secure cache response represents data which is originally retrieved over a
* secure connection. Such a connection can be secured by using a cryptographic
* protocol like TLS or SSL.
- *
+ *
* @see ResponseCache
*/
public abstract class SecureCacheResponse extends CacheResponse {
@@ -40,7 +40,7 @@
/**
* Gets the cipher suite string on the connection which is originally used
* to retrieve the network resource.
- *
+ *
* @return the cipher suite string.
*/
public abstract String getCipherSuite();
@@ -50,7 +50,7 @@
* the resource data, this certificate chain was sent to the server during
* handshaking process. This method only takes effect when certificate-based
* cipher suite is enabled.
- *
+ *
* @return the certificate chain that was sent to the server. If no
* certificate chain was sent, the method returns {@code null}.
*/
@@ -62,7 +62,7 @@
* connection retrieved network resource. This method can only be invoked
* when certificated-based cipher suite is enabled. Otherwise, it throws an
* {@code SSLPeerUnverifiedException}.
- *
+ *
* @return the server's certificate chain.
* @throws SSLPeerUnverifiedException
* if the peer is unverified.
@@ -74,7 +74,7 @@
* Gets the server's principle. When the original connection retrieved
* network resource, the principle was established when defining the
* session.
- *
+ *
* @return a principal object representing the server's principal.
* @throws SSLPeerUnverifiedException
* if the peer is unverified.
@@ -86,7 +86,7 @@
* Gets the local principle that the original connection sent to the server.
* When the original connection fetched the network resource, the principle
* was sent to the server during handshaking process.
- *
+ *
* @return the local principal object being sent to the server. Returns an
* {@code X500Principal} object for X509-based cipher suites. If no
* principal was sent, it returns {@code null}.
diff --git a/luni/src/main/java/java/net/ServerSocket.java b/luni/src/main/java/java/net/ServerSocket.java
index d3bb03f..6522edf 100644
--- a/luni/src/main/java/java/net/ServerSocket.java
+++ b/luni/src/main/java/java/net/ServerSocket.java
@@ -145,7 +145,7 @@
public Socket accept() throws IOException {
checkClosedAndCreate(false);
if (!isBound()) {
- throw new SocketException(Msg.getString("K031f"));
+ throw new SocketException(Msg.getString("K031f"));
}
Socket aSocket = new Socket();
@@ -171,7 +171,7 @@
*/
void checkListen(int aPort) {
if (aPort < 0 || aPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0325", aPort));
+ throw new IllegalArgumentException(Msg.getString("K0325", aPort));
}
SecurityManager security = System.getSecurityManager();
if (security != null) {
@@ -294,7 +294,7 @@
security.checkSetFactory();
}
if (factory != null) {
- throw new SocketException(Msg.getString("K0042"));
+ throw new SocketException(Msg.getString("K0042"));
}
factory = aFactory;
}
@@ -312,7 +312,7 @@
public synchronized void setSoTimeout(int timeout) throws SocketException {
checkClosedAndCreate(true);
if (timeout < 0) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
impl.setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
}
@@ -327,15 +327,15 @@
@Override
public String toString() {
StringBuilder result = new StringBuilder(64);
- result.append("ServerSocket[");
+ result.append("ServerSocket[");
if (!isBound()) {
- return result.append("unbound]").toString();
+ return result.append("unbound]").toString();
}
- return result.append("addr=")
- .append(getInetAddress().getHostName()).append("/")
+ return result.append("addr=")
+ .append(getInetAddress().getHostName()).append("/")
.append(getInetAddress().getHostAddress()).append(
- ",port=0,localport=")
- .append(getLocalPort()).append("]")
+ ",port=0,localport=")
+ .append(getLocalPort()).append("]")
.toString();
}
@@ -378,19 +378,19 @@
public void bind(SocketAddress localAddr, int backlog) throws IOException {
checkClosedAndCreate(true);
if (isBound()) {
- throw new BindException(Msg.getString("K0315"));
+ throw new BindException(Msg.getString("K0315"));
}
int port = 0;
InetAddress addr = Inet4Address.ANY;
if (localAddr != null) {
if (!(localAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", localAddr.getClass()));
+ "K0316", localAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) localAddr;
if ((addr = inetAddr.getAddress()) == null) {
throw new SocketException(Msg.getString(
- "K0317", inetAddr.getHostName()));
+ "K0317", inetAddr.getHostName()));
}
port = inetAddr.getPort();
}
@@ -448,7 +448,7 @@
*/
private void checkClosedAndCreate(boolean create) throws SocketException {
if (isClosed()) {
- throw new SocketException(Msg.getString("K003d"));
+ throw new SocketException(Msg.getString("K003d"));
}
if (!create || isCreated) {
@@ -510,7 +510,7 @@
public void setReceiveBufferSize(int size) throws SocketException {
checkClosedAndCreate(true);
if (size < 1) {
- throw new IllegalArgumentException(Msg.getString("K0035"));
+ throw new IllegalArgumentException(Msg.getString("K0035"));
}
impl.setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
}
diff --git a/luni/src/main/java/java/net/Socket.java b/luni/src/main/java/java/net/Socket.java
index 29a66ee..689788c 100644
--- a/luni/src/main/java/java/net/Socket.java
+++ b/luni/src/main/java/java/net/Socket.java
@@ -110,7 +110,7 @@
public Socket(Proxy proxy) {
if (null == proxy || Proxy.Type.HTTP == proxy.type()) {
// KA023=Proxy is null or invalid type
- throw new IllegalArgumentException(Msg.getString("KA023"));
+ throw new IllegalArgumentException(Msg.getString("KA023"));
}
InetSocketAddress address = (InetSocketAddress) proxy.address();
if (null != address) {
@@ -383,7 +383,7 @@
*/
void checkDestination(InetAddress destAddr, int dstPort) {
if (dstPort < 0 || dstPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0032"));
+ throw new IllegalArgumentException(Msg.getString("K0032"));
}
// BEGIN android-changed
checkConnectPermission(destAddr.getHostAddress(), dstPort);
@@ -441,7 +441,7 @@
public InputStream getInputStream() throws IOException {
checkClosedAndCreate(false);
if (isInputShutdown()) {
- throw new SocketException(Msg.getString("K0321"));
+ throw new SocketException(Msg.getString("K0321"));
}
return impl.getInputStream();
}
@@ -498,7 +498,7 @@
public OutputStream getOutputStream() throws IOException {
checkClosedAndCreate(false);
if (isOutputShutdown()) {
- throw new SocketException(Msg.getString("KA00f"));
+ throw new SocketException(Msg.getString("KA00f"));
}
return impl.getOutputStream();
}
@@ -619,7 +619,7 @@
security.checkSetFactory();
}
if (factory != null) {
- throw new SocketException(Msg.getString("K0044"));
+ throw new SocketException(Msg.getString("K0044"));
}
factory = fac;
}
@@ -638,7 +638,7 @@
public synchronized void setSendBufferSize(int size) throws SocketException {
checkClosedAndCreate(true);
if (size < 1) {
- throw new IllegalArgumentException(Msg.getString("K0035"));
+ throw new IllegalArgumentException(Msg.getString("K0035"));
}
impl.setOption(SocketOptions.SO_SNDBUF, Integer.valueOf(size));
}
@@ -658,7 +658,7 @@
throws SocketException {
checkClosedAndCreate(true);
if (size < 1) {
- throw new IllegalArgumentException(Msg.getString("K0035"));
+ throw new IllegalArgumentException(Msg.getString("K0035"));
}
impl.setOption(SocketOptions.SO_RCVBUF, Integer.valueOf(size));
}
@@ -679,7 +679,7 @@
public void setSoLinger(boolean on, int timeout) throws SocketException {
checkClosedAndCreate(true);
if (on && timeout < 0) {
- throw new IllegalArgumentException(Msg.getString("K0045"));
+ throw new IllegalArgumentException(Msg.getString("K0045"));
}
// BEGIN android-changed
/*
@@ -713,7 +713,7 @@
public synchronized void setSoTimeout(int timeout) throws SocketException {
checkClosedAndCreate(true);
if (timeout < 0) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
impl.setOption(SocketOptions.SO_TIMEOUT, Integer.valueOf(timeout));
}
@@ -753,7 +753,7 @@
throws IOException {
if (localPort < 0 || localPort > 65535) {
- throw new IllegalArgumentException(Msg.getString("K0046"));
+ throw new IllegalArgumentException(Msg.getString("K0046"));
}
InetAddress addr = localAddress == null ? Inet4Address.ANY
@@ -784,7 +784,7 @@
@Override
public String toString() {
if (!isConnected()) {
- return "Socket[unconnected]";
+ return "Socket[unconnected]";
}
return impl.toString();
}
@@ -801,7 +801,7 @@
*/
public void shutdownInput() throws IOException {
if (isInputShutdown()) {
- throw new SocketException(Msg.getString("K0321"));
+ throw new SocketException(Msg.getString("K0321"));
}
checkClosedAndCreate(false);
impl.shutdownInput();
@@ -820,7 +820,7 @@
*/
public void shutdownOutput() throws IOException {
if (isOutputShutdown()) {
- throw new SocketException(Msg.getString("KA00f"));
+ throw new SocketException(Msg.getString("KA00f"));
}
checkClosedAndCreate(false);
impl.shutdownOutput();
@@ -836,11 +836,11 @@
*/
private void checkClosedAndCreate(boolean create) throws SocketException {
if (isClosed()) {
- throw new SocketException(Msg.getString("K003d"));
+ throw new SocketException(Msg.getString("K003d"));
}
if (!create) {
if (!isConnected()) {
- throw new SocketException(Msg.getString("K0320"));
+ throw new SocketException(Msg.getString("K0320"));
// a connected socket must be created
}
@@ -940,7 +940,7 @@
public void bind(SocketAddress localAddr) throws IOException {
checkClosedAndCreate(true);
if (isBound()) {
- throw new BindException(Msg.getString("K0315"));
+ throw new BindException(Msg.getString("K0315"));
}
int port = 0;
@@ -948,12 +948,12 @@
if (localAddr != null) {
if (!(localAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", localAddr.getClass()));
+ "K0316", localAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) localAddr;
if ((addr = inetAddr.getAddress()) == null) {
throw new SocketException(Msg.getString(
- "K0317", inetAddr.getHostName()));
+ "K0317", inetAddr.getHostName()));
}
port = inetAddr.getPort();
}
@@ -1007,18 +1007,18 @@
throws IOException {
checkClosedAndCreate(true);
if (timeout < 0) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
if (isConnected()) {
- throw new SocketException(Msg.getString("K0079"));
+ throw new SocketException(Msg.getString("K0079"));
}
if (remoteAddr == null) {
- throw new IllegalArgumentException(Msg.getString("K0318"));
+ throw new IllegalArgumentException(Msg.getString("K0318"));
}
if (!(remoteAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", remoteAddr.getClass()));
+ "K0316", remoteAddr.getClass()));
}
InetSocketAddress inetAddr = (InetSocketAddress) remoteAddr;
InetAddress addr;
@@ -1177,7 +1177,7 @@
*/
public void sendUrgentData(int value) throws IOException {
if (!impl.supportsUrgentData()) {
- throw new SocketException(Msg.getString("K0333"));
+ throw new SocketException(Msg.getString("K0333"));
}
impl.sendUrgentData(value);
}
@@ -1194,8 +1194,8 @@
static boolean preferIPv4Stack() {
String result = AccessController.doPrivileged(new PriviAction<String>(
- "java.net.preferIPv4Stack"));
- return "true".equals(result);
+ "java.net.preferIPv4Stack"));
+ return "true".equals(result);
}
/**
diff --git a/luni/src/main/java/java/net/SocketException.java b/luni/src/main/java/java/net/SocketException.java
index 23d3744..4a24692 100644
--- a/luni/src/main/java/java/net/SocketException.java
+++ b/luni/src/main/java/java/net/SocketException.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code SocketException} instance with its walkback and
* message filled in.
- *
+ *
* @param detailMessage
* the detail message of this exception.
*/
diff --git a/luni/src/main/java/java/net/SocketImplFactory.java b/luni/src/main/java/java/net/SocketImplFactory.java
index 57b0bc3..8bd0c24 100644
--- a/luni/src/main/java/java/net/SocketImplFactory.java
+++ b/luni/src/main/java/java/net/SocketImplFactory.java
@@ -24,7 +24,7 @@
/**
* Creates a new {@code SocketImpl} instance.
- *
+ *
* @return the created {@code SocketImpl} instance.
*/
SocketImpl createSocketImpl();
diff --git a/luni/src/main/java/java/net/SocketOptions.java b/luni/src/main/java/java/net/SocketOptions.java
index 38c9301..e10672b 100644
--- a/luni/src/main/java/java/net/SocketOptions.java
+++ b/luni/src/main/java/java/net/SocketOptions.java
@@ -22,7 +22,7 @@
* Defines an interface for socket implementations to get and set socket
* options. It is implemented by the classes {@code SocketImpl} and {@code
* DatagramSocketImpl}.
- *
+ *
* @see SocketImpl
* @see DatagramSocketImpl
*/
@@ -58,7 +58,7 @@
// For 5 and 6 see MulticastSocket
// For 7 see PlainDatagramSocketImpl
-
+
/**
* This option specifies the interface which is used to send multicast
* packets. It's only available on a {@code MulticastSocket}.
@@ -80,7 +80,7 @@
public static final int SO_REUSEADDR = 4;
// 10 not currently used
-
+
/**
* Buffer size of the outgoing channel.
*/
@@ -92,37 +92,37 @@
public static final int SO_RCVBUF = 4098;
// For 13, see DatagramSocket
-
+
/**
* This option specifies whether socket implementations can send keepalive
* messages if no data has been sent for a longer time.
*/
public static final int SO_KEEPALIVE = 8;
-
+
/**
* This option specifies the value for the Type-of-Service (TOS) field of
* the IP header.
*/
public static final int IP_TOS = 3;
-
+
/**
* This option specifies whether the local loopback of multicast packets is
* enabled or disabled. This option is enabled by default on multicast
* sockets.
*/
public static final int IP_MULTICAST_LOOP = 18;
-
+
/**
* This option can be used to enable broadcasting on datagram sockets.
*/
public static final int SO_BROADCAST = 32;
-
+
/**
* This option specifies whether sending TCP urgent data is supported on
* this socket or not.
*/
public static final int SO_OOBINLINE = 4099;
-
+
/**
* This option can be used to set one specific interface on a multihomed
* host on which incoming connections are accepted. It's only available on
@@ -133,7 +133,7 @@
/**
* Gets the value for the specified socket option.
- *
+ *
* @return the option value.
* @param optID
* the option identifier.
@@ -144,7 +144,7 @@
/**
* Sets the value of the specified socket option.
- *
+ *
* @param optID
* the option identifier.
* @param val
diff --git a/luni/src/main/java/java/net/SocketPermission.java b/luni/src/main/java/java/net/SocketPermission.java
index ed3a460..a42facc 100644
--- a/luni/src/main/java/java/net/SocketPermission.java
+++ b/luni/src/main/java/java/net/SocketPermission.java
@@ -123,12 +123,12 @@
* the action string of this permission.
*/
public SocketPermission(String host, String action) {
- super(host.equals("") ? "localhost" : host);
+ super(host.equals("") ? "localhost" : host);
hostName = getHostString(host);
if (action == null) {
throw new NullPointerException();
}
- if (action.equals("")) {
+ if (action.equals("")) {
throw new IllegalArgumentException();
}
@@ -206,7 +206,7 @@
* java.lang.String the action list
*/
private void setActions(String actions) throws IllegalArgumentException {
- if (actions.equals("")) {
+ if (actions.equals("")) {
return;
}
boolean parsing = true;
@@ -232,7 +232,7 @@
} else if (action.equals(actionNames[SP_RESOLVE])) {
// do nothing
} else {
- throw new IllegalArgumentException(Msg.getString("K0048",
+ throw new IllegalArgumentException(Msg.getString("K0048",
action));
}
}
@@ -268,7 +268,7 @@
// only check the port range if the action string of the current object
// is not "resolve"
- if (!p.getActions().equals("resolve")) {
+ if (!p.getActions().equals("resolve")) {
if ((sp.portMin < this.portMin) || (sp.portMax > this.portMax)) {
return false;
}
@@ -298,7 +298,7 @@
*/
private void parsePort(String hostPort, String host) throws IllegalArgumentException {
String port = hostPort.substring(host.length());
- String emptyString = "";
+ String emptyString = "";
if (emptyString.equals(port)) {
// Not specified
@@ -339,11 +339,11 @@
if (portMin > portMax) {
// K0049=MinPort is greater than MaxPort\: {0}
- throw new IllegalArgumentException(Msg.getString("K0049", port));
+ throw new IllegalArgumentException(Msg.getString("K0049", port));
}
} catch (NumberFormatException e) {
// K004a=Invalid port number specified\: {0}
- throw new IllegalArgumentException(Msg.getString("K004a", port));
+ throw new IllegalArgumentException(Msg.getString("K004a", port));
}
}
@@ -356,7 +356,7 @@
* @return java.lang.String
*/
private String toCanonicalActionString(String action) {
- if (action == null || action.equals("") || actionsMask == SP_RESOLVE) {
+ if (action == null || action.equals("") || actionsMask == SP_RESOLVE) {
return actionNames[SP_RESOLVE]; // If none specified return the
}
// implied action resolve
diff --git a/luni/src/main/java/java/net/SocketTimeoutException.java b/luni/src/main/java/java/net/SocketTimeoutException.java
index c1c762e..9d5943f 100644
--- a/luni/src/main/java/java/net/SocketTimeoutException.java
+++ b/luni/src/main/java/java/net/SocketTimeoutException.java
@@ -38,7 +38,7 @@
/**
* Creates a new {@code SocketTimeoutException} instance with its walkback
* and message filled in.
- *
+ *
* @param detailMessage
* the detail message of this exception.
*/
diff --git a/luni/src/main/java/java/net/URI.java b/luni/src/main/java/java/net/URI.java
index 926ec3c..dedc783 100644
--- a/luni/src/main/java/java/net/URI.java
+++ b/luni/src/main/java/java/net/URI.java
@@ -624,7 +624,7 @@
/**
* Quote illegal chars for each component, but not the others
- *
+ *
* @param component java.lang.String the component to be converted
* @param legalSet the legal character set allowed in the component
* @return java.lang.String the converted string
@@ -946,7 +946,7 @@
/**
* Gets the decoded fragment part of this URI.
- *
+ *
* @return the decoded fragment part or {@code null} if undefined.
*/
public String getFragment() {
@@ -955,7 +955,7 @@
/**
* Gets the host part of this URI.
- *
+ *
* @return the host part or {@code null} if undefined.
*/
public String getHost() {
@@ -964,7 +964,7 @@
/**
* Gets the decoded path part of this URI.
- *
+ *
* @return the decoded path part or {@code null} if undefined.
*/
public String getPath() {
@@ -973,7 +973,7 @@
/**
* Gets the port number of this URI.
- *
+ *
* @return the port number or {@code -1} if undefined.
*/
public int getPort() {
@@ -982,7 +982,7 @@
/**
* Gets the decoded query part of this URI.
- *
+ *
* @return the decoded query part or {@code null} if undefined.
*/
public String getQuery() {
@@ -991,7 +991,7 @@
/**
* Gets the authority part of this URI in raw form.
- *
+ *
* @return the encoded authority part or {@code null} if undefined.
*/
public String getRawAuthority() {
@@ -1000,7 +1000,7 @@
/**
* Gets the fragment part of this URI in raw form.
- *
+ *
* @return the encoded fragment part or {@code null} if undefined.
*/
public String getRawFragment() {
@@ -1009,7 +1009,7 @@
/**
* Gets the path part of this URI in raw form.
- *
+ *
* @return the encoded path part or {@code null} if undefined.
*/
public String getRawPath() {
@@ -1018,7 +1018,7 @@
/**
* Gets the query part of this URI in raw form.
- *
+ *
* @return the encoded query part or {@code null} if undefined.
*/
public String getRawQuery() {
@@ -1027,7 +1027,7 @@
/**
* Gets the scheme-specific part of this URI in raw form.
- *
+ *
* @return the encoded scheme-specific part or {@code null} if undefined.
*/
public String getRawSchemeSpecificPart() {
@@ -1036,7 +1036,7 @@
/**
* Gets the user-info part of this URI in raw form.
- *
+ *
* @return the encoded user-info part or {@code null} if undefined.
*/
public String getRawUserInfo() {
@@ -1045,7 +1045,7 @@
/**
* Gets the scheme part of this URI.
- *
+ *
* @return the scheme part or {@code null} if undefined.
*/
public String getScheme() {
@@ -1054,7 +1054,7 @@
/**
* Gets the decoded scheme-specific part of this URI.
- *
+ *
* @return the decoded scheme-specific part or {@code null} if undefined.
*/
public String getSchemeSpecificPart() {
@@ -1063,7 +1063,7 @@
/**
* Gets the decoded user-info part of this URI.
- *
+ *
* @return the decoded user-info part or {@code null} if undefined.
*/
public String getUserInfo() {
@@ -1086,7 +1086,7 @@
/**
* Indicates whether this URI is absolute, which means that a scheme part is
* defined in this URI.
- *
+ *
* @return {@code true} if this URI is absolute, {@code false} otherwise.
*/
public boolean isAbsolute() {
@@ -1098,7 +1098,7 @@
* and has a scheme-specific part which does not start with a slash
* character. All parts except scheme, scheme-specific and fragment are
* undefined.
- *
+ *
* @return {@code true} if the URI is opaque, {@code false} otherwise.
*/
public boolean isOpaque() {
@@ -1384,7 +1384,7 @@
/**
* Encode unicode chars that are not part of US-ASCII char set into the
* escaped form
- *
+ *
* i.e. The Euro currency symbol is encoded as "%E2%82%AC".
*/
private String encodeNonAscii(String s) {
diff --git a/luni/src/main/java/java/net/URIEncoderDecoder.java b/luni/src/main/java/java/net/URIEncoderDecoder.java
index cb8dcd4..8b4764a 100644
--- a/luni/src/main/java/java/net/URIEncoderDecoder.java
+++ b/luni/src/main/java/java/net/URIEncoderDecoder.java
@@ -30,9 +30,9 @@
*/
class URIEncoderDecoder {
- static final String digits = "0123456789ABCDEF";
+ static final String digits = "0123456789ABCDEF";
- static final String encoding = "UTF8";
+ static final String encoding = "UTF8";
/**
* Validate a string by checking if it contains any characters other than:
@@ -54,13 +54,13 @@
if (ch == '%') {
do {
if (i + 2 >= s.length()) {
- throw new URISyntaxException(s, Msg.getString("K0313"),
+ throw new URISyntaxException(s, Msg.getString("K0313"),
i);
}
int d1 = Character.digit(s.charAt(i + 1), 16);
int d2 = Character.digit(s.charAt(i + 2), 16);
if (d1 == -1 || d2 == -1) {
- throw new URISyntaxException(s, Msg.getString("K0314",
+ throw new URISyntaxException(s, Msg.getString("K0314",
s.substring(i, i + 3)), i);
}
@@ -73,7 +73,7 @@
|| (ch >= '0' && ch <= '9') || legal.indexOf(ch) > -1 || (ch > 127
&& !Character.isSpaceChar(ch) && !Character
.isISOControl(ch)))) {
- throw new URISyntaxException(s, Msg.getString("K00c1"), i);
+ throw new URISyntaxException(s, Msg.getString("K00c1"), i);
}
i++;
}
@@ -85,7 +85,7 @@
char ch = s.charAt(i);
if (!((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')
|| (ch >= '0' && ch <= '9') || legal.indexOf(ch) > -1)) {
- throw new URISyntaxException(s, Msg.getString("K00c1"), i);
+ throw new URISyntaxException(s, Msg.getString("K00c1"), i);
}
i++;
}
@@ -176,7 +176,7 @@
* e.g. "A%20B%20C %24%25" -> "A B C $%"
* <p>
* Called from URI.getXYZ() methods
- *
+ *
* @param s
* java.lang.String The encoded string.
* @return java.lang.String The decoded version.
@@ -192,13 +192,13 @@
do {
if (i + 2 >= s.length()) {
throw new IllegalArgumentException(Msg.getString(
- "K01fe", i));
+ "K01fe", i));
}
int d1 = Character.digit(s.charAt(i + 1), 16);
int d2 = Character.digit(s.charAt(i + 2), 16);
if (d1 == -1 || d2 == -1) {
throw new IllegalArgumentException(Msg.getString(
- "K01ff", s.substring(i, i + 3),
+ "K01ff", s.substring(i, i + 3),
String.valueOf(i)));
}
out.write((byte) ((d1 << 4) + d2));
diff --git a/luni/src/main/java/java/net/URISyntaxException.java b/luni/src/main/java/java/net/URISyntaxException.java
index 136a926..964f507 100644
--- a/luni/src/main/java/java/net/URISyntaxException.java
+++ b/luni/src/main/java/java/net/URISyntaxException.java
@@ -35,7 +35,7 @@
* Constructs a new {@code URISyntaxException} instance containing the
* string that caused the exception, a description of the problem and the
* index at which the error occurred.
- *
+ *
* @param input
* the string that caused the exception.
* @param reason
@@ -66,7 +66,7 @@
/**
* Constructs a new {@code URISyntaxException} instance containing the
* string that caused the exception and a description of the problem.
- *
+ *
*@param input
* the string that caused the exception.
* @param reason
@@ -89,7 +89,7 @@
/**
* Gets the index at which the syntax error was found or {@code -1} if the
* index is unknown/unavailable.
- *
+ *
* @return the index of the syntax error.
*/
public int getIndex() {
@@ -98,7 +98,7 @@
/**
* Gets a description of the syntax error.
- *
+ *
* @return the string describing the syntax error.
*/
public String getReason() {
@@ -107,7 +107,7 @@
/**
* Gets the initial string that contains an invalid syntax.
- *
+ *
* @return the string that caused the exception.
*/
public String getInput() {
@@ -118,7 +118,7 @@
* Gets a description of the exception, including the reason, the string
* that caused the syntax error and the position of the syntax error if
* available.
- *
+ *
* @return a sting containing information about the exception.
* @see java.lang.Throwable#getMessage()
*/
@@ -127,10 +127,10 @@
String reason = super.getMessage();
if (index != -1) {
- return Msg.getString("K0326",
+ return Msg.getString("K0326",
new String[] { reason, Integer.toString(index), input });
}
- return Msg.getString("K0327",
+ return Msg.getString("K0327",
new String[] { reason, input });
}
}
diff --git a/luni/src/main/java/java/net/URL.java b/luni/src/main/java/java/net/URL.java
index 44874d3..c6a6d60 100644
--- a/luni/src/main/java/java/net/URL.java
+++ b/luni/src/main/java/java/net/URL.java
@@ -39,47 +39,47 @@
private static final long serialVersionUID = -7627629688361524110L;
private static final NetPermission specifyStreamHandlerPermission = new NetPermission(
- "specifyStreamHandler");
+ "specifyStreamHandler");
private int hashCode;
/**
* The receiver's filename.
- *
+ *
* @serial the file of this URL
- *
+ *
*/
private String file;
/**
* The receiver's protocol identifier.
- *
+ *
* @serial the protocol of this URL (http, file)
- *
+ *
*/
private String protocol = null;
/**
* The receiver's host name.
- *
+ *
* @serial the host of this URL
- *
+ *
*/
private String host;
/**
* The receiver's port number.
- *
+ *
* @serial the port of this URL
- *
+ *
*/
private int port = -1;
/**
* The receiver's authority.
- *
+ *
* @serial the authority of this URL
- *
+ *
*/
private String authority = null;
@@ -100,9 +100,9 @@
/**
* The receiver's reference.
- *
+ *
* @serial the reference of this URL
- *
+ *
*/
private String ref = null;
@@ -136,7 +136,7 @@
public static synchronized void setURLStreamHandlerFactory(
URLStreamHandlerFactory streamFactory) {
if (streamHandlerFactory != null) {
- throw new Error(Msg.getString("K004b"));
+ throw new Error(Msg.getString("K004b"));
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -148,7 +148,7 @@
/**
* Creates a new URL instance by parsing the string {@code spec}.
- *
+ *
* @param spec
* the URL string representation which has to be parsed.
* @throws MalformedURLException
@@ -165,7 +165,7 @@
* does not match with the protocol of the context URL, then the newly
* created URL is absolute and bases only on the given URL represented by
* {@code spec}. Otherwise the protocol is defined by the context URL.
- *
+ *
* @param context
* the URL which is used as the context.
* @param spec
@@ -186,7 +186,7 @@
* parsed URL does not match with the protocol of the context URL, then the
* newly created URL is absolute and bases only on the given URL represented
* by {@code spec}. Otherwise the protocol is defined by the context URL.
- *
+ *
* @param context
* the URL which is used as the context.
* @param spec
@@ -257,7 +257,7 @@
// by the values in the spec.
if (context != null && protocol.equals(context.getProtocol())) {
String cPath = context.getPath();
- if (cPath != null && cPath.startsWith("/")) {
+ if (cPath != null && cPath.startsWith("/")) {
set(protocol, context.getHost(), context.getPort(), context
.getAuthority(), context.getUserInfo(), cPath,
context.getQuery(), null);
@@ -274,7 +274,7 @@
if (context == null) {
throw new MalformedURLException(
org.apache.harmony.luni.util.Msg.getString(
- "K00d8", spec));
+ "K00d8", spec));
}
set(context.getProtocol(), context.getHost(), context.getPort(),
context.getAuthority(), context.getUserInfo(), context
@@ -291,7 +291,7 @@
if (strmHandler == null) {
throw new MalformedURLException(
org.apache.harmony.luni.util.Msg.getString(
- "K00b3", protocol));
+ "K00b3", protocol));
}
}
@@ -311,14 +311,14 @@
if (port < -1) {
throw new MalformedURLException(org.apache.harmony.luni.util.Msg
- .getString("K0325", port));
+ .getString("K0325", port));
}
}
/**
* Creates a new URL instance using the given arguments. The URL uses the
* default port for the specified protocol.
- *
+ *
* @param protocol
* the protocol of the new URL.
* @param host
@@ -337,7 +337,7 @@
/**
* Creates a new URL instance using the given arguments. The URL uses the
* specified port instead of the default port for the given protocol.
- *
+ *
* @param protocol
* the protocol of the new URL.
* @param host
@@ -382,15 +382,15 @@
public URL(String protocol, String host, int port, String file,
URLStreamHandler handler) throws MalformedURLException {
if (port < -1) {
- throw new MalformedURLException(Msg.getString("K0325", port));
+ throw new MalformedURLException(Msg.getString("K0325", port));
}
- if (host != null && host.indexOf(":") != -1 && host.charAt(0) != '[') {
- host = "[" + host + "]";
+ if (host != null && host.indexOf(":") != -1 && host.charAt(0) != '[') {
+ host = "[" + host + "]";
}
if (protocol == null) {
- throw new NullPointerException(Msg.getString("K00b3", "null"));
+ throw new NullPointerException(Msg.getString("K00b3", "null"));
}
this.protocol = protocol;
@@ -400,7 +400,7 @@
// Set the fields from the arguments. Handle the case where the
// passed in "file" includes both a file and a reference part.
int index = -1;
- index = file.indexOf("#", file.lastIndexOf("/"));
+ index = file.indexOf("#", file.lastIndexOf("/"));
if (index >= 0) {
this.file = file.substring(0, index);
ref = file.substring(index + 1);
@@ -416,7 +416,7 @@
setupStreamHandler();
if (strmHandler == null) {
throw new MalformedURLException(
- Msg.getString("K00b3", protocol));
+ Msg.getString("K00b3", protocol));
}
} else {
SecurityManager sm = System.getSecurityManager();
@@ -432,7 +432,7 @@
if (host != null && host.length() > 0) {
authority = host;
if (port != -1) {
- authority = authority + ":" + port;
+ authority = authority + ":" + port;
}
}
if (fixHost) {
@@ -456,7 +456,7 @@
* Sets the properties of this URL using the provided arguments. Only a
* {@code URLStreamHandler} can use this method to set fields of the
* existing URL instance. A URL is generally constant.
- *
+ *
* @param protocol
* the protocol to be set.
* @param host
@@ -488,7 +488,7 @@
* receiver, and returns true if they represent the same URL. Two URLs are
* equal if they have the same file, host, port, protocol, and reference
* components.
- *
+ *
* @param o
* the URL this instance has to be compared with.
* @return {@code true} if both instances represents the same URL, {@code
@@ -513,7 +513,7 @@
* Returns whether this URL refers to the same resource as the given
* argument {@code otherURL}. All URL components except the reference field
* are compared.
- *
+ *
* @param otherURL
* the URL to compare against.
* @return {@code true} if both instances refer to the same resource,
@@ -525,7 +525,7 @@
/**
* Gets the hashcode value of this URL instance.
- *
+ *
* @return the appropriate hashcode value.
*/
@Override
@@ -567,11 +567,11 @@
// If so, then walk this list looking for an applicable one.
String packageList = AccessController
.doPrivileged(new PriviAction<String>(
- "java.protocol.handler.pkgs"));
+ "java.protocol.handler.pkgs"));
if (packageList != null) {
- StringTokenizer st = new StringTokenizer(packageList, "|");
+ StringTokenizer st = new StringTokenizer(packageList, "|");
while (st.hasMoreTokens()) {
- String className = st.nextToken() + "." + protocol + ".Handler";
+ String className = st.nextToken() + "." + protocol + ".Handler";
try {
strmHandler = (URLStreamHandler) Class.forName(className,
@@ -590,8 +590,8 @@
// No one else has provided a handler, so try our internal one.
- String className = "org.apache.harmony.luni.internal.net.www.protocol." + protocol
- + ".Handler";
+ String className = "org.apache.harmony.luni.internal.net.www.protocol." + protocol
+ + ".Handler";
try {
strmHandler = (URLStreamHandler) Class.forName(className)
.newInstance();
@@ -612,7 +612,7 @@
* <li>Image for pictures</li>
* <li>AudioClip for audio sequences</li>
* <li>{@link InputStream} for all other data</li>
- *
+ *
* @return the content of the referred resource.
* @throws IOException
* if an error occurs obtaining the content.
@@ -627,7 +627,7 @@
* {@code null} will be returned if the obtained object type does not match
* with one from this list. Otherwise the first type that matches will be
* used.
- *
+ *
* @param types
* the list of allowed or expected object types.
* @return the object representing the resource referred by this URL,
@@ -644,7 +644,7 @@
/**
* Opens an InputStream to read the resource referred by this URL.
- *
+ *
* @return the stream which allows to read the resource.
* @throws IOException
* if an error occurs while opening the InputStream.
@@ -656,7 +656,7 @@
/**
* Opens a connection to the remote resource specified by this URL. This
* connection allows bidirectional data transfer.
- *
+ *
* @return the connection to this URL.
* @throws IOException
* if an error occurs while opening the connection.
@@ -667,7 +667,7 @@
/**
* Converts this URL instance into an equivalent URI object.
- *
+ *
* @return the URI instance that represents this URL.
* @throws URISyntaxException
* if this URL cannot be converted into a URI.
@@ -680,7 +680,7 @@
* Opens a connection to the remote resource specified by this URL. The
* connection will be established through the given proxy and allows
* bidirectional data transfer.
- *
+ *
* @param proxy
* the proxy through which the connection will be established.
* @return the appropriate URLconnection instance representing the
@@ -699,7 +699,7 @@
public URLConnection openConnection(Proxy proxy) throws IOException {
if (proxy == null) {
// K034c=proxy should not be null
- throw new IllegalArgumentException(Msg.getString("K034c"));
+ throw new IllegalArgumentException(Msg.getString("K034c"));
}
SecurityManager sm = System.getSecurityManager();
@@ -717,7 +717,7 @@
* Returns a string containing a concise, human-readable representation of
* this URL. The returned string is the same as the result of the method
* {@code toExternalForm()}.
- *
+ *
* @return the string representation of this URL.
*/
@Override
@@ -728,12 +728,12 @@
/**
* Returns a string containing a concise, human-readable representation of
* this URL.
- *
+ *
* @return the string representation of this URL.
*/
public String toExternalForm() {
if (strmHandler == null) {
- return "unknown protocol(" + protocol + ")://" + host + file;
+ return "unknown protocol(" + protocol + ")://" + host + file;
}
return strmHandler.toExternalForm(this);
}
@@ -741,10 +741,10 @@
/**
* This method is called to restore the state of a URL object that has been
* serialized. The stream handler is determined from the URL's protocol.
- *
+ *
* @param stream
* the stream to read from.
- *
+ *
* @throws IOException
* if an IO Exception occurs while reading the stream or the
* handler can not be found.
@@ -769,7 +769,7 @@
}
setupStreamHandler();
if (strmHandler == null) {
- throw new IOException(Msg.getString("K00b3", protocol));
+ throw new IOException(Msg.getString("K00b3", protocol));
}
} catch (ClassNotFoundException e) {
throw new IOException(e.toString());
@@ -794,7 +794,7 @@
/**
* Gets the value of the file part of this URL.
- *
+ *
* @return the file name this URL refers to or an empty string if the file
* part is not set.
*/
@@ -804,7 +804,7 @@
/**
* Gets the value of the host part of this URL.
- *
+ *
* @return the host name or IP address of this URL.
*/
public String getHost() {
@@ -813,7 +813,7 @@
/**
* Gets the port number of this URL or {@code -1} if the port is not set.
- *
+ *
* @return the port number of this URL.
*/
public int getPort() {
@@ -822,7 +822,7 @@
/**
* Gets the protocol of this URL.
- *
+ *
* @return the protocol type of this URL.
*/
public String getProtocol() {
@@ -831,7 +831,7 @@
/**
* Gets the value of the reference part of this URL.
- *
+ *
* @return the reference part of this URL.
*/
public String getRef() {
@@ -840,7 +840,7 @@
/**
* Gets the value of the query part of this URL.
- *
+ *
* @return the query part of this URL.
*/
public String getQuery() {
@@ -849,7 +849,7 @@
/**
* Gets the value of the path part of this URL.
- *
+ *
* @return the path part of this URL.
*/
public String getPath() {
@@ -858,7 +858,7 @@
/**
* Gets the value of the user-info part of this URL.
- *
+ *
* @return the user-info part of this URL.
*/
public String getUserInfo() {
@@ -867,7 +867,7 @@
/**
* Gets the value of the authority part of this URL.
- *
+ *
* @return the authority part of this URL.
*/
public String getAuthority() {
@@ -878,7 +878,7 @@
* Sets the properties of this URL using the provided arguments. Only a
* {@code URLStreamHandler} can use this method to set fields of the
* existing URL instance. A URL is generally constant.
- *
+ *
* @param protocol
* the protocol to be set.
* @param host
@@ -900,11 +900,11 @@
String authority, String userInfo, String path, String query,
String ref) {
String filePart = path;
- if (query != null && !query.equals("")) {
+ if (query != null && !query.equals("")) {
if (filePart != null) {
- filePart = filePart + "?" + query;
+ filePart = filePart + "?" + query;
} else {
- filePart = "?" + query;
+ filePart = "?" + query;
}
}
set(protocol, host, port, filePart, ref);
diff --git a/luni/src/main/java/java/net/URLClassLoader.java b/luni/src/main/java/java/net/URLClassLoader.java
index 6839e61..fdc4aef 100644
--- a/luni/src/main/java/java/net/URLClassLoader.java
+++ b/luni/src/main/java/java/net/URLClassLoader.java
@@ -123,8 +123,8 @@
try {
// Add mappings from resource to jar file
String parentURLString = getParentURL(url).toExternalForm();
- String prefix = "jar:"
- + parentURLString + "/";
+ String prefix = "jar:"
+ + parentURLString + "/";
is = jf.getInputStream(indexEntry);
in = new BufferedReader(new InputStreamReader(is, "UTF8"));
HashMap<String, ArrayList<URL>> pre_map = new HashMap<String, ArrayList<URL>>();
@@ -137,7 +137,7 @@
if (line == null) {
break;
}
- URL jar = new URL(prefix + line + "!/");
+ URL jar = new URL(prefix + line + "!/");
while (true) {
line = in.readLine();
if (line == null) {
@@ -187,7 +187,7 @@
String parentFile = new File(file).getParent();
parentFile = parentFile.replace(File.separatorChar, '/');
if (parentFile.charAt(0) != '/') {
- parentFile = "/" + parentFile;
+ parentFile = "/" + parentFile;
}
URL parentURL = new URL(fileURL.getProtocol(), fileURL
.getHost(), fileURL.getPort(), parentFile);
@@ -256,7 +256,7 @@
} else {
if (packageObj.isSealed()) {
throw new SecurityException(Msg
- .getString("K004c"));
+ .getString("K004c"));
}
}
}
@@ -271,7 +271,7 @@
uc.getInputStream().close();
// HTTP can return a stream on a non-existent file
// So check for the return code;
- if (!resURL.getProtocol().equals("http")) {
+ if (!resURL.getProtocol().equals("http")) {
return resURL;
}
int code;
@@ -315,7 +315,7 @@
this.jf = jf;
this.prefixName = prefixName;
this.codeSourceUrl = jarURL;
- final JarEntry je = jf.getJarEntry("META-INF/INDEX.LIST");
+ final JarEntry je = jf.getJarEntry("META-INF/INDEX.LIST");
this.index = (je == null ? null : IndexFile.readIndexFile(jf, je, url));
}
@@ -338,7 +338,7 @@
resources.add(res);
}
if (index != null) {
- int pos = name.lastIndexOf("/");
+ int pos = name.lastIndexOf("/");
// only keep the directory part of the resource
// as index.list only keeps track of directories and root files
String indexedName = (pos > 0) ? name.substring(0, pos) : name;
@@ -432,7 +432,7 @@
}
if (exception) {
throw new SecurityException(Msg
- .getString("K0352", packageName));
+ .getString("K0352", packageName));
}
}
}
@@ -455,7 +455,7 @@
return res;
}
if (index != null) {
- int pos = name.lastIndexOf("/");
+ int pos = name.lastIndexOf("/");
// only keep the directory part of the resource
// as index.list only keeps track of directories and root files
String indexedName = (pos > 0) ? name.substring(0, pos) : name;
@@ -482,9 +482,9 @@
return sub;
}
String protocol = url.getProtocol();
- if (protocol.equals("jar")) {
+ if (protocol.equals("jar")) {
sub = createURLJarHandler(url);
- } else if (protocol.equals("file")) {
+ } else if (protocol.equals("file")) {
sub = createURLSubJarHandler(url);
} else {
sub = createURLHandler(url);
@@ -498,10 +498,10 @@
private URLHandler createURLSubJarHandler(URL url) {
String prefixName;
String file = url.getFile();
- if (url.getFile().endsWith("!/")) {
+ if (url.getFile().endsWith("!/")) {
prefixName = "";
} else {
- int sepIdx = file.lastIndexOf("!/");
+ int sepIdx = file.lastIndexOf("!/");
if (sepIdx == -1) {
// Invalid URL, don't look here again
return null;
@@ -513,8 +513,8 @@
URL jarURL = ((JarURLConnection) url
.openConnection()).getJarFileURL();
JarURLConnection juc = (JarURLConnection) new URL(
- "jar", "",
- jarURL.toExternalForm() + "!/").openConnection();
+ "jar", "",
+ jarURL.toExternalForm() + "!/").openConnection();
JarFile jf = juc.getJarFile();
URLJarHandler jarH = new URLJarHandler(url, jarURL, jf, prefixName, null);
// TODO : to think what we should do with indexes & manifest.class file here
@@ -540,7 +540,7 @@
StringBuilder buf = new StringBuilder(2 + hostLength
+ baseFile.length());
if (hostLength > 0) {
- buf.append("//").append(host);
+ buf.append("//").append(host);
}
// baseFile always ends with '/'
buf.append(baseFile);
@@ -551,7 +551,7 @@
Class<?> findClass(String packageName, String name, String origName) {
String filename = prefix + name;
try {
- filename = URLDecoder.decode(filename, "UTF-8");
+ filename = URLDecoder.decode(filename, "UTF-8");
} catch (IllegalArgumentException e) {
return null;
} catch (UnsupportedEncodingException e) {
@@ -585,7 +585,7 @@
}
try {
- filename = URLDecoder.decode(prefix, "UTF-8") + name;
+ filename = URLDecoder.decode(prefix, "UTF-8") + name;
if (new File(filename).exists()) {
return targetURL(url, name);
@@ -739,7 +739,7 @@
protected PermissionCollection getPermissions(final CodeSource codesource) {
PermissionCollection pc = super.getPermissions(codesource);
URL u = codesource.getLocation();
- if (u.getProtocol().equals("jar")) {
+ if (u.getProtocol().equals("jar")) {
try {
// Create a URL for the resource the jar refers to
u = ((JarURLConnection) u.openConnection()).getJarFileURL();
@@ -748,27 +748,27 @@
// URL
}
}
- if (u.getProtocol().equals("file")) {
+ if (u.getProtocol().equals("file")) {
String path = u.getFile();
String host = u.getHost();
if (host != null && host.length() > 0) {
- path = "//" + host + path;
+ path = "//" + host + path;
}
if (File.separatorChar != '/') {
path = path.replace('/', File.separatorChar);
}
if (isDirectory(u)) {
- pc.add(new FilePermission(path + "-", "read"));
+ pc.add(new FilePermission(path + "-", "read"));
} else {
- pc.add(new FilePermission(path, "read"));
+ pc.add(new FilePermission(path, "read"));
}
} else {
String host = u.getHost();
if (host.length() == 0) {
- host = "localhost";
+ host = "localhost";
}
- pc.add(new SocketPermission(host, "connect, accept"));
+ pc.add(new SocketPermission(host, "connect, accept"));
}
return pc;
}
@@ -921,16 +921,16 @@
String protocol = url.getProtocol();
- if (isDirectory(url) || protocol.equals("jar")) {
+ if (isDirectory(url) || protocol.equals("jar")) {
return url;
}
if (factory == null) {
- return new URL("jar", "",
- -1, url.toString() + "!/");
+ return new URL("jar", "",
+ -1, url.toString() + "!/");
}
// use jar protocol as the stream handler protocol
- return new URL("jar", "",
- -1, url.toString() + "!/",
+ return new URL("jar", "",
+ -1, url.toString() + "!/",
factory.createURLStreamHandler("jar"));
}
@@ -1003,14 +1003,14 @@
while (!searchList.isEmpty()) {
URL nextCandidate = searchList.remove(0);
if (nextCandidate == null) { // KA024=One of urls is null
- throw new NullPointerException(Msg.getString("KA024"));
+ throw new NullPointerException(Msg.getString("KA024"));
}
if (!handlerMap.containsKey(nextCandidate)) {
URLHandler result;
String protocol = nextCandidate.getProtocol();
- if (protocol.equals("jar")) {
+ if (protocol.equals("jar")) {
result = createURLJarHandler(nextCandidate);
- } else if (protocol.equals("file")) {
+ } else if (protocol.equals("file")) {
result = createURLFileHandler(nextCandidate);
} else {
result = createURLHandler(nextCandidate);
@@ -1035,10 +1035,10 @@
private URLHandler createURLJarHandler(URL url) {
String prefixName;
String file = url.getFile();
- if (url.getFile().endsWith("!/")) {
+ if (url.getFile().endsWith("!/")) {
prefixName = "";
} else {
- int sepIdx = file.lastIndexOf("!/");
+ int sepIdx = file.lastIndexOf("!/");
if (sepIdx == -1) {
// Invalid URL, don't look here again
return null;
@@ -1050,8 +1050,8 @@
URL jarURL = ((JarURLConnection) url
.openConnection()).getJarFileURL();
JarURLConnection juc = (JarURLConnection) new URL(
- "jar", "",
- jarURL.toExternalForm() + "!/").openConnection();
+ "jar", "",
+ jarURL.toExternalForm() + "!/").openConnection();
JarFile jf = juc.getJarFile();
URLJarHandler jarH = new URLJarHandler(url, jarURL, jf, prefixName);
@@ -1092,7 +1092,7 @@
protected Package definePackage(String packageName, Manifest manifest,
URL url) throws IllegalArgumentException {
Attributes mainAttributes = manifest.getMainAttributes();
- String dirName = packageName.replace('.', '/') + "/";
+ String dirName = packageName.replace('.', '/') + "/";
Attributes packageAttributes = manifest.getAttributes(dirName);
boolean noEntry = false;
if (packageAttributes == null) {
@@ -1145,12 +1145,12 @@
private boolean isSealed(Manifest manifest, String dirName) {
Attributes mainAttributes = manifest.getMainAttributes();
String value = mainAttributes.getValue(Attributes.Name.SEALED);
- boolean sealed = value != null && value.toLowerCase().equals("true");
+ boolean sealed = value != null && value.toLowerCase().equals("true");
Attributes attributes = manifest.getAttributes(dirName);
if (attributes != null) {
value = attributes.getValue(Attributes.Name.SEALED);
if (value != null) {
- sealed = value.toLowerCase().equals("true");
+ sealed = value.toLowerCase().equals("true");
}
}
return sealed;
@@ -1170,16 +1170,16 @@
StringTokenizer tokenizer = new StringTokenizer(classpath);
ArrayList<URL> addedURLs = new ArrayList<URL>();
String file = root.getFile();
- int jarIndex = file.lastIndexOf("!/") - 1;
- int index = file.lastIndexOf("/", jarIndex) + 1;
+ int jarIndex = file.lastIndexOf("!/") - 1;
+ int index = file.lastIndexOf("/", jarIndex) + 1;
if (index == 0) {
index = file.lastIndexOf(
- System.getProperty("file.separator"), jarIndex) + 1;
+ System.getProperty("file.separator"), jarIndex) + 1;
}
file = file.substring(0, index);
while (tokenizer.hasMoreElements()) {
String element = tokenizer.nextToken();
- if (!element.equals("")) {
+ if (!element.equals("")) {
try {
// Take absolute path case into consideration
URL url = new URL(new URL(file), element);
@@ -1194,7 +1194,7 @@
Class<?> findClassImpl(String className) {
String partialName = className.replace('.', '/');
- final String classFileName = new StringBuilder(partialName).append(".class").toString();
+ final String classFileName = new StringBuilder(partialName).append(".class").toString();
String packageName = null;
int position = partialName.lastIndexOf('/');
if ((position = partialName.lastIndexOf('/')) != -1) {
diff --git a/luni/src/main/java/java/net/URLConnection.java b/luni/src/main/java/java/net/URLConnection.java
index cff97c2..d9ad528 100644
--- a/luni/src/main/java/java/net/URLConnection.java
+++ b/luni/src/main/java/java/net/URLConnection.java
@@ -209,7 +209,7 @@
* @return the value of the response header field {@code content-encoding}.
*/
public String getContentEncoding() {
- return getHeaderField("Content-Encoding");
+ return getHeaderField("Content-Encoding");
}
/**
@@ -240,12 +240,12 @@
// Type
String packageList = AccessController
.doPrivileged(new PriviAction<String>(
- "java.content.handler.pkgs"));
+ "java.content.handler.pkgs"));
if (packageList != null) {
- final StringTokenizer st = new StringTokenizer(packageList, "|");
+ final StringTokenizer st = new StringTokenizer(packageList, "|");
while (st.countTokens() > 0) {
try {
- Class<?> cl = Class.forName(st.nextToken() + "."
+ Class<?> cl = Class.forName(st.nextToken() + "."
+ typeString, true, ClassLoader
.getSystemClassLoader());
cHandler = cl.newInstance();
@@ -262,7 +262,7 @@
public Object run() {
try {
// Try looking up AWT image content handlers
- String className = "org.apache.harmony.awt.www.content."
+ String className = "org.apache.harmony.awt.www.content."
+ typeString;
return Class.forName(className).newInstance();
} catch (ClassNotFoundException e) {
@@ -292,7 +292,7 @@
* @return the value of the response header field {@code content-length}.
*/
public int getContentLength() {
- return getHeaderFieldInt("Content-Length", -1);
+ return getHeaderFieldInt("Content-Length", -1);
}
/**
@@ -302,7 +302,7 @@
* @return the value of the response header field {@code content-type}.
*/
public String getContentType() {
- return getHeaderField("Content-Type");
+ return getHeaderField("Content-Type");
}
/**
@@ -313,7 +313,7 @@
* @return the sending timestamp of the current response.
*/
public long getDate() {
- return getHeaderFieldDate("Date", 0);
+ return getHeaderFieldDate("Date", 0);
}
/**
@@ -383,7 +383,7 @@
* @return the value of the response header field {@code expires}.
*/
public long getExpiration() {
- return getHeaderFieldDate("Expires", 0);
+ return getHeaderFieldDate("Expires", 0);
}
/**
@@ -447,7 +447,7 @@
*/
public Map<String, List<String>> getRequestProperties() {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
return Collections.emptyMap();
}
@@ -468,10 +468,10 @@
*/
public void addRequestProperty(String field, String newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
if (field == null) {
- throw new NullPointerException(Msg.getString("KA007"));
+ throw new NullPointerException(Msg.getString("KA007"));
}
}
@@ -575,7 +575,7 @@
* if no InputStream could be created.
*/
public InputStream getInputStream() throws IOException {
- throw new UnknownServiceException(Msg.getString("K004d"));
+ throw new UnknownServiceException(Msg.getString("K004d"));
}
/**
@@ -588,7 +588,7 @@
if (lastModified != -1) {
return lastModified;
}
- return lastModified = getHeaderFieldDate("Last-Modified", 0);
+ return lastModified = getHeaderFieldDate("Last-Modified", 0);
}
/**
@@ -601,7 +601,7 @@
* if no OutputStream could be created.
*/
public OutputStream getOutputStream() throws IOException {
- throw new UnknownServiceException(Msg.getString("K005f"));
+ throw new UnknownServiceException(Msg.getString("K005f"));
}
/**
@@ -634,7 +634,7 @@
*/
public String getRequestProperty(String field) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
return null;
}
@@ -803,7 +803,7 @@
*/
public void setAllowUserInteraction(boolean newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
this.allowUserInteraction = newValue;
}
@@ -822,7 +822,7 @@
public static synchronized void setContentHandlerFactory(
ContentHandlerFactory contentFactory) {
if (contentHandlerFactory != null) {
- throw new Error(Msg.getString("K004e"));
+ throw new Error(Msg.getString("K004e"));
}
SecurityManager sManager = System.getSecurityManager();
if (sManager != null) {
@@ -874,7 +874,7 @@
// BEGIN android-removed
// Setting the default doesn't concern the current connection.
// if (connected) {
- // throw new IllegalAccessError(Msg.getString("K0037"));
+ // throw new IllegalAccessError(Msg.getString("K0037"));
// }
// END android-removed
defaultUseCaches = newValue;
@@ -893,7 +893,7 @@
*/
public void setDoInput(boolean newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
this.doInput = newValue;
}
@@ -911,7 +911,7 @@
*/
public void setDoOutput(boolean newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
this.doOutput = newValue;
}
@@ -947,7 +947,7 @@
*/
public void setIfModifiedSince(long newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
this.ifModifiedSince = newValue;
}
@@ -968,10 +968,10 @@
*/
public void setRequestProperty(String field, String newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
if (field == null) {
- throw new NullPointerException(Msg.getString("KA007"));
+ throw new NullPointerException(Msg.getString("KA007"));
}
}
@@ -989,7 +989,7 @@
*/
public void setUseCaches(boolean newValue) {
if (connected) {
- throw new IllegalStateException(Msg.getString("K0037"));
+ throw new IllegalStateException(Msg.getString("K0037"));
}
this.useCaches = newValue;
}
@@ -1008,7 +1008,7 @@
*/
public void setConnectTimeout(int timeout) {
if (0 > timeout) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
this.connectTimeout = timeout;
}
@@ -1036,7 +1036,7 @@
*/
public void setReadTimeout(int timeout) {
if (0 > timeout) {
- throw new IllegalArgumentException(Msg.getString("K0036"));
+ throw new IllegalArgumentException(Msg.getString("K0036"));
}
this.readTimeout = timeout;
}
diff --git a/luni/src/main/java/java/net/URLDecoder.java b/luni/src/main/java/java/net/URLDecoder.java
index 419a720..2b78268 100644
--- a/luni/src/main/java/java/net/URLDecoder.java
+++ b/luni/src/main/java/java/net/URLDecoder.java
@@ -54,7 +54,7 @@
if (defaultCharset == null) {
try {
defaultCharset = Charset.forName(
- System.getProperty("file.encoding"));
+ System.getProperty("file.encoding"));
} catch (IllegalCharsetNameException e) {
// Ignored
} catch (UnsupportedCharsetException e) {
@@ -62,7 +62,7 @@
}
if (defaultCharset == null) {
- defaultCharset = Charset.forName("ISO-8859-1");
+ defaultCharset = Charset.forName("ISO-8859-1");
}
}
return decode(s, defaultCharset);
@@ -97,7 +97,7 @@
if (enc.length() == 0) {
throw new UnsupportedEncodingException(
// K00a5=Invalid parameter - {0}
- Msg.getString("K00a5", "enc"));
+ Msg.getString("K00a5", "enc"));
}
if (s.indexOf('%') == -1) {
@@ -142,7 +142,7 @@
if (i + 2 >= s.length()) {
throw new IllegalArgumentException(
// K01fe=Incomplete % sequence at\: {0}
- Msg.getString("K01fe", i));
+ Msg.getString("K01fe", i));
}
int d1 = Character.digit(s.charAt(i + 1), 16);
int d2 = Character.digit(s.charAt(i + 2), 16);
@@ -150,7 +150,7 @@
throw new IllegalArgumentException(
// K01ff=Invalid % sequence ({0}) at\: {1}
Msg.getString(
- "K01ff",
+ "K01ff",
s.substring(i, i + 3),
String.valueOf(i)));
}
diff --git a/luni/src/main/java/java/net/URLEncoder.java b/luni/src/main/java/java/net/URLEncoder.java
index 1cd75a3..2025898 100644
--- a/luni/src/main/java/java/net/URLEncoder.java
+++ b/luni/src/main/java/java/net/URLEncoder.java
@@ -25,7 +25,7 @@
*/
public class URLEncoder {
- static final String digits = "0123456789ABCDEF";
+ static final String digits = "0123456789ABCDEF";
/**
* Prevents this class from being instantiated.
@@ -54,7 +54,7 @@
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')
- || (ch >= '0' && ch <= '9') || ".-*_".indexOf(ch) > -1) {
+ || (ch >= '0' && ch <= '9') || ".-*_".indexOf(ch) > -1) {
buf.append(ch);
} else if (ch == ' ') {
buf.append('+');
@@ -94,7 +94,7 @@
throw new NullPointerException();
}
// check for UnsupportedEncodingException
- "".getBytes(enc);
+ "".getBytes(enc);
// Guess a bit bigger for encoded form
StringBuffer buf = new StringBuffer(s.length() + 16);
@@ -102,7 +102,7 @@
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')
- || (ch >= '0' && ch <= '9') || " .-*_".indexOf(ch) > -1) {
+ || (ch >= '0' && ch <= '9') || " .-*_".indexOf(ch) > -1) {
if (start >= 0) {
convert(s.substring(start, i), buf, enc);
start = -1;
diff --git a/luni/src/main/java/java/net/URLStreamHandler.java b/luni/src/main/java/java/net/URLStreamHandler.java
index 013ed2b..4f1085f 100644
--- a/luni/src/main/java/java/net/URLStreamHandler.java
+++ b/luni/src/main/java/java/net/URLStreamHandler.java
@@ -32,7 +32,7 @@
* Establishes a new connection to the resource specified by the URL {@code
* u}. Since different protocols also have unique ways of connecting, it
* must be overwritten by the subclass.
- *
+ *
* @param u
* the URL to the resource where a connection has to be opened.
* @return the opened URLConnection to the specified resource.
@@ -45,7 +45,7 @@
* Establishes a new connection to the resource specified by the URL {@code
* u} using the given {@code proxy}. Since different protocols also have
* unique ways of connecting, it must be overwritten by the subclass.
- *
+ *
* @param u
* the URL to the resource where a connection has to be opened.
* @param proxy
@@ -61,7 +61,7 @@
*/
protected URLConnection openConnection(URL u, Proxy proxy)
throws IOException {
- throw new UnsupportedOperationException(Msg.getString("K034d"));
+ throw new UnsupportedOperationException(Msg.getString("K034d"));
}
/**
@@ -72,7 +72,7 @@
* <p>
* The string is parsed in HTTP format. If the protocol has a different URL
* format this method must be overridden.
- *
+ *
* @param u
* the URL to fill in the parsed clear text URL parts.
* @param str
@@ -86,7 +86,7 @@
*/
protected void parseURL(URL u, String str, int start, int end) {
// For compatibility, refer to Harmony-2941
- if (str.startsWith("//", start)
+ if (str.startsWith("//", start)
&& str.indexOf('/', start + 2) == -1
&& end <= Integer.MIN_VALUE + 1) {
throw new StringIndexOutOfBoundsException(end - 2 - start);
@@ -97,7 +97,7 @@
}
return;
}
- String parseString = "";
+ String parseString = "";
if (start < end) {
parseString = str.substring(start, end);
}
@@ -114,7 +114,7 @@
String userInfo = u.getUserInfo();
int refIdx = parseString.indexOf('#', 0);
- if (parseString.startsWith("//")) {
+ if (parseString.startsWith("//")) {
int hostIdx = 2, portIdx = -1;
port = -1;
fileIdx = parseString.indexOf('/', hostIdx);
@@ -126,7 +126,7 @@
if (fileIdx == -1) {
fileIdx = end;
// Use default
- file = "";
+ file = "";
}
int hostEnd = fileIdx;
if (refIdx != -1 && refIdx < fileIdx) {
@@ -183,9 +183,9 @@
if (queryIdx > -1) {
query = parseString.substring(queryIdx + 1, fileEnd);
if (queryIdx == 0 && file != null) {
- if (file.equals("")) {
- file = "/";
- } else if (file.startsWith("/")) {
+ if (file.equals("")) {
+ file = "/";
+ } else if (file.startsWith("/")) {
canonicalize = true;
}
int last = file.lastIndexOf('/') + 1;
@@ -203,10 +203,10 @@
file = parseString.substring(fileIdx, fileEnd);
} else if (fileEnd > fileIdx) {
if (file == null) {
- file = "";
- } else if (file.equals("")) {
- file = "/";
- } else if (file.startsWith("/")) {
+ file = "";
+ } else if (file.equals("")) {
+ file = "/";
+ } else if (file.startsWith("/")) {
canonicalize = true;
}
int last = file.lastIndexOf('/') + 1;
@@ -219,11 +219,11 @@
}
}
if (file == null) {
- file = "";
+ file = "";
}
if (host == null) {
- host = "";
+ host = "";
}
if (canonicalize) {
@@ -238,7 +238,7 @@
/**
* Sets the fields of the URL {@code u} to the values of the supplied
* arguments.
- *
+ *
* @param u
* the non-null URL object to be set.
* @param protocol
@@ -266,7 +266,7 @@
/**
* Sets the fields of the URL {@code u} to the values of the supplied
* arguments.
- *
+ *
* @param u
* the non-null URL object to be set.
* @param protocol
@@ -297,7 +297,7 @@
/**
* Returns the clear text representation of a given URL using HTTP format.
- *
+ *
* @param url
* the URL object to be converted.
* @return the clear text representation of the specified URL.
@@ -310,7 +310,7 @@
answer.append(':');
String authority = url.getAuthority();
if (authority != null && authority.length() > 0) {
- answer.append("//");
+ answer.append("//");
answer.append(url.getAuthority());
}
@@ -330,7 +330,7 @@
* Compares two URL objects whether they represent the same URL. Two URLs
* are equal if they have the same file, host, port, protocol, query, and
* reference components.
- *
+ *
* @param url1
* the first URL to compare.
* @param url2
@@ -382,7 +382,7 @@
/**
* Returns the hashcode value for the given URL object.
- *
+ *
* @param url
* the URL to determine the hashcode.
* @return the hashcode of the given URL.
@@ -418,7 +418,7 @@
/**
* Compares two URL objects whether they refer to the same file. In the
* comparison included are the URL components protocol, host, port and file.
- *
+ *
* @param url1
* the first URL to be compared.
* @param url2
@@ -458,9 +458,9 @@
*/
private static String getHost(URL url) {
String host = url.getHost();
- if ("file".equals(url.getProtocol())
- && "".equals(host)) {
- host = "localhost";
+ if ("file".equals(url.getProtocol())
+ && "".equals(host)) {
+ host = "localhost";
}
return host;
}
diff --git a/luni/src/main/java/java/net/URLStreamHandlerFactory.java b/luni/src/main/java/java/net/URLStreamHandlerFactory.java
index 4e50792..ad8212a 100644
--- a/luni/src/main/java/java/net/URLStreamHandlerFactory.java
+++ b/luni/src/main/java/java/net/URLStreamHandlerFactory.java
@@ -26,7 +26,7 @@
/**
* Creates a new {@code URLStreamHandler} instance for the given {@code
* protocol}.
- *
+ *
* @param protocol
* the protocol for which a handler is needed.
* @return the created handler.
diff --git a/luni/src/main/java/java/net/UnknownHostException.java b/luni/src/main/java/java/net/UnknownHostException.java
index db05558..325d36d 100644
--- a/luni/src/main/java/java/net/UnknownHostException.java
+++ b/luni/src/main/java/java/net/UnknownHostException.java
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code UnknownHostException} instance with its walkback
* and message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/net/UnknownServiceException.java b/luni/src/main/java/java/net/UnknownServiceException.java
index 6ad2a19..c67c178 100644
--- a/luni/src/main/java/java/net/UnknownServiceException.java
+++ b/luni/src/main/java/java/net/UnknownServiceException.java
@@ -40,7 +40,7 @@
/**
* Constructs a new {@code UnknownServiceException} instance with its
* walkback and message filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/nio/BaseByteBuffer.java b/luni/src/main/java/java/nio/BaseByteBuffer.java
index a4acc08..ba086a8 100644
--- a/luni/src/main/java/java/nio/BaseByteBuffer.java
+++ b/luni/src/main/java/java/nio/BaseByteBuffer.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/Buffer.java b/luni/src/main/java/java/nio/Buffer.java
index 02e3a14..8c423a3 100644
--- a/luni/src/main/java/java/nio/Buffer.java
+++ b/luni/src/main/java/java/nio/Buffer.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -97,7 +97,7 @@
/**
* Construct a buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of this buffer
*/
@@ -149,7 +149,7 @@
/**
* Returns the capacity of this buffer.
- *
+ *
* @return the number of elements that are contained in this buffer.
*/
public final int capacity() {
@@ -203,7 +203,7 @@
/**
* Indicates if there are elements remaining in this buffer, that is if
* {@code position < limit}.
- *
+ *
* @return {@code true} if there are elements remaining in this buffer,
* {@code false} otherwise.
*/
@@ -220,7 +220,7 @@
/**
* Indicates whether this buffer is read-only.
- *
+ *
* @return {@code true} if this buffer is read-only, {@code false}
* otherwise.
*/
@@ -228,7 +228,7 @@
/**
* Returns the limit of this buffer.
- *
+ *
* @return the limit of this buffer.
*/
public final int limit() {
@@ -268,7 +268,7 @@
/**
* Marks the current position, so that the position may return to this point
* later by calling <code>reset()</code>.
- *
+ *
* @return this buffer.
*/
public final Buffer mark() {
@@ -278,7 +278,7 @@
/**
* Returns the position of this buffer.
- *
+ *
* @return the value of this buffer's current position.
*/
public final int position() {
@@ -313,7 +313,7 @@
/**
* Returns the number of remaining elements in this buffer, that is
* {@code limit - position}.
- *
+ *
* @return the number of remaining elements in this buffer.
*/
public final int remaining() {
@@ -322,7 +322,7 @@
/**
* Resets the position of this buffer to the <code>mark</code>.
- *
+ *
* @return this buffer.
* @exception InvalidMarkException
* if the mark is not set.
diff --git a/luni/src/main/java/java/nio/BufferFactory.java b/luni/src/main/java/java/nio/BufferFactory.java
index 94f23ed..3003bdf 100644
--- a/luni/src/main/java/java/nio/BufferFactory.java
+++ b/luni/src/main/java/java/nio/BufferFactory.java
@@ -29,7 +29,7 @@
/**
* Returns a new byte buffer based on the specified byte array.
- *
+ *
* @param array
* The byte array
* @return A new byte buffer based on the specified byte array.
@@ -40,7 +40,7 @@
/**
* Returns a new array based byte buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based byte buffer with the specified capacity.
@@ -51,7 +51,7 @@
/**
* Returns a new char buffer based on the specified char array.
- *
+ *
* @param array
* The char array
* @return A new char buffer based on the specified char array.
@@ -62,7 +62,7 @@
/**
* Returns a new readonly char buffer based on the specified char sequence.
- *
+ *
* @param chseq
* The char sequence
* @return A new readonly char buffer based on the specified char sequence.
@@ -73,7 +73,7 @@
/**
* Returns a new array based char buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based char buffer with the specified capacity.
@@ -84,7 +84,7 @@
/**
* Returns a new direct byte buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new direct byte buffer with the specified capacity.
@@ -95,7 +95,7 @@
/**
* Returns a new double buffer based on the specified double array.
- *
+ *
* @param array
* The double array
* @return A new double buffer based on the specified double array.
@@ -106,7 +106,7 @@
/**
* Returns a new array based double buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based double buffer with the specified capacity.
@@ -117,7 +117,7 @@
/**
* Returns a new float buffer based on the specified float array.
- *
+ *
* @param array
* The float array
* @return A new float buffer based on the specified float array.
@@ -128,7 +128,7 @@
/**
* Returns a new array based float buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based float buffer with the specified capacity.
@@ -139,7 +139,7 @@
/**
* Returns a new array based int buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based int buffer with the specified capacity.
@@ -150,7 +150,7 @@
/**
* Returns a new int buffer based on the specified int array.
- *
+ *
* @param array
* The int array
* @return A new int buffer based on the specified int array.
@@ -161,7 +161,7 @@
/**
* Returns a new array based long buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based long buffer with the specified capacity.
@@ -172,7 +172,7 @@
/**
* Returns a new long buffer based on the specified long array.
- *
+ *
* @param array
* The long array
* @return A new long buffer based on the specified long array.
@@ -183,7 +183,7 @@
/**
* Returns a new array based short buffer with the specified capacity.
- *
+ *
* @param capacity
* The capacity of the new buffer
* @return A new array based short buffer with the specified capacity.
@@ -194,7 +194,7 @@
/**
* Returns a new short buffer based on the specified short array.
- *
+ *
* @param array
* The short array
* @return A new short buffer based on the specified short array.
diff --git a/luni/src/main/java/java/nio/BufferOverflowException.java b/luni/src/main/java/java/nio/BufferOverflowException.java
index a1f7792..0a0bf23 100644
--- a/luni/src/main/java/java/nio/BufferOverflowException.java
+++ b/luni/src/main/java/java/nio/BufferOverflowException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/BufferUnderflowException.java b/luni/src/main/java/java/nio/BufferUnderflowException.java
index 14d413b..4665461 100644
--- a/luni/src/main/java/java/nio/BufferUnderflowException.java
+++ b/luni/src/main/java/java/nio/BufferUnderflowException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/ByteBuffer.java b/luni/src/main/java/java/nio/ByteBuffer.java
index 9afb129..4d0292e 100644
--- a/luni/src/main/java/java/nio/ByteBuffer.java
+++ b/luni/src/main/java/java/nio/ByteBuffer.java
@@ -38,7 +38,7 @@
/**
* Creates a byte buffer based on a newly allocated byte array.
- *
+ *
* @param capacity
* the capacity of the new buffer
* @return the created byte buffer.
@@ -54,7 +54,7 @@
/**
* Creates a direct byte buffer based on a newly allocated memory block.
- *
+ *
* @param capacity
* the capacity of the new buffer
* @return the created byte buffer.
@@ -120,7 +120,7 @@
/**
* Constructs a {@code ByteBuffer} with given capacity.
- *
+ *
* @param capacity
* the capacity of the buffer.
*/
@@ -131,7 +131,7 @@
/**
* Returns the byte array which this buffer is based on, if there is one.
- *
+ *
* @return the byte array which this buffer is based on.
* @exception ReadOnlyBufferException
* if this buffer is based on a read-only array.
@@ -294,7 +294,7 @@
/**
* Compares the remaining bytes of this buffer to another byte buffer's
* remaining bytes.
- *
+ *
* @param otherBuffer
* another byte buffer.
* @return a negative value if this is less than {@code other}; 0 if this
@@ -372,7 +372,7 @@
/**
* Returns the byte at the current position and increases the position by 1.
- *
+ *
* @return the byte at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -400,7 +400,7 @@
* Reads bytes from the current position into the specified byte array,
* starting at the specified offset, and increases the position by the
* number of bytes read.
- *
+ *
* @param dest
* the target byte array.
* @param off
@@ -432,7 +432,7 @@
/**
* Returns the byte at the specified index and does not change the position.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return the byte at the specified index.
@@ -459,7 +459,7 @@
* The 2 bytes starting from the specified index are composed into a char
* according to the current byte order and returned. The position is not
* changed.
- *
+ *
* @param index
* the index, must not be negative and equal or less than
* {@code limit - 2}.
@@ -655,7 +655,7 @@
/**
* Sets the byte order of this buffer.
- *
+ *
* @param byteOrder
* the byte order to set. If {@code null} then the order
* will be {@link ByteOrder#LITTLE_ENDIAN LITTLE_ENDIAN}.
@@ -674,21 +674,21 @@
/**
* Child class implements this method to realize {@code array()}.
- *
+ *
* @see #array()
*/
abstract byte[] protectedArray();
/**
* Child class implements this method to realize {@code arrayOffset()}.
- *
+ *
* @see #arrayOffset()
*/
abstract int protectedArrayOffset();
/**
* Child class implements this method to realize {@code hasArray()}.
- *
+ *
* @see #hasArray()
*/
abstract boolean protectedHasArray();
@@ -696,7 +696,7 @@
/**
* Writes the given byte to the current position and increases the position
* by 1.
- *
+ *
* @param b
* the byte to write.
* @return this buffer.
@@ -730,7 +730,7 @@
* Writes bytes in the given byte array, starting from the specified offset,
* to the current position and increases the position by the number of bytes
* written.
- *
+ *
* @param src
* the source byte array.
* @param off
@@ -766,7 +766,7 @@
* Writes all the remaining bytes of the {@code src} byte buffer to this
* buffer's current position, and increases both buffers' position by the
* number of bytes copied.
- *
+ *
* @param src
* the source byte buffer.
* @return this buffer.
@@ -794,7 +794,7 @@
/**
* Write a byte to the specified index of this buffer without changing the
* position.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param b
@@ -1036,18 +1036,18 @@
/**
* Returns a string representing the state of this byte buffer.
- *
+ *
* @return a string representing the state of this byte buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/ByteOrder.java b/luni/src/main/java/java/nio/ByteOrder.java
index 5eb794c..6ecacc2 100644
--- a/luni/src/main/java/java/nio/ByteOrder.java
+++ b/luni/src/main/java/java/nio/ByteOrder.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,12 +26,12 @@
/**
* This constant represents big endian.
*/
- public static final ByteOrder BIG_ENDIAN = new ByteOrder("BIG_ENDIAN");
+ public static final ByteOrder BIG_ENDIAN = new ByteOrder("BIG_ENDIAN");
/**
* This constant represents little endian.
*/
- public static final ByteOrder LITTLE_ENDIAN = new ByteOrder("LITTLE_ENDIAN");
+ public static final ByteOrder LITTLE_ENDIAN = new ByteOrder("LITTLE_ENDIAN");
private static final ByteOrder NATIVE_ORDER;
@@ -45,7 +45,7 @@
/**
* Returns the current platform byte order.
- *
+ *
* @return the byte order object, which is either LITTLE_ENDIAN or
* BIG_ENDIAN.
*/
@@ -62,7 +62,7 @@
/**
* Returns a string that describes this object.
- *
+ *
* @return "BIG_ENDIAN" for {@link #BIG_ENDIAN ByteOrder.BIG_ENDIAN}
* objects, "LITTLE_ENDIAN" for
* {@link #LITTLE_ENDIAN ByteOrder.LITTLE_ENDIAN} objects.
diff --git a/luni/src/main/java/java/nio/CharArrayBuffer.java b/luni/src/main/java/java/nio/CharArrayBuffer.java
index 0228eb7..4f451e4 100644
--- a/luni/src/main/java/java/nio/CharArrayBuffer.java
+++ b/luni/src/main/java/java/nio/CharArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class CharArrayBuffer extends CharBuffer {
diff --git a/luni/src/main/java/java/nio/CharBuffer.java b/luni/src/main/java/java/nio/CharBuffer.java
index f8cef65..8a150c7 100644
--- a/luni/src/main/java/java/nio/CharBuffer.java
+++ b/luni/src/main/java/java/nio/CharBuffer.java
@@ -39,7 +39,7 @@
/**
* Creates a char buffer based on a newly allocated char array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created char buffer.
@@ -147,7 +147,7 @@
/**
* Constructs a {@code CharBuffer} with given capacity.
- *
+ *
* @param capacity
* the capacity of the buffer.
*/
@@ -182,7 +182,7 @@
/**
* Returns the character located at the specified index in the buffer. The
* index value is referenced from the current buffer position.
- *
+ *
* @param index
* the index referenced from the current buffer position. It must
* not be less than zero but less than the value obtained from a
@@ -215,7 +215,7 @@
/**
* Compare the remaining chars of this buffer to another char
* buffer's remaining chars.
- *
+ *
* @param otherBuffer
* another char buffer.
* @return a negative value if this is less than {@code otherBuffer}; 0 if
@@ -293,7 +293,7 @@
/**
* Returns the char at the current position and increases the position by 1.
- *
+ *
* @return the char at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -321,7 +321,7 @@
* Reads chars from the current position into the specified char array,
* starting from the specified offset, and increases the position by the
* number of chars read.
- *
+ *
* @param dest
* the target char array.
* @param off
@@ -353,7 +353,7 @@
/**
* Returns a char at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return a char at the specified index.
@@ -396,7 +396,7 @@
/**
* Returns the number of remaining chars.
- *
+ *
* @return the number of remaining chars.
*/
public final int length() {
@@ -439,7 +439,7 @@
/**
* Writes the given char to the current position and increases the position
* by 1.
- *
+ *
* @param c
* the char to write.
* @return this buffer.
@@ -473,7 +473,7 @@
* Writes chars from the given char array, starting from the specified offset,
* to the current position and increases the position by the number of chars
* written.
- *
+ *
* @param src
* the source char array.
* @param off
@@ -509,7 +509,7 @@
* Writes all the remaining chars of the {@code src} char buffer to this
* buffer's current position, and increases both buffers' position by the
* number of chars copied.
- *
+ *
* @param src
* the source char buffer.
* @return this buffer.
@@ -538,7 +538,7 @@
/**
* Writes a char to the specified index of this buffer; the position is not
* changed.
- *
+ *
* @param index
* the index, must be no less than zero and less than the limit.
* @param c
@@ -573,7 +573,7 @@
/**
* Writes chars of the given string to the current position of this buffer,
* and increases the position by the number of chars written.
- *
+ *
* @param str
* the string to write.
* @param start
@@ -654,7 +654,7 @@
/**
* Returns a string representing the current remaining chars of this buffer.
- *
+ *
* @return a string representing the current remaining chars of this buffer.
*/
@Override
@@ -703,7 +703,7 @@
if (csq != null) {
return put(csq.toString());
}
- return put("null");
+ return put("null");
}
/**
@@ -728,7 +728,7 @@
*/
public CharBuffer append(CharSequence csq, int start, int end) {
if (csq == null) {
- csq = "null";
+ csq = "null";
}
CharSequence cs = csq.subSequence(start, end);
if (cs.length() > 0) {
diff --git a/luni/src/main/java/java/nio/CharSequenceAdapter.java b/luni/src/main/java/java/nio/CharSequenceAdapter.java
index 3f738b2..b004c7a 100644
--- a/luni/src/main/java/java/nio/CharSequenceAdapter.java
+++ b/luni/src/main/java/java/nio/CharSequenceAdapter.java
@@ -25,7 +25,7 @@
* <li>Char sequence based buffer is always readonly.</li>
* </ul>
* </p>
- *
+ *
*/
final class CharSequenceAdapter extends CharBuffer {
diff --git a/luni/src/main/java/java/nio/CharToByteBufferAdapter.java b/luni/src/main/java/java/nio/CharToByteBufferAdapter.java
index e92ea57..3ff9fa6 100644
--- a/luni/src/main/java/java/nio/CharToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/CharToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
* The adapter extends Buffer, thus has its own position and limit.</li>
* </ul>
* </p>
- *
+ *
*/
final class CharToByteBufferAdapter extends CharBuffer implements DirectBuffer {
diff --git a/luni/src/main/java/java/nio/DirectByteBuffer.java b/luni/src/main/java/java/nio/DirectByteBuffer.java
index f8b16e0..39199e8 100644
--- a/luni/src/main/java/java/nio/DirectByteBuffer.java
+++ b/luni/src/main/java/java/nio/DirectByteBuffer.java
@@ -31,7 +31,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class DirectByteBuffer extends BaseByteBuffer implements DirectBuffer {
@@ -85,9 +85,9 @@
/*
* Override ByteBuffer.get(byte[], int, int) to improve performance.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see java.nio.ByteBuffer#get(byte[], int, int)
*/
@Override
@@ -252,7 +252,7 @@
* #free() method on this instance -- generally applications will rely on
* the garbage collector to autofree this memory.
* </p>
- *
+ *
* @return the effective address of the start of the buffer.
* @throws IllegalStateException
* if this buffer address is known to have been freed
diff --git a/luni/src/main/java/java/nio/DirectByteBuffers.java b/luni/src/main/java/java/nio/DirectByteBuffers.java
index 77b6ebd..84a51ac 100644
--- a/luni/src/main/java/java/nio/DirectByteBuffers.java
+++ b/luni/src/main/java/java/nio/DirectByteBuffers.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
/**
* Helper class for operations on direct ByteBuffer
- *
+ *
* @see java.nio.ByteBuffer
*/
class DirectByteBuffers {
diff --git a/luni/src/main/java/java/nio/DoubleArrayBuffer.java b/luni/src/main/java/java/nio/DoubleArrayBuffer.java
index ce1e3a6..5bb324b 100644
--- a/luni/src/main/java/java/nio/DoubleArrayBuffer.java
+++ b/luni/src/main/java/java/nio/DoubleArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class DoubleArrayBuffer extends DoubleBuffer {
diff --git a/luni/src/main/java/java/nio/DoubleBuffer.java b/luni/src/main/java/java/nio/DoubleBuffer.java
index 89b422b..7391d31 100644
--- a/luni/src/main/java/java/nio/DoubleBuffer.java
+++ b/luni/src/main/java/java/nio/DoubleBuffer.java
@@ -36,7 +36,7 @@
/**
* Creates a double buffer based on a newly allocated double array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created double buffer.
@@ -97,7 +97,7 @@
/**
* Constructs a {@code DoubleBuffer} with given capacity.
- *
+ *
* @param capacity
* the capacity of the buffer.
*/
@@ -145,7 +145,7 @@
/**
* Compare the remaining doubles of this buffer to another double buffer's
* remaining doubles.
- *
+ *
* @param otherBuffer
* another double buffer.
* @return a negative value if this is less than {@code other}; 0 if this
@@ -193,15 +193,15 @@
/**
* Checks whether this double buffer is equal to another object. If {@code
* other} is not a {@code DoubleBuffer} then {@code false} is returned.
- *
+ *
* <p>Two double buffers are equal if their remaining doubles are equal.
* Position, limit, capacity and mark are not considered.
- *
+ *
* <p>This method considers two doubles {@code a} and {@code b} to be equal
* if {@code a == b} or if {@code a} and {@code b} are both {@code NaN}.
* Unlike {@link Double#equals}, this method considers {@code -0.0} and
* {@code +0.0} to be equal.
- *
+ *
* @param other
* the object to compare with this double buffer.
* @return {@code true} if this double buffer is equal to {@code other},
@@ -233,7 +233,7 @@
/**
* Returns the double at the current position and increases the position by
* 1.
- *
+ *
* @return the double at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -261,7 +261,7 @@
* Reads doubles from the current position into the specified double array,
* starting from the specified offset, and increases the position by the
* number of doubles read.
- *
+ *
* @param dest
* the target double array.
* @param off
@@ -293,7 +293,7 @@
/**
* Returns a double at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return a double at the specified index.
@@ -331,7 +331,7 @@
* <p>
* A double buffer is direct if it is based on a byte buffer and the byte
* buffer is direct.
- *
+ *
* @return {@code true} if this buffer is direct, {@code false} otherwise.
*/
public abstract boolean isDirect();
@@ -372,7 +372,7 @@
/**
* Writes the given double to the current position and increases the
* position by 1.
- *
+ *
* @param d
* the double to write.
* @return this buffer.
@@ -406,7 +406,7 @@
* Writes doubles from the given double array, starting from the specified
* offset, to the current position and increases the position by the number
* of doubles written.
- *
+ *
* @param src
* the source double array.
* @param off
@@ -442,7 +442,7 @@
* Writes all the remaining doubles of the {@code src} double buffer to this
* buffer's current position, and increases both buffers' position by the
* number of doubles copied.
- *
+ *
* @param src
* the source double buffer.
* @return this buffer.
@@ -470,7 +470,7 @@
/**
* Write a double to the specified index of this buffer and the position is
* not changed.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param d
@@ -502,18 +502,18 @@
/**
* Returns a string representing the state of this double buffer.
- *
+ *
* @return A string representing the state of this double buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/DoubleToByteBufferAdapter.java b/luni/src/main/java/java/nio/DoubleToByteBufferAdapter.java
index da53bdc..e2271fa 100644
--- a/luni/src/main/java/java/nio/DoubleToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/DoubleToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
* The adapter extends Buffer, thus has its own position and limit.</li>
* </ul>
* </p>
- *
+ *
*/
final class DoubleToByteBufferAdapter extends DoubleBuffer implements
DirectBuffer {
diff --git a/luni/src/main/java/java/nio/FloatArrayBuffer.java b/luni/src/main/java/java/nio/FloatArrayBuffer.java
index 0dcc89c..f7dc329 100644
--- a/luni/src/main/java/java/nio/FloatArrayBuffer.java
+++ b/luni/src/main/java/java/nio/FloatArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class FloatArrayBuffer extends FloatBuffer {
diff --git a/luni/src/main/java/java/nio/FloatBuffer.java b/luni/src/main/java/java/nio/FloatBuffer.java
index 6ab7699..b14c992 100644
--- a/luni/src/main/java/java/nio/FloatBuffer.java
+++ b/luni/src/main/java/java/nio/FloatBuffer.java
@@ -35,7 +35,7 @@
/**
* Creates a float buffer based on a newly allocated float array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created float buffer.
@@ -147,7 +147,7 @@
/**
* Compare the remaining floats of this buffer to another float buffer's
* remaining floats.
- *
+ *
* @param otherBuffer
* another float buffer.
* @return a negative value if this is less than {@code otherBuffer}; 0 if
@@ -195,15 +195,15 @@
/**
* Checks whether this float buffer is equal to another object. If {@code
* other} is not a {@code FloatBuffer} then {@code false} is returned.
- *
+ *
* <p>Two float buffers are equal if their remaining floats are equal.
* Position, limit, capacity and mark are not considered.
- *
+ *
* <p>This method considers two floats {@code a} and {@code b} to be equal
* if {@code a == b} or if {@code a} and {@code b} are both {@code NaN}.
* Unlike {@link Float#equals}, this method considers {@code -0.0} and
* {@code +0.0} to be equal.
- *
+ *
* @param other
* the object to compare with this float buffer.
* @return {@code true} if this float buffer is equal to {@code other},
@@ -235,7 +235,7 @@
/**
* Returns the float at the current position and increases the position by
* 1.
- *
+ *
* @return the float at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -263,7 +263,7 @@
* Reads floats from the current position into the specified float array,
* starting from the specified offset, and increases the position by the
* number of floats read.
- *
+ *
* @param dest
* the target float array.
* @param off
@@ -295,7 +295,7 @@
/**
* Returns a float at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return a float at the specified index.
@@ -372,7 +372,7 @@
/**
* Writes the given float to the current position and increases the position
* by 1.
- *
+ *
* @param f
* the float to write.
* @return this buffer.
@@ -406,7 +406,7 @@
* Writes floats from the given float array, starting from the specified
* offset, to the current position and increases the position by the number
* of floats written.
- *
+ *
* @param src
* the source float array.
* @param off
@@ -442,7 +442,7 @@
* Writes all the remaining floats of the {@code src} float buffer to this
* buffer's current position, and increases both buffers' position by the
* number of floats copied.
- *
+ *
* @param src
* the source float buffer.
* @return this buffer.
@@ -470,7 +470,7 @@
/**
* Writes a float to the specified index of this buffer; the position is not
* changed.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param f
@@ -495,25 +495,25 @@
* The new buffer shares its content with this buffer, which means either
* buffer's change of content will be visible to the other. The two buffer's
* position, limit and mark are independent.
- *
+ *
* @return a sliced buffer that shares its content with this buffer.
*/
public abstract FloatBuffer slice();
/**
* Returns a string representing the state of this float buffer.
- *
+ *
* @return a string representing the state of this float buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/FloatToByteBufferAdapter.java b/luni/src/main/java/java/nio/FloatToByteBufferAdapter.java
index d91ad0d..acfcf26 100644
--- a/luni/src/main/java/java/nio/FloatToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/FloatToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
* The adapter extends Buffer, thus has its own position and limit.</li>
* </ul>
* </p>
- *
+ *
*/
final class FloatToByteBufferAdapter extends FloatBuffer implements
DirectBuffer {
diff --git a/luni/src/main/java/java/nio/HeapByteBuffer.java b/luni/src/main/java/java/nio/HeapByteBuffer.java
index a87d5b3..147f6d8 100644
--- a/luni/src/main/java/java/nio/HeapByteBuffer.java
+++ b/luni/src/main/java/java/nio/HeapByteBuffer.java
@@ -29,7 +29,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class HeapByteBuffer extends BaseByteBuffer {
@@ -57,9 +57,9 @@
/*
* Override ByteBuffer.get(byte[], int, int) to improve performance.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see java.nio.ByteBuffer#get(byte[], int, int)
*/
@Override
diff --git a/luni/src/main/java/java/nio/IntArrayBuffer.java b/luni/src/main/java/java/nio/IntArrayBuffer.java
index 0352a0f..88feda7 100644
--- a/luni/src/main/java/java/nio/IntArrayBuffer.java
+++ b/luni/src/main/java/java/nio/IntArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class IntArrayBuffer extends IntBuffer {
diff --git a/luni/src/main/java/java/nio/IntBuffer.java b/luni/src/main/java/java/nio/IntBuffer.java
index b0ebb88..7d0e5b0 100644
--- a/luni/src/main/java/java/nio/IntBuffer.java
+++ b/luni/src/main/java/java/nio/IntBuffer.java
@@ -33,7 +33,7 @@
/**
* Creates an int buffer based on a newly allocated int array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created int buffer.
@@ -144,7 +144,7 @@
/**
* Compares the remaining ints of this buffer to another int buffer's
* remaining ints.
- *
+ *
* @param otherBuffer
* another int buffer.
* @return a negative value if this is less than {@code other}; 0 if this
@@ -224,7 +224,7 @@
/**
* Returns the int at the current position and increases the position by 1.
- *
+ *
* @return the int at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -252,7 +252,7 @@
* Reads ints from the current position into the specified int array,
* starting from the specified offset, and increases the position by the
* number of ints read.
- *
+ *
* @param dest
* the target int array.
* @param off
@@ -283,7 +283,7 @@
/**
* Returns an int at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return an int at the specified index.
@@ -360,7 +360,7 @@
/**
* Writes the given int to the current position and increases the position
* by 1.
- *
+ *
* @param i
* the int to write.
* @return this buffer.
@@ -394,7 +394,7 @@
* Writes ints from the given int array, starting from the specified offset,
* to the current position and increases the position by the number of ints
* written.
- *
+ *
* @param src
* the source int array.
* @param off
@@ -430,7 +430,7 @@
* Writes all the remaining ints of the {@code src} int buffer to this
* buffer's current position, and increases both buffers' position by the
* number of ints copied.
- *
+ *
* @param src
* the source int buffer.
* @return this buffer.
@@ -458,7 +458,7 @@
/**
* Write a int to the specified index of this buffer; the position is not
* changed.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param i
@@ -483,25 +483,25 @@
* The new buffer shares its content with this buffer, which means either
* buffer's change of content will be visible to the other. The two buffer's
* position, limit and mark are independent.
- *
+ *
* @return a sliced buffer that shares its content with this buffer.
*/
public abstract IntBuffer slice();
/**
* Returns a string represents of the state of this int buffer.
- *
+ *
* @return a string represents of the state of this int buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/IntToByteBufferAdapter.java b/luni/src/main/java/java/nio/IntToByteBufferAdapter.java
index 0631de4..9f412f6 100644
--- a/luni/src/main/java/java/nio/IntToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/IntToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
* The adapter extends Buffer, thus has its own position and limit.</li>
* </ul>
* </p>
- *
+ *
*/
final class IntToByteBufferAdapter extends IntBuffer implements DirectBuffer {
diff --git a/luni/src/main/java/java/nio/InvalidMarkException.java b/luni/src/main/java/java/nio/InvalidMarkException.java
index ff41705..f19f503 100644
--- a/luni/src/main/java/java/nio/InvalidMarkException.java
+++ b/luni/src/main/java/java/nio/InvalidMarkException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/LongArrayBuffer.java b/luni/src/main/java/java/nio/LongArrayBuffer.java
index 46c36e4..d24bec4 100644
--- a/luni/src/main/java/java/nio/LongArrayBuffer.java
+++ b/luni/src/main/java/java/nio/LongArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class LongArrayBuffer extends LongBuffer {
diff --git a/luni/src/main/java/java/nio/LongBuffer.java b/luni/src/main/java/java/nio/LongBuffer.java
index 7dd4ed4f..9378dae 100644
--- a/luni/src/main/java/java/nio/LongBuffer.java
+++ b/luni/src/main/java/java/nio/LongBuffer.java
@@ -35,7 +35,7 @@
/**
* Creates a long buffer based on a newly allocated long array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created long buffer.
@@ -146,7 +146,7 @@
/**
* Compare the remaining longs of this buffer to another long buffer's
* remaining longs.
- *
+ *
* @param otherBuffer
* another long buffer.
* @return a negative value if this is less than {@code otherBuffer}; 0 if
@@ -226,7 +226,7 @@
/**
* Returns the long at the current position and increase the position by 1.
- *
+ *
* @return the long at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -239,7 +239,7 @@
* <p>
* Calling this method has the same effect as
* {@code get(dest, 0, dest.length)}.
- *
+ *
* @param dest
* the destination long array.
* @return this buffer.
@@ -254,7 +254,7 @@
* Reads longs from the current position into the specified long array,
* starting from the specified offset, and increase the position by the
* number of longs read.
- *
+ *
* @param dest
* the target long array.
* @param off
@@ -286,7 +286,7 @@
/**
* Returns the long at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return the long at the specified index.
@@ -365,7 +365,7 @@
/**
* Writes the given long to the current position and increases the position
* by 1.
- *
+ *
* @param l
* the long to write.
* @return this buffer.
@@ -399,7 +399,7 @@
* Writes longs from the given long array, starting from the specified
* offset, to the current position and increases the position by the number
* of longs written.
- *
+ *
* @param src
* the source long array.
* @param off
@@ -435,7 +435,7 @@
* Writes all the remaining longs of the {@code src} long buffer to this
* buffer's current position, and increases both buffers' position by the
* number of longs copied.
- *
+ *
* @param src
* the source long buffer.
* @return this buffer.
@@ -463,7 +463,7 @@
/**
* Writes a long to the specified index of this buffer; the position is not
* changed.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param l
@@ -495,18 +495,18 @@
/**
* Returns a string representing the state of this long buffer.
- *
+ *
* @return a string representing the state of this long buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/LongToByteBufferAdapter.java b/luni/src/main/java/java/nio/LongToByteBufferAdapter.java
index 8b07ac5..805a96b 100644
--- a/luni/src/main/java/java/nio/LongToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/LongToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/MappedByteBuffer.java b/luni/src/main/java/java/nio/MappedByteBuffer.java
index e995f67..b22be82 100644
--- a/luni/src/main/java/java/nio/MappedByteBuffer.java
+++ b/luni/src/main/java/java/nio/MappedByteBuffer.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -71,7 +71,7 @@
* Indicates whether this buffer's content is loaded. If the result is true
* there is a high probability that the whole buffer memory is currently
* loaded in RAM. If it is false it is unsure if it is loaded or not.
- *
+ *
* @return {@code true} if this buffer's content is loaded, {@code false}
* otherwise.
*/
@@ -83,7 +83,7 @@
/**
* Loads this buffer's content into memory but it is not guaranteed to
* succeed.
- *
+ *
* @return this buffer.
*/
public final MappedByteBuffer load() {
@@ -97,7 +97,7 @@
* is stored on a local device, it is guaranteed that the changes are
* written to the file. No such guarantee is given if the file is located on
* a remote device.
- *
+ *
* @return this buffer.
*/
public final MappedByteBuffer force() {
diff --git a/luni/src/main/java/java/nio/ReadOnlyBufferException.java b/luni/src/main/java/java/nio/ReadOnlyBufferException.java
index f860e3c..7c2a5a0 100644
--- a/luni/src/main/java/java/nio/ReadOnlyBufferException.java
+++ b/luni/src/main/java/java/nio/ReadOnlyBufferException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
index 54ef89f..3388fcc 100644
--- a/luni/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyCharArrayBuffer extends CharArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java b/luni/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
index ffa6e41..c8ceba9 100644
--- a/luni/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
@@ -29,7 +29,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyDirectByteBuffer extends DirectByteBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
index f71899b..d3cf353 100644
--- a/luni/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyDoubleArrayBuffer extends DoubleArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
index e8fb7d8..f617a94 100644
--- a/luni/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyFloatArrayBuffer extends FloatArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java b/luni/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
index fba5e04..bee1e5d 100644
--- a/luni/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyHeapByteBuffer extends HeapByteBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
index cece133..12dd275 100644
--- a/luni/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyIntArrayBuffer extends IntArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
index 671f84f..fbe3249 100644
--- a/luni/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyLongArrayBuffer extends LongArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java b/luni/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
index 9730eb5..cf9d370 100644
--- a/luni/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadOnlyShortArrayBuffer extends ShortArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteCharArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
index 584df53..570efa4 100644
--- a/luni/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
@@ -26,7 +26,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteCharArrayBuffer extends CharArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteDirectByteBuffer.java b/luni/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
index d976994..8738827 100644
--- a/luni/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
@@ -32,7 +32,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteDirectByteBuffer extends DirectByteBuffer {
@@ -118,9 +118,9 @@
/*
* Override ByteBuffer.put(byte[], int, int) to improve performance.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see java.nio.ByteBuffer#put(byte[], int, int)
*/
@Override
diff --git a/luni/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
index 689f3a1..c7d4d94 100644
--- a/luni/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteDoubleArrayBuffer extends DoubleArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
index 50e8ce5..838172f 100644
--- a/luni/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteFloatArrayBuffer extends FloatArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteHeapByteBuffer.java b/luni/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
index 677b439..cbf41b8 100644
--- a/luni/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteHeapByteBuffer extends HeapByteBuffer {
@@ -111,9 +111,9 @@
/*
* Override ByteBuffer.put(byte[], int, int) to improve performance.
- *
+ *
* (non-Javadoc)
- *
+ *
* @see java.nio.ByteBuffer#put(byte[], int, int)
*/
@Override
diff --git a/luni/src/main/java/java/nio/ReadWriteIntArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
index a4be0b5..9aa74d7 100644
--- a/luni/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
@@ -26,7 +26,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteIntArrayBuffer extends IntArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteLongArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
index 2d8cdb0..2a7e332 100644
--- a/luni/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
@@ -26,7 +26,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteLongArrayBuffer extends LongArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ReadWriteShortArrayBuffer.java b/luni/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
index 0abbaf4..f3b4220 100644
--- a/luni/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* This class is marked final for runtime performance.
* </p>
- *
+ *
*/
final class ReadWriteShortArrayBuffer extends ShortArrayBuffer {
diff --git a/luni/src/main/java/java/nio/ShortArrayBuffer.java b/luni/src/main/java/java/nio/ShortArrayBuffer.java
index e7d42a0..0bd568b 100644
--- a/luni/src/main/java/java/nio/ShortArrayBuffer.java
+++ b/luni/src/main/java/java/nio/ShortArrayBuffer.java
@@ -27,7 +27,7 @@
* <p>
* All methods are marked final for runtime performance.
* </p>
- *
+ *
*/
abstract class ShortArrayBuffer extends ShortBuffer {
diff --git a/luni/src/main/java/java/nio/ShortBuffer.java b/luni/src/main/java/java/nio/ShortBuffer.java
index 9ad85b9..9775f02 100644
--- a/luni/src/main/java/java/nio/ShortBuffer.java
+++ b/luni/src/main/java/java/nio/ShortBuffer.java
@@ -35,7 +35,7 @@
/**
* Creates a short buffer based on a newly allocated short array.
- *
+ *
* @param capacity
* the capacity of the new buffer.
* @return the created short buffer.
@@ -146,7 +146,7 @@
/**
* Compare the remaining shorts of this buffer to another short buffer's
* remaining shorts.
- *
+ *
* @param otherBuffer
* another short buffer.
* @return a negative value if this is less than {@code otherBuffer}; 0 if
@@ -225,7 +225,7 @@
/**
* Returns the short at the current position and increases the position by
* 1.
- *
+ *
* @return the short at the current position.
* @exception BufferUnderflowException
* if the position is equal or greater than limit.
@@ -253,7 +253,7 @@
* Reads shorts from the current position into the specified short array,
* starting from the specified offset, and increases the position by the
* number of shorts read.
- *
+ *
* @param dest
* the target short array.
* @param off
@@ -284,7 +284,7 @@
/**
* Returns the short at the specified index; the position is not changed.
- *
+ *
* @param index
* the index, must not be negative and less than limit.
* @return a short at the specified index.
@@ -361,7 +361,7 @@
/**
* Writes the given short to the current position and increases the position
* by 1.
- *
+ *
* @param s
* the short to write.
* @return this buffer.
@@ -395,7 +395,7 @@
* Writes shorts from the given short array, starting from the specified
* offset, to the current position and increases the position by the number
* of shorts written.
- *
+ *
* @param src
* the source short array.
* @param off
@@ -431,7 +431,7 @@
* Writes all the remaining shorts of the {@code src} short buffer to this
* buffer's current position, and increases both buffers' position by the
* number of shorts copied.
- *
+ *
* @param src
* the source short buffer.
* @return this buffer.
@@ -459,7 +459,7 @@
/**
* Writes a short to the specified index of this buffer; the position is not
* changed.
- *
+ *
* @param index
* the index, must not be negative and less than the limit.
* @param s
@@ -484,25 +484,25 @@
* The new buffer shares its content with this buffer, which means either
* buffer's change of content will be visible to the other. The two buffer's
* position, limit and mark are independent.
- *
+ *
* @return a sliced buffer that shares its content with this buffer.
*/
public abstract ShortBuffer slice();
/**
* Returns a string representing the state of this short buffer.
- *
+ *
* @return a string representing the state of this short buffer.
*/
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append(getClass().getName());
- buf.append(", status: capacity=");
+ buf.append(", status: capacity=");
buf.append(capacity());
- buf.append(" position=");
+ buf.append(" position=");
buf.append(position());
- buf.append(" limit=");
+ buf.append(" limit=");
buf.append(limit());
return buf.toString();
}
diff --git a/luni/src/main/java/java/nio/ShortToByteBufferAdapter.java b/luni/src/main/java/java/nio/ShortToByteBufferAdapter.java
index f2a795f..42fbce4 100644
--- a/luni/src/main/java/java/nio/ShortToByteBufferAdapter.java
+++ b/luni/src/main/java/java/nio/ShortToByteBufferAdapter.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/AlreadyConnectedException.java b/luni/src/main/java/java/nio/channels/AlreadyConnectedException.java
index 5e09b1c..95b776a 100644
--- a/luni/src/main/java/java/nio/channels/AlreadyConnectedException.java
+++ b/luni/src/main/java/java/nio/channels/AlreadyConnectedException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/AsynchronousCloseException.java b/luni/src/main/java/java/nio/channels/AsynchronousCloseException.java
index c2d285a..59938ce 100644
--- a/luni/src/main/java/java/nio/channels/AsynchronousCloseException.java
+++ b/luni/src/main/java/java/nio/channels/AsynchronousCloseException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/ByteChannel.java b/luni/src/main/java/java/nio/channels/ByteChannel.java
index 383d350..932695d 100644
--- a/luni/src/main/java/java/nio/channels/ByteChannel.java
+++ b/luni/src/main/java/java/nio/channels/ByteChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/CancelledKeyException.java b/luni/src/main/java/java/nio/channels/CancelledKeyException.java
index e955b3c..7938e48 100644
--- a/luni/src/main/java/java/nio/channels/CancelledKeyException.java
+++ b/luni/src/main/java/java/nio/channels/CancelledKeyException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/Channel.java b/luni/src/main/java/java/nio/channels/Channel.java
index f31c565..cf1a15a 100644
--- a/luni/src/main/java/java/nio/channels/Channel.java
+++ b/luni/src/main/java/java/nio/channels/Channel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
/**
* Returns whether this channel is open or not.
- *
+ *
* @return true if the channel is open, otherwise returns false.
*/
public boolean isOpen();
diff --git a/luni/src/main/java/java/nio/channels/Channels.java b/luni/src/main/java/java/nio/channels/Channels.java
index f29ca74..64ddcfa 100644
--- a/luni/src/main/java/java/nio/channels/Channels.java
+++ b/luni/src/main/java/java/nio/channels/Channels.java
@@ -54,7 +54,7 @@
* <li>Neither {@code mark} nor {@code reset} is supported.</li>
* <li>It is not buffered.</li>
* </ul>
- *
+ *
* @param channel
* the channel to be wrapped by an InputStream.
* @return an InputStream that takes bytes from the given byte channel.
@@ -74,7 +74,7 @@
* in non-blocking mode and {@code write} is called.</li>
* <li>It is not buffered.</li>
* </ul>
- *
+ *
* @param channel
* the channel to be wrapped by an OutputStream.
* @return an OutputStream that puts bytes onto the given byte channel.
@@ -91,7 +91,7 @@
* well.</li>
* <li>It is not buffered.</li>
* </ul>
- *
+ *
* @param inputStream
* the stream to be wrapped by a byte channel.
* @return a byte channel that reads bytes from the input stream.
@@ -102,7 +102,7 @@
/**
* Returns a writable channel on the given output stream.
- *
+ *
* The resulting channel has following properties:
* <ul>
* <li>If the channel is closed, then the underlying stream is closed as
@@ -120,7 +120,7 @@
/**
* Returns a reader that decodes bytes from a channel.
- *
+ *
* @param channel
* the Channel to be read.
* @param decoder
@@ -139,7 +139,7 @@
/**
* Returns a reader that decodes bytes from a channel. This method creates a
* reader with a buffer of default size.
- *
+ *
* @param channel
* the Channel to be read.
* @param charsetName
@@ -156,7 +156,7 @@
/**
* Returns a writer that encodes characters with the specified
* {@code encoder} and sends the bytes to the specified channel.
- *
+ *
* @param channel
* the Channel to write to.
* @param encoder
@@ -176,7 +176,7 @@
* Returns a writer that encodes characters with the specified
* {@code encoder} and sends the bytes to the specified channel. This method
* creates a writer with a buffer of default size.
- *
+ *
* @param channel
* the Channel to be written to.
* @param charsetName
diff --git a/luni/src/main/java/java/nio/channels/ClosedByInterruptException.java b/luni/src/main/java/java/nio/channels/ClosedByInterruptException.java
index cc4c5eb..ee4875f 100644
--- a/luni/src/main/java/java/nio/channels/ClosedByInterruptException.java
+++ b/luni/src/main/java/java/nio/channels/ClosedByInterruptException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/ClosedChannelException.java b/luni/src/main/java/java/nio/channels/ClosedChannelException.java
index 2b77601..897bc6a 100644
--- a/luni/src/main/java/java/nio/channels/ClosedChannelException.java
+++ b/luni/src/main/java/java/nio/channels/ClosedChannelException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/ClosedSelectorException.java b/luni/src/main/java/java/nio/channels/ClosedSelectorException.java
index 5acc878..82e03e8 100644
--- a/luni/src/main/java/java/nio/channels/ClosedSelectorException.java
+++ b/luni/src/main/java/java/nio/channels/ClosedSelectorException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/ConnectionPendingException.java b/luni/src/main/java/java/nio/channels/ConnectionPendingException.java
index 43ff65cd..bc509d0 100644
--- a/luni/src/main/java/java/nio/channels/ConnectionPendingException.java
+++ b/luni/src/main/java/java/nio/channels/ConnectionPendingException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/DatagramChannel.java b/luni/src/main/java/java/nio/channels/DatagramChannel.java
index fceb110..7e61cbc 100644
--- a/luni/src/main/java/java/nio/channels/DatagramChannel.java
+++ b/luni/src/main/java/java/nio/channels/DatagramChannel.java
@@ -46,7 +46,7 @@
/**
* Constructs a new {@code DatagramChannel}.
- *
+ *
* @param selectorProvider
* an instance of SelectorProvider.
*/
@@ -72,7 +72,7 @@
* Gets the valid operations of this channel. Datagram channels support read
* and write operations, so this method returns (
* <code>SelectionKey.OP_READ</code> | <code>SelectionKey.OP_WRITE</code> ).
- *
+ *
* @see java.nio.channels.SelectableChannel#validOps()
* @return valid operations in bit-set.
*/
@@ -85,14 +85,14 @@
* Returns the related datagram socket of this channel, which does not
* define additional public methods to those defined by
* {@link DatagramSocket}.
- *
+ *
* @return the related DatagramSocket instance.
*/
public abstract DatagramSocket socket();
/**
* Returns whether this channel's socket is connected or not.
- *
+ *
* @return <code>true</code> if this channel's socket is connected;
* <code>false</code> otherwise.
*/
@@ -368,7 +368,7 @@
* and the datagram is sent to the connected address. Otherwise, this method
* has the same behavior as the {@code write} method in the
* {@link GatheringByteChannel} interface.
- *
+ *
* @see java.nio.channels.GatheringByteChannel#write(java.nio.ByteBuffer[],
* int, int)
* @param sources
@@ -409,7 +409,7 @@
* and the datagram is sent to the connected address. Otherwise, this method
* has the same behavior as the write method in the
* {@link GatheringByteChannel} interface.
- *
+ *
* @see java.nio.channels.GatheringByteChannel#write(java.nio.ByteBuffer[])
* @param sources
* the byte buffers as the source of the datagram.
diff --git a/luni/src/main/java/java/nio/channels/FileChannel.java b/luni/src/main/java/java/nio/channels/FileChannel.java
index 1623256..1275348 100644
--- a/luni/src/main/java/java/nio/channels/FileChannel.java
+++ b/luni/src/main/java/java/nio/channels/FileChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -86,17 +86,17 @@
/**
* Private mapping mode (equivalent to copy on write).
*/
- public static final MapMode PRIVATE = new MapMode("PRIVATE");
+ public static final MapMode PRIVATE = new MapMode("PRIVATE");
/**
* Read-only mapping mode.
*/
- public static final MapMode READ_ONLY = new MapMode("READ_ONLY");
+ public static final MapMode READ_ONLY = new MapMode("READ_ONLY");
/**
* Read-write mapping mode.
*/
- public static final MapMode READ_WRITE = new MapMode("READ_WRITE");
+ public static final MapMode READ_WRITE = new MapMode("READ_WRITE");
// The string used to display the mapping mode.
private final String displayName;
@@ -111,7 +111,7 @@
/**
* Returns a string version of the mapping mode.
- *
+ *
* @return this map mode as string.
*/
@Override
@@ -146,7 +146,7 @@
* time, etc. Note that passing <code>true</code> may invoke an underlying
* write to the operating system (if the platform is maintaining metadata
* such as last access time), even if the channel is opened read-only.
- *
+ *
* @param metadata
* {@code true} if the file metadata should be flushed in
* addition to the file content, {@code false} otherwise.
@@ -284,7 +284,7 @@
/**
* Returns the current value of the file position pointer.
- *
+ *
* @return the current position as a positive integer number of bytes from
* the start of the file.
* @throws ClosedChannelException
@@ -303,7 +303,7 @@
* size, attempts to read will return end of file. Write operations will
* succeed but they will fill the bytes between the current end of file and
* the new position with the required number of (unspecified) byte values.
- *
+ *
* @param offset
* the new file position, in bytes.
* @return the receiver.
@@ -459,7 +459,7 @@
/**
* Returns the size of the file underlying this channel in bytes.
- *
+ *
* @return the size of the file in bytes.
* @throws ClosedChannelException
* if this channel is closed.
@@ -628,7 +628,7 @@
* some number of bytes are written (up to the remaining number of bytes in
* the buffer) the file position is increased by the number of bytes
* actually written.
- *
+ *
* @param src
* the byte buffer containing the bytes to be written.
* @return the number of bytes actually written.
diff --git a/luni/src/main/java/java/nio/channels/FileLock.java b/luni/src/main/java/java/nio/channels/FileLock.java
index 1bc71a8..2c8025e 100644
--- a/luni/src/main/java/java/nio/channels/FileLock.java
+++ b/luni/src/main/java/java/nio/channels/FileLock.java
@@ -85,7 +85,7 @@
/**
* Constructs a new file lock instance for a given channel. The constructor
* enforces the starting position, length and sharing mode of the lock.
- *
+ *
* @param channel
* the underlying file channel that holds the lock.
* @param position
@@ -110,7 +110,7 @@
/**
* Returns the lock's {@link FileChannel}.
- *
+ *
* @return the channel.
*/
public final FileChannel channel() {
@@ -119,7 +119,7 @@
/**
* Returns the lock's starting position in the file.
- *
+ *
* @return the lock position.
*/
public final long position() {
@@ -128,7 +128,7 @@
/**
* Returns the length of the file lock in bytes.
- *
+ *
* @return the size of the file lock in bytes.
*/
public final long size() {
@@ -138,7 +138,7 @@
/**
* Indicates if the file lock is shared with other processes or if it is
* exclusive.
- *
+ *
* @return {@code true} if the lock is a shared lock, {@code false} if it is
* exclusive.
*/
@@ -149,7 +149,7 @@
/**
* Indicates if the receiver's lock region overlaps the region described
* in the parameter list.
- *
+ *
* @param start
* the starting position for the comparative lock.
* @param length
@@ -169,7 +169,7 @@
* Indicates whether this lock is a valid file lock. The lock is
* valid unless the underlying channel has been closed or it has been
* explicitly released.
- *
+ *
* @return {@code true} if the lock is valid, {@code false} otherwise.
*/
public abstract boolean isValid();
@@ -177,7 +177,7 @@
/**
* Releases this particular lock on the file. If the lock is invalid then
* this method has no effect. Once released, the lock becomes invalid.
- *
+ *
* @throws ClosedChannelException
* if the channel is already closed when an attempt to release
* the lock is made.
@@ -189,7 +189,7 @@
/**
* Returns a string that shows the details of the lock suitable for display
* to an end user.
- *
+ *
* @return the display string.
*/
@Override
diff --git a/luni/src/main/java/java/nio/channels/FileLockInterruptionException.java b/luni/src/main/java/java/nio/channels/FileLockInterruptionException.java
index 71cc0c6..7203fe1 100644
--- a/luni/src/main/java/java/nio/channels/FileLockInterruptionException.java
+++ b/luni/src/main/java/java/nio/channels/FileLockInterruptionException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/GatheringByteChannel.java b/luni/src/main/java/java/nio/channels/GatheringByteChannel.java
index 8e52075..912b8be 100644
--- a/luni/src/main/java/java/nio/channels/GatheringByteChannel.java
+++ b/luni/src/main/java/java/nio/channels/GatheringByteChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/IllegalBlockingModeException.java b/luni/src/main/java/java/nio/channels/IllegalBlockingModeException.java
index 5495321..8a73ca7 100644
--- a/luni/src/main/java/java/nio/channels/IllegalBlockingModeException.java
+++ b/luni/src/main/java/java/nio/channels/IllegalBlockingModeException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/IllegalSelectorException.java b/luni/src/main/java/java/nio/channels/IllegalSelectorException.java
index a40e2cb..0fece43 100644
--- a/luni/src/main/java/java/nio/channels/IllegalSelectorException.java
+++ b/luni/src/main/java/java/nio/channels/IllegalSelectorException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/InterruptibleChannel.java b/luni/src/main/java/java/nio/channels/InterruptibleChannel.java
index b871c41..b5ea5d4 100644
--- a/luni/src/main/java/java/nio/channels/InterruptibleChannel.java
+++ b/luni/src/main/java/java/nio/channels/InterruptibleChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,7 +43,7 @@
* Any threads that are blocked on I/O operations on this channel will be
* interrupted with an {@link AsynchronousCloseException}. Otherwise, this
* method behaves the same as defined in the {@code Channel} interface.
- *
+ *
* @throws IOException
* if an I/O error occurs while closing the channel.
*/
diff --git a/luni/src/main/java/java/nio/channels/NoConnectionPendingException.java b/luni/src/main/java/java/nio/channels/NoConnectionPendingException.java
index 34b3e5a..d12137d 100644
--- a/luni/src/main/java/java/nio/channels/NoConnectionPendingException.java
+++ b/luni/src/main/java/java/nio/channels/NoConnectionPendingException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/NonReadableChannelException.java b/luni/src/main/java/java/nio/channels/NonReadableChannelException.java
index 51e3cd3..9cda997 100644
--- a/luni/src/main/java/java/nio/channels/NonReadableChannelException.java
+++ b/luni/src/main/java/java/nio/channels/NonReadableChannelException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/NonWritableChannelException.java b/luni/src/main/java/java/nio/channels/NonWritableChannelException.java
index acc6305..ce8da06 100644
--- a/luni/src/main/java/java/nio/channels/NonWritableChannelException.java
+++ b/luni/src/main/java/java/nio/channels/NonWritableChannelException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/NotYetBoundException.java b/luni/src/main/java/java/nio/channels/NotYetBoundException.java
index d2ffc55..93052d2 100644
--- a/luni/src/main/java/java/nio/channels/NotYetBoundException.java
+++ b/luni/src/main/java/java/nio/channels/NotYetBoundException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/NotYetConnectedException.java b/luni/src/main/java/java/nio/channels/NotYetConnectedException.java
index da3523a..008fae8 100644
--- a/luni/src/main/java/java/nio/channels/NotYetConnectedException.java
+++ b/luni/src/main/java/java/nio/channels/NotYetConnectedException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/OverlappingFileLockException.java b/luni/src/main/java/java/nio/channels/OverlappingFileLockException.java
index 98fab94..7c1fac6 100644
--- a/luni/src/main/java/java/nio/channels/OverlappingFileLockException.java
+++ b/luni/src/main/java/java/nio/channels/OverlappingFileLockException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/Pipe.java b/luni/src/main/java/java/nio/channels/Pipe.java
index 956e69b..506c7a6 100644
--- a/luni/src/main/java/java/nio/channels/Pipe.java
+++ b/luni/src/main/java/java/nio/channels/Pipe.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -33,10 +33,10 @@
*/
public static abstract class SinkChannel extends AbstractSelectableChannel
implements WritableByteChannel, GatheringByteChannel {
-
+
/**
* Constructs a new {@code SinkChannel}.
- *
+ *
* @param provider
* the provider of the channel.
*/
@@ -46,7 +46,7 @@
/**
* Indicates that this channel only supports writing.
- *
+ *
* @return a static value of OP_WRITE.
*/
@Override
@@ -61,10 +61,10 @@
public static abstract class SourceChannel extends
AbstractSelectableChannel implements ReadableByteChannel,
ScatteringByteChannel {
-
+
/**
* Constructs a new {@code SourceChannel}.
- *
+ *
* @param provider
* the provider of the channel.
*/
@@ -74,7 +74,7 @@
/**
* Indicates that this channel only supports reading.
- *
+ *
* @return a static value of OP_READ.
*/
@Override
@@ -86,9 +86,9 @@
/**
* Initializes a pipe.
- *
+ *
* @return a new instance of pipe.
- *
+ *
* @throws IOException
* if an I/O error occurs.
*/
@@ -105,14 +105,14 @@
/**
* Returns the sink channel of the pipe.
- *
+ *
* @return a writable sink channel of the pipe.
*/
public abstract SinkChannel sink();
/**
* Returns the source channel of the pipe.
- *
+ *
* @return a readable source channel of the pipe.
*/
public abstract SourceChannel source();
diff --git a/luni/src/main/java/java/nio/channels/ReadableByteChannel.java b/luni/src/main/java/java/nio/channels/ReadableByteChannel.java
index 649b64c..d13adb4 100644
--- a/luni/src/main/java/java/nio/channels/ReadableByteChannel.java
+++ b/luni/src/main/java/java/nio/channels/ReadableByteChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/ScatteringByteChannel.java b/luni/src/main/java/java/nio/channels/ScatteringByteChannel.java
index d25f69c..5a85299 100644
--- a/luni/src/main/java/java/nio/channels/ScatteringByteChannel.java
+++ b/luni/src/main/java/java/nio/channels/ScatteringByteChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,7 +58,7 @@
* <p>
* If a read operation is in progress, subsequent threads will block until
* the read is completed and will then contend for the ability to read.
- *
+ *
* @param buffers
* the array of byte buffers into which the bytes will be copied.
* @param offset
diff --git a/luni/src/main/java/java/nio/channels/SelectableChannel.java b/luni/src/main/java/java/nio/channels/SelectableChannel.java
index 6ac9a51..5a72147 100644
--- a/luni/src/main/java/java/nio/channels/SelectableChannel.java
+++ b/luni/src/main/java/java/nio/channels/SelectableChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,7 +44,7 @@
/**
* Gets the blocking lock which synchronizes the {@code configureBlocking}
* and {@code register} methods.
- *
+ *
* @return the blocking object as lock.
*/
public abstract Object blockingLock();
@@ -56,7 +56,7 @@
* invoked after the call to this method. If other methods are already
* executing when this method is called, they still have the old mode and
* the call to this method might block depending on the implementation.
- *
+ *
* @param block
* {@code true} for setting this channel's mode to blocking,
* {@code false} to set it to non-blocking.
@@ -74,7 +74,7 @@
/**
* Indicates whether this channel is in blocking mode.
- *
+ *
* @return {@code true} if this channel is blocking, undefined if this
* channel is closed.
*/
@@ -82,7 +82,7 @@
/**
* Indicates whether this channel is registered with at least one selector.
- *
+ *
* @return {@code true} if this channel is registered, {@code false}
* otherwise.
*/
@@ -90,7 +90,7 @@
/**
* Gets this channel's selection key for the specified selector.
- *
+ *
* @param sel
* the selector with which this channel has been registered.
* @return the selection key for the channel or {@code null} if this channel
@@ -100,7 +100,7 @@
/**
* Gets the provider of this channel.
- *
+ *
* @return the provider of this channel.
*/
public abstract SelectorProvider provider();
diff --git a/luni/src/main/java/java/nio/channels/SelectionKey.java b/luni/src/main/java/java/nio/channels/SelectionKey.java
index d00627e..1803ef5 100644
--- a/luni/src/main/java/java/nio/channels/SelectionKey.java
+++ b/luni/src/main/java/java/nio/channels/SelectionKey.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -67,7 +67,7 @@
/**
* Attaches an object to this key. It is acceptable to attach {@code null},
* this discards the old attachment.
- *
+ *
* @param anObject
* the object to attach, or {@code null} to discard the current
* attachment.
@@ -82,7 +82,7 @@
/**
* Gets the attached object.
- *
+ *
* @return the attached object or {@code null} if no object has been
* attached.
*/
@@ -107,7 +107,7 @@
/**
* Gets the channel of this key.
- *
+ *
* @return the channel of this key.
*/
public abstract SelectableChannel channel();
@@ -115,7 +115,7 @@
/**
* Gets this key's {@link SelectionKey interest set}. The returned set has
* only those bits set that are valid for this key's channel.
- *
+ *
* @return the interest set of this key.
* @throws CancelledKeyException
* if the key has already been canceled.
@@ -124,7 +124,7 @@
/**
* Sets the {@link SelectionKey interest set} for this key.
- *
+ *
* @param operations
* the new interest set.
* @return this key.
@@ -141,7 +141,7 @@
* Indicates whether this key's channel is interested in the accept
* operation and is ready to accept new connections. A call to this method
* is equal to executing {@code (readyOps() & OP_ACCEPT) == OP_ACCEPT}.
- *
+ *
* @return {@code true} if the channel is interested in the accept operation
* and is ready to accept new connections, {@code false} otherwise.
* @throws CancelledKeyException
@@ -155,7 +155,7 @@
* Indicates whether this key's channel is interested in the connect
* operation and is ready to connect. A call to this method is equal to
* executing {@code (readyOps() & OP_CONNECT) == OP_CONNECT}.
- *
+ *
* @return {@code true} if the channel is interested in the connect
* operation and is ready to connect, {@code false} otherwise.
* @throws CancelledKeyException
@@ -169,7 +169,7 @@
* Indicates whether this key's channel is interested in the read operation
* and is ready to read. A call to this method is equal to executing
* {@code (readyOps() & OP_READ) == OP_READ}.
- *
+ *
* @return {@code true} if the channel is interested in the read operation
* and is ready to read, {@code false} otherwise.
* @throws CancelledKeyException
@@ -182,7 +182,7 @@
/**
* Indicates whether this key is valid. A key is valid as long as it has not
* been canceled.
- *
+ *
* @return {@code true} if this key has not been canceled, {@code false}
* otherwise.
*/
@@ -192,7 +192,7 @@
* Indicates whether this key's channel is interested in the write operation
* and is ready to write. A call to this method is equal to executing
* {@code (readyOps() & OP_WRITE) == OP_WRITE}.
- *
+ *
* @return {@code true} if the channel is interested in the wrie operation
* and is ready to write, {@code false} otherwise.
* @throws CancelledKeyException
@@ -205,7 +205,7 @@
/**
* Gets the set of operations that are ready. The returned set has only
* those bits set that are valid for this key's channel.
- *
+ *
* @return the operations for which this key's channel is ready.
* @throws CancelledKeyException
* if the key has already been canceled.
@@ -214,7 +214,7 @@
/**
* Gets the selector for which this key's channel is registered.
- *
+ *
* @return the related selector.
*/
public abstract Selector selector();
diff --git a/luni/src/main/java/java/nio/channels/Selector.java b/luni/src/main/java/java/nio/channels/Selector.java
index 8d43f4b..18f2e71 100644
--- a/luni/src/main/java/java/nio/channels/Selector.java
+++ b/luni/src/main/java/java/nio/channels/Selector.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
* The factory method for selector. It returns the selector returned by the
* default {@link SelectorProvider} by calling its {@code openCollector}
* method.
- *
+ *
* @return a new selector.
* @throws IOException
* if an I/O error occurs.
@@ -73,7 +73,7 @@
/**
* Indicates whether this selector is open.
- *
+ *
* @return {@code true} if this selector is not closed, {@code false}
* otherwise.
*/
@@ -82,14 +82,14 @@
/**
* Gets the set of registered keys. The set is immutable and is not thread-
* safe.
- *
+ *
* @return the set of registered keys.
*/
public abstract Set<SelectionKey> keys();
/**
* Gets the provider of this selector.
- *
+ *
* @return the provider of this selector.
*/
public abstract SelectorProvider provider();
@@ -99,7 +99,7 @@
* according to its {@link SelectionKey interest set}. This method does not
* return until at least one channel is ready, {@link #wakeup()} is
* invoked or the calling thread is interrupted.
- *
+ *
* @return the number of channels that are ready for operation.
* @throws IOException
* if an I/O error occurs.
@@ -114,7 +114,7 @@
* return until at least one channel is ready, {@link #wakeup()} is invoked,
* the calling thread is interrupted or the specified {@code timeout}
* expires.
- *
+ *
* @param timeout
* the non-negative timeout in millisecond; 0 will block forever
* if no channels get ready.
@@ -132,7 +132,7 @@
* Gets the selection keys whose channels are ready for operation. The set
* is not thread-safe and no keys may be added to it. Removing keys is
* allowed.
- *
+ *
* @return the selection keys whose channels are ready for operation.
* @throws ClosedSelectorException
* if the selector is closed.
@@ -143,7 +143,7 @@
* Detects if any of the registered channels is ready for I/O operations
* according to its {@link SelectionKey interest set}. This operation will
* return immediately.
- *
+ *
* @return the number of channels that are ready for operation, 0 if none is
* ready.
* @throws IOException
diff --git a/luni/src/main/java/java/nio/channels/ServerSocketChannel.java b/luni/src/main/java/java/nio/channels/ServerSocketChannel.java
index b0508fa..67d3b8e 100644
--- a/luni/src/main/java/java/nio/channels/ServerSocketChannel.java
+++ b/luni/src/main/java/java/nio/channels/ServerSocketChannel.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@link ServerSocketChannel}.
- *
+ *
* @param selectorProvider
* an instance of SelectorProvider.
*/
@@ -64,7 +64,7 @@
* Gets the valid operations of this channel. Server-socket channels support
* accepting operation, so this method returns {@code
* SelectionKey.OP_ACCEPT}.
- *
+ *
* @see java.nio.channels.SelectableChannel#validOps()
* @return the operations supported by this channel.
*/
@@ -76,7 +76,7 @@
/**
* Return the server-socket assigned this channel, which does not declare
* any public methods that are not declared in {@code ServerSocket}.
- *
+ *
* @return the server-socket assigned to this channel.
*/
public abstract ServerSocket socket();
@@ -91,7 +91,7 @@
* <p>
* This method just executes the same security checks as the {@code
* accept()} method of the {@link ServerSocket} class.
- *
+ *
* @return the accepted {@code SocketChannel} instance, or {@code null} if
* the channel is non-blocking and no connection is available.
* @throws AsynchronousCloseException
diff --git a/luni/src/main/java/java/nio/channels/SocketChannel.java b/luni/src/main/java/java/nio/channels/SocketChannel.java
index dcc9aa6..5d4a556 100644
--- a/luni/src/main/java/java/nio/channels/SocketChannel.java
+++ b/luni/src/main/java/java/nio/channels/SocketChannel.java
@@ -61,7 +61,7 @@
/**
* Constructs a new {@code SocketChannel}.
- *
+ *
* @param selectorProvider
* an instance of SelectorProvider.
*/
@@ -121,7 +121,7 @@
* Gets the valid operations of this channel. Socket channels support
* connect, read and write operation, so this method returns
* {@code SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE}.
- *
+ *
* @return the operations supported by this channel.
* @see java.nio.channels.SelectableChannel#validOps()
*/
@@ -133,14 +133,14 @@
/**
* Returns the socket assigned to this channel, which does not declare any public
* methods that are not declared in {@code Socket}.
- *
+ *
* @return the socket assigned to this channel.
*/
public abstract Socket socket();
/**
* Indicates whether this channel's socket is connected.
- *
+ *
* @return {@code true} if this channel's socket is connected, {@code false}
* otherwise.
*/
@@ -148,7 +148,7 @@
/**
* Indicates whether this channel's socket is still trying to connect.
- *
+ *
* @return {@code true} if the connection is initiated but not finished;
* {@code false} otherwise.
*/
diff --git a/luni/src/main/java/java/nio/channels/UnresolvedAddressException.java b/luni/src/main/java/java/nio/channels/UnresolvedAddressException.java
index 426e84c..b740447 100644
--- a/luni/src/main/java/java/nio/channels/UnresolvedAddressException.java
+++ b/luni/src/main/java/java/nio/channels/UnresolvedAddressException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java b/luni/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java
index 62c1515..f494f4a 100644
--- a/luni/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java
+++ b/luni/src/main/java/java/nio/channels/UnsupportedAddressTypeException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/WritableByteChannel.java b/luni/src/main/java/java/nio/channels/WritableByteChannel.java
index 4a9779a..7bf0665 100644
--- a/luni/src/main/java/java/nio/channels/WritableByteChannel.java
+++ b/luni/src/main/java/java/nio/channels/WritableByteChannel.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java b/luni/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
index e7e3fc1..47f2512 100644
--- a/luni/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
+++ b/luni/src/main/java/java/nio/channels/spi/AbstractInterruptibleChannel.java
@@ -48,7 +48,7 @@
.doPrivileged(new PrivilegedExceptionAction<Method>() {
public Method run() throws Exception {
return Thread.class.getDeclaredMethod(
- "setInterruptAction",
+ "setInterruptAction",
new Class[] { Runnable.class });
}
@@ -74,7 +74,7 @@
/**
* Indicates whether this channel is open.
- *
+ *
* @return {@code true} if this channel is open, {@code false} if it is
* closed.
* @see java.nio.channels.Channel#isOpen()
@@ -140,7 +140,7 @@
/**
* Indicates the end of a code section that has been started with
* {@code begin()} and that includes a potentially blocking I/O operation.
- *
+ *
* @param success
* pass {@code true} if the blocking operation has succeeded and
* has had a noticeable effect; {@code false} otherwise.
@@ -181,7 +181,7 @@
* Any outstanding threads blocked on I/O operations on this channel must be
* released with either a normal return code, or by throwing an
* {@code AsynchronousCloseException}.
- *
+ *
* @throws IOException
* if a problem occurs while closing the channel.
*/
diff --git a/luni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java b/luni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
index 54092ed..6621a8c 100644
--- a/luni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
+++ b/luni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java
@@ -52,7 +52,7 @@
/**
* Constructs a new {@code AbstractSelectableChannel}.
- *
+ *
* @param selectorProvider
* the selector provider that creates this channel.
*/
@@ -63,7 +63,7 @@
/**
* Returns the selector provider that has created this channel.
- *
+ *
* @see java.nio.channels.SelectableChannel#provider()
* @return this channel's selector provider.
*/
@@ -109,7 +109,7 @@
* the corresponding selection key is returned. If the channel is not yet
* registered, this method calls the {@code register} method of
* {@code selector} and adds the selection key to this channel's key set.
- *
+ *
* @param selector
* the selector with which to register this channel.
* @param interestSet
@@ -172,7 +172,7 @@
* {@code implCloseSelectableChannel()} first, then loops through the list
* of selection keys and cancels them, which unregisters this channel from
* all selectors it is registered with.
- *
+ *
* @throws IOException
* if a problem occurs while closing the channel.
*/
@@ -190,7 +190,7 @@
/**
* Implements the closing function of the SelectableChannel. This method is
* called from {@code implCloseChannel()}.
- *
+ *
* @throws IOException
* if an I/O exception occurs.
*/
@@ -225,7 +225,7 @@
* other calls to this method or to {@code register} are executing. The
* actual setting of the mode is done by calling
* {@code implConfigureBlocking(boolean)}.
- *
+ *
* @see java.nio.channels.SelectableChannel#configureBlocking(boolean)
* @param blockingMode
* {@code true} for setting this channel's mode to blocking,
@@ -260,7 +260,7 @@
/**
* Implements the setting of the blocking mode.
- *
+ *
* @param blockingMode
* {@code true} for setting this channel's mode to blocking,
* {@code false} to set it to non-blocking.
diff --git a/luni/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java b/luni/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java
index 4c46226..3e27cab 100644
--- a/luni/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java
+++ b/luni/src/main/java/java/nio/channels/spi/AbstractSelectionKey.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/nio/channels/spi/AbstractSelector.java b/luni/src/main/java/java/nio/channels/spi/AbstractSelector.java
index 26bbb4f..d3a8a59 100644
--- a/luni/src/main/java/java/nio/channels/spi/AbstractSelector.java
+++ b/luni/src/main/java/java/nio/channels/spi/AbstractSelector.java
@@ -42,7 +42,7 @@
/**
* Constructs a new {@code AbstractSelector}.
- *
+ *
* @param selectorProvider
* the selector provider that creates this selector.
*/
@@ -54,7 +54,7 @@
* Closes this selector. This method does nothing if this selector is
* already closed. The actual closing must be implemented by subclasses in
* {@code implCloseSelector()}.
- *
+ *
* @throws IOException
* if an I/O error occurs.
*/
@@ -67,7 +67,7 @@
/**
* Implements the closing of this channel.
- *
+ *
* @throws IOException
* if an I/O error occurs.
*/
@@ -86,7 +86,7 @@
/**
* Gets this selector's provider.
- *
+ *
* @return the provider of this selector.
*/
@Override
@@ -96,7 +96,7 @@
/**
* Returns this channel's set of canceled selection keys.
- *
+ *
* @return the set of canceled selection keys.
*/
protected final Set<SelectionKey> cancelledKeys() {
@@ -105,7 +105,7 @@
/**
* Registers a channel with this selector.
- *
+ *
* @param channel
* the channel to be registered.
* @param operations
@@ -119,7 +119,7 @@
/**
* Deletes the key from the channel's key set.
- *
+ *
* @param key
* the key.
*/
diff --git a/luni/src/main/java/java/nio/channels/spi/SelectorProvider.java b/luni/src/main/java/java/nio/channels/spi/SelectorProvider.java
index 8cd51b4..24a081c 100644
--- a/luni/src/main/java/java/nio/channels/spi/SelectorProvider.java
+++ b/luni/src/main/java/java/nio/channels/spi/SelectorProvider.java
@@ -46,7 +46,7 @@
/**
* Constructs a new {@code SelectorProvider}.
- *
+ *
* @throws SecurityException
* if there is a security manager installed that does not permit
* the runtime permission labeled "selectorProvider".
@@ -55,7 +55,7 @@
super();
if (null != System.getSecurityManager()) {
System.getSecurityManager().checkPermission(
- new RuntimePermission("selectorProvider"));
+ new RuntimePermission("selectorProvider"));
}
}
@@ -101,7 +101,7 @@
/**
* Creates a new open {@code DatagramChannel}.
- *
+ *
* @return the new channel.
* @throws IOException
* if an I/O error occurs.
@@ -110,7 +110,7 @@
/**
* Creates a new {@code Pipe}.
- *
+ *
* @return the new pipe.
* @throws IOException
* if an I/O error occurs.
@@ -119,7 +119,7 @@
/**
* Creates a new selector.
- *
+ *
* @return the new selector.
* @throws IOException
* if an I/O error occurs.
@@ -128,7 +128,7 @@
/**
* Creates a new open {@code ServerSocketChannel}.
- *
+ *
* @return the new channel.
* @throws IOException
* if an I/O error occurs.
@@ -138,7 +138,7 @@
/**
* Create a new open {@code SocketChannel}.
- *
+ *
* @return the new channel.
* @throws IOException
* if an I/O error occurs.
@@ -148,7 +148,7 @@
/**
* Returns the channel inherited from the instance that created this
* virtual machine.
- *
+ *
* @return the channel.
* @throws IOException
* if an I/O error occurs.
@@ -161,7 +161,7 @@
SecurityManager smngr = System.getSecurityManager();
if (smngr != null) {
smngr.checkPermission(
- new RuntimePermission("inheritedChannel"));
+ new RuntimePermission("inheritedChannel"));
}
// END android-added
if (null == inheritedChannel) {
diff --git a/luni/src/main/java/java/nio/charset/Charset.java b/luni/src/main/java/java/nio/charset/Charset.java
index e895a19..4b265e5 100644
--- a/luni/src/main/java/java/nio/charset/Charset.java
+++ b/luni/src/main/java/java/nio/charset/Charset.java
@@ -77,17 +77,17 @@
* The name of configuration files where charset provider class names can be
* specified.
*/
- private static final String PROVIDER_CONFIGURATION_FILE_NAME = "META-INF/services/java.nio.charset.spi.CharsetProvider";
+ private static final String PROVIDER_CONFIGURATION_FILE_NAME = "META-INF/services/java.nio.charset.spi.CharsetProvider";
/*
* The encoding of configuration files
*/
- private static final String PROVIDER_CONFIGURATION_FILE_ENCODING = "UTF-8";
+ private static final String PROVIDER_CONFIGURATION_FILE_ENCODING = "UTF-8";
/*
* The comment string used in configuration files
*/
- private static final String PROVIDER_CONFIGURATION_FILE_COMMENT = "#";
+ private static final String PROVIDER_CONFIGURATION_FILE_COMMENT = "#";
private static ClassLoader systemClassLoader;
@@ -106,7 +106,7 @@
/**
* Constructs a <code>Charset</code> object. Duplicated aliases are
* ignored.
- *
+ *
* @param canonicalName
* the canonical name of the charset.
* @param aliases
@@ -484,7 +484,7 @@
/**
* Gets a <code>Charset</code> instance for the specified charset name.
- *
+ *
* @param charsetName
* the canonical name of the charset or an alias.
* @return a <code>Charset</code> instance for the specified charset name.
@@ -503,7 +503,7 @@
/**
* Determines whether the specified charset is supported by this runtime.
- *
+ *
* @param charsetName
* the name of the charset.
* @return true if the specified charset is supported, otherwise false.
@@ -516,7 +516,7 @@
/**
* Determines whether this charset is a super set of the given charset.
- *
+ *
* @param charset
* a given charset.
* @return true if this charset is a super set of the given charset,
@@ -527,21 +527,21 @@
/**
* Gets a new instance of an encoder for this charset.
- *
+ *
* @return a new instance of an encoder for this charset.
*/
public abstract CharsetEncoder newEncoder();
/**
* Gets a new instance of a decoder for this charset.
- *
+ *
* @return a new instance of a decoder for this charset.
*/
public abstract CharsetDecoder newDecoder();
/**
* Gets the canonical name of this charset.
- *
+ *
* @return this charset's name in canonical form.
*/
public final String name() {
@@ -550,7 +550,7 @@
/**
* Gets the set of this charset's aliases.
- *
+ *
* @return an unmodifiable set of this charset's aliases.
*/
public final Set<String> aliases() {
@@ -559,7 +559,7 @@
/**
* Gets the name of this charset for the default locale.
- *
+ *
* <p>The default implementation returns the canonical name of this charset.
* Subclasses may return a localized display name.
*
@@ -586,18 +586,18 @@
/**
* Indicates whether this charset is known to be registered in the IANA
* Charset Registry.
- *
+ *
* @return true if the charset is known to be registered, otherwise returns
* false.
*/
public final boolean isRegistered() {
- return !canonicalName.startsWith("x-")
- && !canonicalName.startsWith("X-");
+ return !canonicalName.startsWith("x-")
+ && !canonicalName.startsWith("X-");
}
/**
* Returns true if this charset supports encoding, false otherwise.
- *
+ *
* @return true if this charset supports encoding, false otherwise.
*/
public boolean canEncode() {
@@ -647,7 +647,7 @@
* <p>
* The default action in case of decoding errors is
* <code>CodingErrorAction.REPLACE</code>.
- *
+ *
* @param buffer
* the byte buffer containing the content to be decoded.
* @return a character buffer containing the output of the decoding.
@@ -674,7 +674,7 @@
/**
* Compares this charset with the given charset. This comparation is
* based on the case insensitive canonical names of the charsets.
- *
+ *
* @param charset
* the given object to be compared with.
* @return a negative integer if less than the given object, a positive
@@ -693,7 +693,7 @@
/**
* Determines whether this charset equals to the given object. They are
* considered to be equal if they have the same canonical name.
- *
+ *
* @param obj
* the given object to be compared with.
* @return true if they have the same canonical name, otherwise false.
@@ -709,7 +709,7 @@
/**
* Gets the hash code of this charset.
- *
+ *
* @return the hash code of this charset.
*/
@Override
@@ -720,17 +720,17 @@
/**
* Gets a string representation of this charset. Usually this contains the
* canonical name of the charset.
- *
+ *
* @return a string representation of this charset.
*/
@Override
public final String toString() {
- return "Charset[" + this.canonicalName + "]";
+ return "Charset[" + this.canonicalName + "]";
}
/**
* Gets the system default charset from the virtual machine.
- *
+ *
* @return the default charset.
*/
public static Charset defaultCharset() {
@@ -738,13 +738,13 @@
String encoding = AccessController
.doPrivileged(new PrivilegedAction<String>() {
public String run() {
- return System.getProperty("file.encoding");
+ return System.getProperty("file.encoding");
}
});
try {
defaultCharset = Charset.forName(encoding);
} catch (UnsupportedCharsetException e) {
- defaultCharset = Charset.forName("UTF-8");
+ defaultCharset = Charset.forName("UTF-8");
}
return defaultCharset;
}
diff --git a/luni/src/main/java/java/nio/charset/CharsetDecoder.java b/luni/src/main/java/java/nio/charset/CharsetDecoder.java
index 393cad5..d2c9871 100644
--- a/luni/src/main/java/java/nio/charset/CharsetDecoder.java
+++ b/luni/src/main/java/java/nio/charset/CharsetDecoder.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -120,7 +120,7 @@
* <code>Charset</code>, average number and maximum number of characters
* created by this decoder for one input byte, and the default replacement
* string "\uFFFD".
- *
+ *
* @param charset
* the <code>Charset</code> to be used by this decoder.
* @param averageCharsPerByte
@@ -153,7 +153,7 @@
/**
* Gets the average number of characters created by this decoder for a
* single input byte.
- *
+ *
* @return the average number of characters created by this decoder for a
* single input byte.
*/
@@ -163,7 +163,7 @@
/**
* Gets the <code>Charset</code> which this decoder uses.
- *
+ *
* @return the <code>Charset</code> which this decoder uses.
*/
public final Charset charset() {
@@ -422,7 +422,7 @@
* <p>
* Note that some implementations may pre-scan the input buffer and return a
* <code>CoderResult.UNDERFLOW</code> until it receives sufficient input.
- *
+ *
* @param in
* the input buffer.
* @param out
@@ -459,7 +459,7 @@
/**
* Flushes this decoder.
- *
+ *
* This method will call {@link #implFlush(CharBuffer) implFlush}. Some
* decoders may need to write some characters to the output buffer when they
* have read all input bytes; subclasses can override
@@ -504,7 +504,7 @@
* Flushes this decoder. The default implementation does nothing and always
* returns <code>CoderResult.UNDERFLOW</code>; this method can be
* overridden if needed.
- *
+ *
* @param out
* the output buffer.
* @return <code>CoderResult.UNDERFLOW</code> or
@@ -518,7 +518,7 @@
* Notifies that this decoder's <code>CodingErrorAction</code> specified
* for malformed input error has been changed. The default implementation
* does nothing; this method can be overridden if needed.
- *
+ *
* @param newAction
* the new action.
*/
@@ -530,7 +530,7 @@
* Notifies that this decoder's <code>CodingErrorAction</code> specified
* for unmappable character error has been changed. The default
* implementation does nothing; this method can be overridden if needed.
- *
+ *
* @param newAction
* the new action.
*/
@@ -541,7 +541,7 @@
/**
* Notifies that this decoder's replacement has been changed. The default
* implementation does nothing; this method can be overridden if needed.
- *
+ *
* @param newReplacement
* the new replacement string.
*/
@@ -559,7 +559,7 @@
/**
* Indicates whether this decoder implements an auto-detecting charset.
- *
+ *
* @return <code>true</code> if this decoder implements an auto-detecting
* charset.
*/
@@ -586,7 +586,7 @@
* The default implementation always throws an
* <code>UnsupportedOperationException</code>; it should be overridden by
* a subclass if needed.
- *
+ *
* @return <code>true</code> if this decoder has detected a charset.
* @throws UnsupportedOperationException
* if this decoder doesn't implement an auto-detecting charset.
@@ -598,7 +598,7 @@
/**
* Gets this decoder's <code>CodingErrorAction</code> when malformed input
* occurred during the decoding process.
- *
+ *
* @return this decoder's <code>CodingErrorAction</code> when malformed
* input occurred during the decoding process.
*/
@@ -609,7 +609,7 @@
/**
* Gets the maximum number of characters which can be created by this
* decoder for one input byte, must be positive.
- *
+ *
* @return the maximum number of characters which can be created by this
* decoder for one input byte, must be positive.
*/
@@ -619,11 +619,11 @@
/**
* Sets this decoder's action on malformed input errors.
- *
+ *
* This method will call the
* {@link #implOnMalformedInput(CodingErrorAction) implOnMalformedInput}
* method with the given new action as argument.
- *
+ *
* @param newAction
* the new action on malformed input error.
* @return this decoder.
@@ -641,11 +641,11 @@
/**
* Sets this decoder's action on unmappable character errors.
- *
+ *
* This method will call the
* {@link #implOnUnmappableCharacter(CodingErrorAction) implOnUnmappableCharacter}
* method with the given new action as argument.
- *
+ *
* @param newAction
* the new action on unmappable character error.
* @return this decoder.
@@ -664,7 +664,7 @@
/**
* Gets the replacement string, which is never null or empty.
- *
+ *
* @return the replacement string, cannot be null or empty.
*/
public final String replacement() {
@@ -673,12 +673,12 @@
/**
* Sets the new replacement string.
- *
+ *
* This method first checks the given replacement's validity, then changes
* the replacement value, and at last calls the
* {@link #implReplaceWith(String) implReplaceWith} method with the given
* new replacement as argument.
- *
+ *
* @param newReplacement
* the replacement string, cannot be null or empty. Its length
* cannot be larger than {@link #maxCharsPerByte()}.
@@ -703,7 +703,7 @@
* Resets this decoder. This method will reset the internal status, and then
* calls <code>implReset()</code> to reset any status related to the
* specific charset.
- *
+ *
* @return this decoder.
*/
public final CharsetDecoder reset() {
@@ -715,7 +715,7 @@
/**
* Gets this decoder's <code>CodingErrorAction</code> when an unmappable
* character error occurred during the decoding process.
- *
+ *
* @return this decoder's <code>CodingErrorAction</code> when an
* unmappable character error occurred during the decoding process.
*/
diff --git a/luni/src/main/java/java/nio/charset/CharsetEncoder.java b/luni/src/main/java/java/nio/charset/CharsetEncoder.java
index daf2c08..b927672 100644
--- a/luni/src/main/java/java/nio/charset/CharsetEncoder.java
+++ b/luni/src/main/java/java/nio/charset/CharsetEncoder.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -124,7 +124,7 @@
* Constructs a new <code>CharsetEncoder</code> using the given
* <code>Charset</code>, average number and maximum number of bytes
* created by this encoder for one input character.
- *
+ *
* @param cs
* the <code>Charset</code> to be used by this encoder.
* @param averageBytesPerChar
@@ -147,7 +147,7 @@
* Constructs a new <code>CharsetEncoder</code> using the given
* <code>Charset</code>, replacement byte array, average number and
* maximum number of bytes created by this encoder for one input character.
- *
+ *
* @param cs
* the <code>Charset</code> to be used by this encoder.
* @param averageBytesPerChar
@@ -184,7 +184,7 @@
/**
* Gets the average number of bytes created by this encoder for a single
* input character.
- *
+ *
* @return the average number of bytes created by this encoder for a single
* input character.
*/
@@ -239,13 +239,13 @@
/**
* Checks if a given <code>CharSequence</code> can be encoded by this
* encoder.
- *
+ *
* Note that this method can change the internal status of this encoder, so
* it should not be called when another encode process is ongoing, otherwise
* it will throw an <code>IllegalStateException</code>.
- *
+ *
* This method can be overridden for performance improvement.
- *
+ *
* @param sequence
* the given <code>CharSequence</code>.
* @return true if the given <code>CharSequence</code> can be encoded by
@@ -265,7 +265,7 @@
/**
* Gets the <code>Charset</code> which this encoder uses.
- *
+ *
* @return the <code>Charset</code> which this encoder uses.
*/
public final Charset charset() {
@@ -535,7 +535,7 @@
* <p>
* During the flush, the output buffer's position will be changed
* accordingly, while its mark and limit will be intact.
- *
+ *
* @param out
* the given output buffer.
* @return <code>CoderResult.UNDERFLOW</code> or
@@ -544,7 +544,7 @@
* if this encoder hasn't read all input characters during one
* encoding process, which means neither after calling
* {@link #encode(CharBuffer) encode(CharBuffer)} nor after
- * calling {@link #encode(CharBuffer, ByteBuffer, boolean)
+ * calling {@link #encode(CharBuffer, ByteBuffer, boolean)
* encode(CharBuffer, ByteBuffer, boolean)} with {@code true}
* for the last boolean parameter.
*/
@@ -563,7 +563,7 @@
* Flushes this encoder. The default implementation does nothing and always
* returns <code>CoderResult.UNDERFLOW</code>; this method can be
* overridden if needed.
- *
+ *
* @param out
* the output buffer.
* @return <code>CoderResult.UNDERFLOW</code> or
@@ -577,7 +577,7 @@
* Notifies that this encoder's <code>CodingErrorAction</code> specified
* for malformed input error has been changed. The default implementation
* does nothing; this method can be overridden if needed.
- *
+ *
* @param newAction
* the new action.
*/
@@ -589,7 +589,7 @@
* Notifies that this encoder's <code>CodingErrorAction</code> specified
* for unmappable character error has been changed. The default
* implementation does nothing; this method can be overridden if needed.
- *
+ *
* @param newAction
* the new action.
*/
@@ -600,7 +600,7 @@
/**
* Notifies that this encoder's replacement has been changed. The default
* implementation does nothing; this method can be overridden if needed.
- *
+ *
* @param newReplacement
* the new replacement string.
*/
@@ -619,12 +619,12 @@
/**
* Checks if the given argument is legal as this encoder's replacement byte
* array.
- *
+ *
* The given byte array is legal if and only if it can be decode into
* sixteen bits Unicode characters.
- *
+ *
* This method can be overridden for performance improvement.
- *
+ *
* @param repl
* the given byte array to be checked.
* @return true if the the given argument is legal as this encoder's
@@ -651,7 +651,7 @@
/**
* Gets this encoder's <code>CodingErrorAction</code> when a malformed
* input error occurred during the encoding process.
- *
+ *
* @return this encoder's <code>CodingErrorAction</code> when a malformed
* input error occurred during the encoding process.
*/
@@ -662,7 +662,7 @@
/**
* Gets the maximum number of bytes which can be created by this encoder for
* one input character, must be positive.
- *
+ *
* @return the maximum number of bytes which can be created by this encoder
* for one input character, must be positive.
*/
@@ -672,11 +672,11 @@
/**
* Sets this encoder's action on malformed input error.
- *
+ *
* This method will call the
* {@link #implOnMalformedInput(CodingErrorAction) implOnMalformedInput}
* method with the given new action as argument.
- *
+ *
* @param newAction
* the new action on malformed input error.
* @return this encoder.
@@ -694,11 +694,11 @@
/**
* Sets this encoder's action on unmappable character error.
- *
+ *
* This method will call the
* {@link #implOnUnmappableCharacter(CodingErrorAction) implOnUnmappableCharacter}
* method with the given new action as argument.
- *
+ *
* @param newAction
* the new action on unmappable character error.
* @return this encoder.
@@ -716,7 +716,7 @@
/**
* Gets the replacement byte array, which is never null or empty.
- *
+ *
* @return the replacement byte array, cannot be null or empty.
*/
public final byte[] replacement() {
@@ -725,12 +725,12 @@
/**
* Sets the new replacement value.
- *
+ *
* This method first checks the given replacement's validity, then changes
* the replacement value and finally calls the
* {@link #implReplaceWith(byte[]) implReplaceWith} method with the given
* new replacement as argument.
- *
+ *
* @param replacement
* the replacement byte array, cannot be null or empty, its
* length cannot be larger than <code>maxBytesPerChar</code>,
@@ -755,7 +755,7 @@
* Resets this encoder. This method will reset the internal status and then
* calla <code>implReset()</code> to reset any status related to the
* specific charset.
- *
+ *
* @return this encoder.
*/
public final CharsetEncoder reset() {
@@ -767,7 +767,7 @@
/**
* Gets this encoder's <code>CodingErrorAction</code> when unmappable
* character occurred during encoding process.
- *
+ *
* @return this encoder's <code>CodingErrorAction</code> when unmappable
* character occurred during encoding process.
*/
diff --git a/luni/src/main/java/java/nio/charset/CoderMalfunctionError.java b/luni/src/main/java/java/nio/charset/CoderMalfunctionError.java
index b7262a1..d704f58 100644
--- a/luni/src/main/java/java/nio/charset/CoderMalfunctionError.java
+++ b/luni/src/main/java/java/nio/charset/CoderMalfunctionError.java
@@ -31,7 +31,7 @@
/**
* Constructs a new {@code CoderMalfunctionError}.
- *
+ *
* @param ex
* the original exception thrown by the encoder/decoder.
*/
diff --git a/luni/src/main/java/java/nio/charset/CoderResult.java b/luni/src/main/java/java/nio/charset/CoderResult.java
index ab04ff2..8458dfc 100644
--- a/luni/src/main/java/java/nio/charset/CoderResult.java
+++ b/luni/src/main/java/java/nio/charset/CoderResult.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -86,7 +86,7 @@
/**
* Constructs a <code>CoderResult</code> object with its text description.
- *
+ *
* @param type
* the type of this result
* @param length
@@ -101,7 +101,7 @@
/**
* Gets a <code>CoderResult</code> object indicating a malformed-input
* error.
- *
+ *
* @param length
* the length of the malformed-input.
* @return a <code>CoderResult</code> object indicating a malformed-input
@@ -128,7 +128,7 @@
/**
* Gets a <code>CoderResult</code> object indicating an unmappable
* character error.
- *
+ *
* @param length
* the length of the input unit sequence denoting the unmappable
* character.
@@ -155,7 +155,7 @@
/**
* Returns true if this result is an underflow condition.
- *
+ *
* @return true if an underflow, otherwise false.
*/
public boolean isUnderflow() {
@@ -165,7 +165,7 @@
/**
* Returns true if this result represents a malformed-input error or an
* unmappable-character error.
- *
+ *
* @return true if this is a malformed-input error or an
* unmappable-character error, otherwise false.
*/
@@ -176,7 +176,7 @@
/**
* Returns true if this result represents a malformed-input error.
- *
+ *
* @return true if this is a malformed-input error, otherwise false.
*/
public boolean isMalformed() {
@@ -185,7 +185,7 @@
/**
* Returns true if this result is an overflow condition.
- *
+ *
* @return true if this is an overflow, otherwise false.
*/
public boolean isOverflow() {
@@ -194,7 +194,7 @@
/**
* Returns true if this result represents an unmappable-character error.
- *
+ *
* @return true if this is an unmappable-character error, otherwise false.
*/
public boolean isUnmappable() {
@@ -204,7 +204,7 @@
/**
* Gets the length of the erroneous input. The length is only meaningful to
* a malformed-input error or an unmappble character error.
- *
+ *
* @return the length, as an integer, of this object's erroneous input.
* @throws UnsupportedOperationException
* if this result is an overflow or underflow.
@@ -218,7 +218,7 @@
/**
* Throws an exception corresponding to this coder result.
- *
+ *
* @throws BufferUnderflowException
* in case this is an underflow.
* @throws BufferOverflowException
@@ -249,7 +249,7 @@
/**
* Returns a text description of this result.
- *
+ *
* @return a text description of this result.
*/
@Override
@@ -257,24 +257,24 @@
String dsc = null;
switch (this.type) {
case TYPE_UNDERFLOW:
- dsc = "UNDERFLOW error";
+ dsc = "UNDERFLOW error";
break;
case TYPE_OVERFLOW:
- dsc = "OVERFLOW error";
+ dsc = "OVERFLOW error";
break;
case TYPE_UNMAPPABLE_CHAR:
- dsc = "Unmappable-character error with erroneous input length "
+ dsc = "Unmappable-character error with erroneous input length "
+ this.length;
break;
case TYPE_MALFORMED_INPUT:
- dsc = "Malformed-input error with erroneous input length "
+ dsc = "Malformed-input error with erroneous input length "
+ this.length;
break;
default:
- dsc = "";
+ dsc = "";
break;
}
- return "CoderResult[" + dsc + "]";
+ return "CoderResult[" + dsc + "]";
}
diff --git a/luni/src/main/java/java/nio/charset/CodingErrorAction.java b/luni/src/main/java/java/nio/charset/CodingErrorAction.java
index db859d7..d7fb727 100644
--- a/luni/src/main/java/java/nio/charset/CodingErrorAction.java
+++ b/luni/src/main/java/java/nio/charset/CodingErrorAction.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,14 +27,14 @@
* Denotes the action to ignore any errors.
*/
public static final CodingErrorAction IGNORE = new CodingErrorAction(
- "IGNORE");
+ "IGNORE");
/**
* Denotes the action to fill in the output with a replacement character
* when malformed input or an unmappable character is encountered.
*/
public static final CodingErrorAction REPLACE = new CodingErrorAction(
- "REPLACE");
+ "REPLACE");
/**
* Denotes the action to report the encountered error in an appropriate
@@ -42,7 +42,7 @@
* result.
*/
public static final CodingErrorAction REPORT = new CodingErrorAction(
- "REPORT");
+ "REPORT");
// The name of this action
private String action;
@@ -56,11 +56,11 @@
/**
* Returns a text description of this action indication.
- *
+ *
* @return a text description of this action indication.
*/
@Override
public String toString() {
- return "Action: " + this.action;
+ return "Action: " + this.action;
}
}
diff --git a/luni/src/main/java/java/nio/charset/IllegalCharsetNameException.java b/luni/src/main/java/java/nio/charset/IllegalCharsetNameException.java
index d1c71ea..72c04e5 100644
--- a/luni/src/main/java/java/nio/charset/IllegalCharsetNameException.java
+++ b/luni/src/main/java/java/nio/charset/IllegalCharsetNameException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new {@code IllegalCharsetNameException} with the supplied
* charset name.
- *
+ *
* @param charset
* the encountered illegal charset name.
*/
diff --git a/luni/src/main/java/java/nio/charset/MalformedInputException.java b/luni/src/main/java/java/nio/charset/MalformedInputException.java
index aa853bf..8ae7b78 100644
--- a/luni/src/main/java/java/nio/charset/MalformedInputException.java
+++ b/luni/src/main/java/java/nio/charset/MalformedInputException.java
@@ -34,7 +34,7 @@
/**
* Constructs a new {@code MalformedInputException}.
- *
+ *
* @param length
* the length of the malformed input.
*/
@@ -44,7 +44,7 @@
/**
* Gets the length of the malformed input.
- *
+ *
* @return the length of the malformed input.
*/
public int getInputLength() {
diff --git a/luni/src/main/java/java/nio/charset/UnmappableCharacterException.java b/luni/src/main/java/java/nio/charset/UnmappableCharacterException.java
index b929023..93187b5 100644
--- a/luni/src/main/java/java/nio/charset/UnmappableCharacterException.java
+++ b/luni/src/main/java/java/nio/charset/UnmappableCharacterException.java
@@ -34,7 +34,7 @@
/**
* Constructs a new {@code UnmappableCharacterException}.
- *
+ *
* @param length
* the length of the unmappable character.
*/
diff --git a/luni/src/main/java/java/nio/charset/UnsupportedCharsetException.java b/luni/src/main/java/java/nio/charset/UnsupportedCharsetException.java
index 9bfdcfe..d8b5f3e 100644
--- a/luni/src/main/java/java/nio/charset/UnsupportedCharsetException.java
+++ b/luni/src/main/java/java/nio/charset/UnsupportedCharsetException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new {@code UnsupportedCharsetException} with the supplied
* charset name.
- *
+ *
* @param charset
* the encountered unsupported charset name.
*/
@@ -46,7 +46,7 @@
/**
* Gets the encountered unsupported charset name.
- *
+ *
* @return the encountered unsupported charset name.
*/
public String getCharsetName() {
diff --git a/luni/src/main/java/java/nio/charset/spi/CharsetProvider.java b/luni/src/main/java/java/nio/charset/spi/CharsetProvider.java
index c771963..d24bebd 100644
--- a/luni/src/main/java/java/nio/charset/spi/CharsetProvider.java
+++ b/luni/src/main/java/java/nio/charset/spi/CharsetProvider.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,11 +26,11 @@
// The permission required to construct a new provider.
private static final RuntimePermission CONSTRUCT_PERM = new RuntimePermission(
- "charsetProvider");
+ "charsetProvider");
/**
* Constructor for subclassing with concrete types.
- *
+ *
* @throws SecurityException
* if there is a security manager installed that does not permit
* the runtime permission labeled "charsetProvider".
@@ -43,7 +43,7 @@
/**
* Returns an iterator over all the available charsets.
- *
+ *
* @return the iterator.
*/
public abstract Iterator<Charset> charsets();
@@ -53,7 +53,7 @@
* <p>
* If the charset is unavailable the method returns <code>null</code>.
* </p>
- *
+ *
* @param charsetName
* the canonical or alias name of a character set.
* @return the charset, or <code>null</code> if unavailable.
diff --git a/luni/src/main/java/java/security/AccessControlContext.java b/luni/src/main/java/java/security/AccessControlContext.java
index 8efdb27..da46ba6 100644
--- a/luni/src/main/java/java/security/AccessControlContext.java
+++ b/luni/src/main/java/java/security/AccessControlContext.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -61,7 +61,7 @@
* If a {@code SecurityManager} is installed, code calling this constructor
* need the {@code SecurityPermission} {@code createAccessControlContext} to
* be granted, otherwise a {@code SecurityException} will be thrown.
- *
+ *
* @param acc
* the {@code AccessControlContext} related to the given {@code
* DomainCombiner}
@@ -89,7 +89,7 @@
/**
* Constructs a new instance of {@code AccessControlContext} with the
* specified array of {@code ProtectionDomain}s.
- *
+ *
* @param context
* the {@code ProtectionDomain}s that are used to perform access
* checks in the context of this {@code AccessControlContext}
@@ -114,21 +114,21 @@
}
}
if (this.context == null) {
- // Prevent numerous checks for 'context==null'
+ // Prevent numerous checks for 'context==null'
this.context = new ProtectionDomain[0];
}
}
/**
* Package-level ctor which is used in AccessController.<br>
- * ProtectionDomains passed as <code>stack</code> is then passed into
+ * ProtectionDomains passed as <code>stack</code> is then passed into
* {@link #AccessControlContext(ProtectionDomain[])}, therefore:<br>
* <il>
* <li>it must not be null
* <li>duplicates will be removed
* <li>null-s will be removed
* </li>
- *
+ *
* @param stack - array of ProtectionDomains
* @param inherited - inherited context, which may be null
*/
@@ -140,14 +140,14 @@
/**
* Package-level ctor which is used in AccessController.<br>
- * ProtectionDomains passed as <code>stack</code> is then passed into
+ * ProtectionDomains passed as <code>stack</code> is then passed into
* {@link #AccessControlContext(ProtectionDomain[])}, therefore:<br>
* <il>
* <li>it must not be null
* <li>duplicates will be removed
* <li>null-s will be removed
* </li>
- *
+ *
* @param stack - array of ProtectionDomains
* @param combiner - combiner
*/
@@ -175,7 +175,7 @@
* If inherited methods are on the call stack, the protection domains of the
* declaring classes are checked, not the protection domains of the classes
* on which the method is invoked.
- *
+ *
* @param perm
* the permission to check against the policy
* @throws AccessControlException
@@ -206,7 +206,7 @@
* instance of {@code AccessControlContext}, and the two contexts
* encapsulate the same {@code ProtectionDomain}s. The order of the {@code
* ProtectionDomain}s is ignored by this method.
- *
+ *
* @param obj
* object to be compared for equality with this {@code
* AccessControlContext}
@@ -241,7 +241,7 @@
* If a {@code SecurityManager} is installed, code calling this method needs
* the {@code SecurityPermission} {@code getDomainCombiner} to be granted,
* otherwise a {@code SecurityException} will be thrown.
- *
+ *
* @return the {@code DomainCombiner} associated with this {@code
* AccessControlContext}
* @throws SecurityException
@@ -262,7 +262,7 @@
* Returns the same hash code for {@code AccessControlContext}s that are
* equal to each other as required by the general contract of
* {@link Object#hashCode}.
- *
+ *
* @return the hash code value for this {@code AccessControlContext}
* @see Object#equals(Object)
* @see AccessControlContext#equals(Object)
diff --git a/luni/src/main/java/java/security/AccessController.java b/luni/src/main/java/java/security/AccessController.java
index b27ab53..be17b2d 100644
--- a/luni/src/main/java/java/security/AccessController.java
+++ b/luni/src/main/java/java/security/AccessController.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -69,7 +69,7 @@
* If an instance of {@code RuntimeException} is thrown during the execution
* of the {@code PrivilegedAction#run()} method of the given action, it will
* be propagated through this method.
- *
+ *
* @param action
* the action to be executed with privileges
* @return the result of executing the privileged action
@@ -93,7 +93,7 @@
* If an instance of {@code RuntimeException} is thrown during the execution
* of the {@code PrivilegedAction#run()} method of the given action, it will
* be propagated through this method.
- *
+ *
* @param action
* the action to be executed with privileges
* @param context
@@ -124,7 +124,7 @@
* If an instance of {@code RuntimeException} is thrown during the execution
* of the {@code PrivilegedAction#run()} method of the given action, it will
* be propagated through this method.
- *
+ *
* @param action
* the action to be executed with privileges
* @return the result of executing the privileged action
@@ -154,7 +154,7 @@
* If an instance of {@code RuntimeException} is thrown during the execution
* of the {@code PrivilegedAction#run()} method of the given action, it will
* be propagated through this method.
- *
+ *
* @param action
* the action to be executed with privileges
* @param context
@@ -284,7 +284,7 @@
* This method delegates the permission check to
* {@link AccessControlContext#checkPermission(Permission)} on the current
* callers' context obtained by {@link #getContext()}.
- *
+ *
* @param perm
* the permission to check against the policy
* @throws AccessControlException
@@ -292,7 +292,7 @@
* @throws NullPointerException
* if the specified permission is {@code null}
* @see AccessControlContext#checkPermission(Permission)
- *
+ *
*/
public static void checkPermission(Permission perm)
throws AccessControlException {
@@ -319,7 +319,7 @@
* <p>
* The returned context may be used to perform access checks at a later
* point in time, possibly by another thread.
- *
+ *
* @return the {@code AccessControlContext} for the current {@code Thread}
* @see Thread#currentThread
*/
diff --git a/luni/src/main/java/java/security/AlgorithmParameterGenerator.java b/luni/src/main/java/java/security/AlgorithmParameterGenerator.java
index fbe4014..a92951e 100644
--- a/luni/src/main/java/java/security/AlgorithmParameterGenerator.java
+++ b/luni/src/main/java/java/security/AlgorithmParameterGenerator.java
@@ -29,7 +29,7 @@
public class AlgorithmParameterGenerator {
// Store spi service name
- private static final String SERVICE = "AlgorithmParameterGenerator";
+ private static final String SERVICE = "AlgorithmParameterGenerator";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
@@ -77,7 +77,7 @@
/**
* Returns a new instance of {@code AlgorithmParameterGenerator} for the
* specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @return a new instance of {@code AlgorithmParameterGenerator} for the
@@ -90,7 +90,7 @@
public static AlgorithmParameterGenerator getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -103,7 +103,7 @@
/**
* Returns a new instance of {@code AlgorithmParameterGenerator} from the
* specified provider for the specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @param provider
@@ -123,7 +123,7 @@
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
- Messages.getString("security.02"));
+ Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -135,7 +135,7 @@
/**
* Returns a new instance of {@code AlgorithmParameterGenerator} from the
* specified provider for the specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @param provider
@@ -150,10 +150,10 @@
public static AlgorithmParameterGenerator getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/java/security/AlgorithmParameterGeneratorSpi.java b/luni/src/main/java/java/security/AlgorithmParameterGeneratorSpi.java
index 44b3def..40418bc 100644
--- a/luni/src/main/java/java/security/AlgorithmParameterGeneratorSpi.java
+++ b/luni/src/main/java/java/security/AlgorithmParameterGeneratorSpi.java
@@ -22,7 +22,7 @@
/**
* {@code AlgorithmParameterGeneratorSpi} is the Service Provider Interface
* (SPI) definition for {@code AlgorithmParameterGenerator}.
- *
+ *
* @see AlgorithmParameterGenerator
*/
public abstract class AlgorithmParameterGeneratorSpi {
diff --git a/luni/src/main/java/java/security/AlgorithmParameters.java b/luni/src/main/java/java/security/AlgorithmParameters.java
index 4e72acf..255c366 100644
--- a/luni/src/main/java/java/security/AlgorithmParameters.java
+++ b/luni/src/main/java/java/security/AlgorithmParameters.java
@@ -33,7 +33,7 @@
/**
* The service name.
*/
- private static final String SEVICE = "AlgorithmParameters";
+ private static final String SEVICE = "AlgorithmParameters";
/**
* Used to access common engine functionality.
@@ -94,9 +94,9 @@
public static AlgorithmParameters getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
- synchronized (engine) {
+ synchronized (engine) {
engine.getInstance(algorithm, null);
return new AlgorithmParameters((AlgorithmParametersSpi) engine.spi,
engine.provider, algorithm);
@@ -126,11 +126,11 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
- throw new NoSuchProviderException(Messages.getString("security.03",
+ throw new NoSuchProviderException(Messages.getString("security.03",
provider));
}
return getInstance(algorithm, p);
@@ -156,10 +156,10 @@
public static AlgorithmParameters getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
@@ -201,7 +201,7 @@
throws InvalidParameterSpecException {
if (initialized) {
throw new InvalidParameterSpecException(
- Messages.getString("security.1E"));
+ Messages.getString("security.1E"));
}
spiImpl.engineInit(paramSpec);
initialized = true;
@@ -220,7 +220,7 @@
*/
public final void init(byte[] params) throws IOException {
if (initialized) {
- throw new IOException(Messages.getString("security.1E"));
+ throw new IOException(Messages.getString("security.1E"));
}
spiImpl.engineInit(params);
initialized = true;
@@ -240,7 +240,7 @@
*/
public final void init(byte[] params, String format) throws IOException {
if (initialized) {
- throw new IOException(Messages.getString("security.1E"));
+ throw new IOException(Messages.getString("security.1E"));
}
spiImpl.engineInit(params, format);
initialized = true;
@@ -264,7 +264,7 @@
throws InvalidParameterSpecException {
if (!initialized) {
throw new InvalidParameterSpecException(
- Messages.getString("security.1F"));
+ Messages.getString("security.1F"));
}
return spiImpl.engineGetParameterSpec(paramSpec);
}
@@ -280,7 +280,7 @@
*/
public final byte[] getEncoded() throws IOException {
if (!initialized) {
- throw new IOException(Messages.getString("security.1F"));
+ throw new IOException(Messages.getString("security.1F"));
}
return spiImpl.engineGetEncoded();
}
@@ -298,7 +298,7 @@
*/
public final byte[] getEncoded(String format) throws IOException {
if (!initialized) {
- throw new IOException(Messages.getString("security.1F"));
+ throw new IOException(Messages.getString("security.1F"));
}
return spiImpl.engineGetEncoded(format);
}
diff --git a/luni/src/main/java/java/security/AlgorithmParametersSpi.java b/luni/src/main/java/java/security/AlgorithmParametersSpi.java
index 41b30bc..7e43b58 100644
--- a/luni/src/main/java/java/security/AlgorithmParametersSpi.java
+++ b/luni/src/main/java/java/security/AlgorithmParametersSpi.java
@@ -24,7 +24,7 @@
/**
* {@code AlgorithmParametersSpi} is the Service Provider Interface (SPI)
* definition for {@code AlgorithmParameters}.
- *
+ *
* @see AlgorithmParameters
*/
public abstract class AlgorithmParametersSpi {
diff --git a/luni/src/main/java/java/security/AllPermission.java b/luni/src/main/java/java/security/AllPermission.java
index 492c5ae..1d2841d 100644
--- a/luni/src/main/java/java/security/AllPermission.java
+++ b/luni/src/main/java/java/security/AllPermission.java
@@ -31,10 +31,10 @@
private static final long serialVersionUID = -2916474571451318075L;
// Permission name
- private static final String ALL_PERMISSIONS = "<all permissions>";
+ private static final String ALL_PERMISSIONS = "<all permissions>";
// Actions name
- private static final String ALL_ACTIONS = "<all actions>";
+ private static final String ALL_ACTIONS = "<all actions>";
/**
* Constructs a new instance of {@code AllPermission}. The two argument
diff --git a/luni/src/main/java/java/security/AllPermissionCollection.java b/luni/src/main/java/java/security/AllPermissionCollection.java
index 00822ee..adbd81f 100644
--- a/luni/src/main/java/java/security/AllPermissionCollection.java
+++ b/luni/src/main/java/java/security/AllPermissionCollection.java
@@ -30,7 +30,7 @@
* Specific {@code PermissionCollection} for storing {@code AllPermission}s. All
* instances of {@code AllPermission} are equivalent, so it is enough to store a
* single added instance.
- *
+ *
* @see AllPermission
*/
final class AllPermissionCollection extends PermissionCollection {
@@ -38,7 +38,7 @@
private static final long serialVersionUID = -4023755556366636806L;
private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField(
- "all_allowed", Boolean.TYPE), };
+ "all_allowed", Boolean.TYPE), };
// Single element of collection.
private transient Permission all;
@@ -49,10 +49,10 @@
@Override
public void add(Permission permission) {
if (isReadOnly()) {
- throw new SecurityException(Messages.getString("security.15"));
+ throw new SecurityException(Messages.getString("security.15"));
}
if (!(permission instanceof AllPermission)) {
- throw new IllegalArgumentException(Messages.getString("security.16",
+ throw new IllegalArgumentException(Messages.getString("security.16",
permission));
}
all = permission;
@@ -68,7 +68,7 @@
/**
* An auxiliary implementation for enumerating a single object.
- *
+ *
*/
final static class SingletonEnumeration<E> implements Enumeration<E> {
@@ -94,7 +94,7 @@
*/
public E nextElement() {
if (element == null) {
- throw new NoSuchElementException(Messages.getString("security.17"));
+ throw new NoSuchElementException(Messages.getString("security.17"));
}
E last = element;
element = null;
@@ -105,7 +105,7 @@
/**
* Indicates whether the argument permission is implied by the receiver.
* {@code AllPermission} objects imply all other permissions.
- *
+ *
* @return boolean {@code true} if the argument permission is implied by the
* receiver, and {@code false} if it is not.
* @param permission
@@ -123,7 +123,7 @@
*/
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
- fields.put("all_allowed", all != null);
+ fields.put("all_allowed", all != null);
out.writeFields();
}
@@ -133,7 +133,7 @@
private void readObject(java.io.ObjectInputStream in) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
- if (fields.get("all_allowed", false)) {
+ if (fields.get("all_allowed", false)) {
all = new AllPermission();
}
}
diff --git a/luni/src/main/java/java/security/AuthProvider.java b/luni/src/main/java/java/security/AuthProvider.java
index 15324b3..70dd842 100644
--- a/luni/src/main/java/java/security/AuthProvider.java
+++ b/luni/src/main/java/java/security/AuthProvider.java
@@ -35,7 +35,7 @@
/**
* Constructs a new instance of {@code AuthProvider} with its name, version
* and description.
- *
+ *
* @param name
* the name of the provider.
* @param version
@@ -44,9 +44,9 @@
* a description of the provider.
*/
protected AuthProvider(String name, double version, String info) {
- super(name, version, info);
+ super(name, version, info);
}
-
+
/**
* Performs a login into this {@code AuthProvider}. The specified {@code
* CallbackHandler} is used to obtain information from the caller.
@@ -55,7 +55,7 @@
* the {@code SecurityPermission} {@code authProvider.NAME} (where NAME is
* the provider name) to be granted, otherwise a {@code SecurityException}
* will be thrown.
- *
+ *
* @param subject
* the subject that is used to login.
* @param handler
@@ -68,7 +68,7 @@
* not have permission to invoke this method.
*/
public abstract void login(Subject subject, CallbackHandler handler) throws LoginException;
-
+
/**
* Performs a logout from this {@code AuthProvider}.
* <p>
@@ -84,7 +84,7 @@
* not have permission to invoke this method.
*/
public abstract void logout() throws LoginException;
-
+
/**
* Sets the {@code CallbackHandler} to this {@code AuthProvider}. If no
* handler is passed to the {@link #login(Subject, CallbackHandler)} method,
diff --git a/luni/src/main/java/java/security/BasicPermission.java b/luni/src/main/java/java/security/BasicPermission.java
index 75812e5..b7b6093 100644
--- a/luni/src/main/java/java/security/BasicPermission.java
+++ b/luni/src/main/java/java/security/BasicPermission.java
@@ -31,7 +31,7 @@
* naming convention. Asterisk '*' can be used as wildcards. Either by itself,
* matching anything, or at the end of the name, immediately preceded by a '.'.
* For example:
- *
+ *
* <pre>
* java.io.* grants all permissions under the java.io permission hierarchy
* * grants all permissions
@@ -80,13 +80,13 @@
/**
* Checks name parameter
- */
+ */
private final void checkName(String name) {
if (name == null) {
- throw new NullPointerException(Messages.getString("security.28"));
+ throw new NullPointerException(Messages.getString("security.28"));
}
if (name.length() == 0) {
- throw new IllegalArgumentException(Messages.getString("security.29"));
+ throw new IllegalArgumentException(Messages.getString("security.29"));
}
}
@@ -138,7 +138,7 @@
*/
@Override
public String getActions() {
- return "";
+ return "";
}
/**
diff --git a/luni/src/main/java/java/security/BasicPermissionCollection.java b/luni/src/main/java/java/security/BasicPermissionCollection.java
index f6a4291..69218a5 100644
--- a/luni/src/main/java/java/security/BasicPermissionCollection.java
+++ b/luni/src/main/java/java/security/BasicPermissionCollection.java
@@ -34,7 +34,7 @@
/**
* Specific {@code PermissionCollection} for storing {@code BasicPermissions} of
* arbitrary type.
- *
+ *
* @see BasicPermission
* @see PermissionCollection
*/
@@ -43,9 +43,9 @@
private static final long serialVersionUID = 739301742472979399L;
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("all_allowed", Boolean.TYPE),
- new ObjectStreamField("permissions", Hashtable.class),
- new ObjectStreamField("permClass", Class.class), };
+ new ObjectStreamField("all_allowed", Boolean.TYPE),
+ new ObjectStreamField("permissions", Hashtable.class),
+ new ObjectStreamField("permClass", Class.class), };
//should be final, but because of writeObject() cannot be
private transient Map<String, Permission> items = new HashMap<String, Permission>();
@@ -59,32 +59,32 @@
* Adds a permission to the collection. The first added permission must be a
* subclass of BasicPermission, next permissions must be of the same class
* as the first one.
- *
+ *
* @see java.security.PermissionCollection#add(java.security.Permission)
*/
@Override
public void add(Permission permission) {
if (isReadOnly()) {
- throw new SecurityException(Messages.getString("security.15"));
+ throw new SecurityException(Messages.getString("security.15"));
}
if (permission == null) {
- throw new IllegalArgumentException(Messages.getString("security.20"));
+ throw new IllegalArgumentException(Messages.getString("security.20"));
}
Class<? extends Permission> inClass = permission.getClass();
if (permClass != null) {
if (permClass != inClass) {
- throw new IllegalArgumentException(Messages.getString("security.16",
+ throw new IllegalArgumentException(Messages.getString("security.16",
permission));
}
} else if( !(permission instanceof BasicPermission)) {
- throw new IllegalArgumentException(Messages.getString("security.16",
+ throw new IllegalArgumentException(Messages.getString("security.16",
permission));
- } else {
+ } else {
// this is the first element provided that another thread did not add
synchronized (this) {
if (permClass != null && inClass != permClass) {
- throw new IllegalArgumentException(Messages.getString("security.16",
+ throw new IllegalArgumentException(Messages.getString("security.16",
permission));
}
permClass = inClass;
@@ -106,7 +106,7 @@
/**
* Indicates whether the argument permission is implied by the receiver.
- *
+ *
* @return boolean {@code true} if the argument permission is implied by the
* receiver, and {@code false} if it is not.
* @param permission
@@ -127,18 +127,18 @@
return true;
}
//now check if there are suitable wildcards
- //suppose we have "a.b.c", let's check "a.b.*" and "a.*"
+ //suppose we have "a.b.c", let's check "a.b.*" and "a.*"
char[] name = checkName.toCharArray();
- //I presume that "a.b.*" does not imply "a.b."
- //so the dot at end is ignored
- int pos = name.length - 2;
+ //I presume that "a.b.*" does not imply "a.b."
+ //so the dot at end is ignored
+ int pos = name.length - 2;
for (; pos >= 0; pos--) {
if (name[pos] == '.') {
break;
}
}
while (pos >= 0) {
- name[pos + 1] = '*';
+ name[pos + 1] = '*';
if (items.containsKey(new String(name, 0, pos + 2))) {
return true;
}
@@ -169,9 +169,9 @@
*/
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
- fields.put("all_allowed", allEnabled);
- fields.put("permissions", new Hashtable<String, Permission>(items));
- fields.put("permClass", permClass);
+ fields.put("all_allowed", allEnabled);
+ fields.put("permissions", new Hashtable<String, Permission>(items));
+ fields.put("permClass", permClass);
out.writeFields();
}
@@ -185,17 +185,17 @@
items = new HashMap<String, Permission>();
synchronized (this) {
- permClass = (Class<? extends Permission>)fields.get("permClass", null);
+ permClass = (Class<? extends Permission>)fields.get("permClass", null);
items.putAll((Hashtable<String, Permission>) fields.get(
- "permissions", new Hashtable<String, Permission>()));
+ "permissions", new Hashtable<String, Permission>()));
for (Iterator<Permission> iter = items.values().iterator(); iter.hasNext();) {
if (iter.next().getClass() != permClass) {
- throw new InvalidObjectException(Messages.getString("security.24"));
+ throw new InvalidObjectException(Messages.getString("security.24"));
}
}
- allEnabled = fields.get("all_allowed", false);
- if (allEnabled && !items.containsKey("*")) {
- throw new InvalidObjectException(Messages.getString("security.25"));
+ allEnabled = fields.get("all_allowed", false);
+ if (allEnabled && !items.containsKey("*")) {
+ throw new InvalidObjectException(Messages.getString("security.25"));
}
}
}
diff --git a/luni/src/main/java/java/security/Certificate.java b/luni/src/main/java/java/security/Certificate.java
index b30352d..afec0d3 100644
--- a/luni/src/main/java/java/security/Certificate.java
+++ b/luni/src/main/java/java/security/Certificate.java
@@ -26,7 +26,7 @@
* Note: A {@code Certificate} instances does not make any statement about the
* validity of itself. It's in the responsibility of the application to verify
* the validity of its certificates.
- *
+ *
* @deprecated Replaced by behavior in {@link java.security.cert}
* @see java.security.cert.Certificate
*/
diff --git a/luni/src/main/java/java/security/CodeSigner.java b/luni/src/main/java/java/security/CodeSigner.java
index 492c171..2b56a31 100644
--- a/luni/src/main/java/java/security/CodeSigner.java
+++ b/luni/src/main/java/java/security/CodeSigner.java
@@ -49,7 +49,7 @@
*/
public CodeSigner(CertPath signerCertPath, Timestamp timestamp) {
if (signerCertPath == null) {
- throw new NullPointerException(Messages.getString("security.10"));
+ throw new NullPointerException(Messages.getString("security.10"));
}
this.signerCertPath = signerCertPath;
this.timestamp = timestamp;
@@ -131,13 +131,13 @@
public String toString() {
// There is no any special reason for '256' here, it's taken abruptly
StringBuilder buf = new StringBuilder(256);
- // The javadoc says nothing, and the others implementations behavior seems as
+ // The javadoc says nothing, and the others implementations behavior seems as
// dumping only the first certificate. Well, let's do the same.
- buf.append("CodeSigner [").append(signerCertPath.getCertificates().get(0));
+ buf.append("CodeSigner [").append(signerCertPath.getCertificates().get(0));
if( timestamp != null ) {
- buf.append("; ").append(timestamp);
+ buf.append("; ").append(timestamp);
}
- buf.append("]");
+ buf.append("]");
return buf.toString();
}
}
diff --git a/luni/src/main/java/java/security/CodeSource.java b/luni/src/main/java/java/security/CodeSource.java
index 392c3bd..b5fc492 100644
--- a/luni/src/main/java/java/security/CodeSource.java
+++ b/luni/src/main/java/java/security/CodeSource.java
@@ -64,7 +64,7 @@
// Need to cache it for better performance.
private transient SocketPermission sp;
- // Cached factory used to build CertPath-s in <code>getCodeSigners()</code>.
+ // Cached factory used to build CertPath-s in <code>getCodeSigners()</code>.
private transient CertificateFactory factory;
/**
@@ -141,7 +141,7 @@
return false;
}
- // do not use this.certs, as we also need to take care about
+ // do not use this.certs, as we also need to take care about
// CodeSigners' certificates
Certificate[] thizCerts = getCertificatesNoClone();
Certificate[] thatCerts = that.getCertificatesNoClone();
@@ -175,11 +175,11 @@
return tmp;
}
- // Acts exactly as {@link #getCertificates()} does, but does not clone the
+ // Acts exactly as {@link #getCertificates()} does, but does not clone the
// array before returning (and returns reference to <code>this.certs</code>
// if this array is not null).<br>
- // @return a reference to the certificates array, or null if there are no
- // certificates associated.
+ // @return a reference to the certificates array, or null if there are no
+ // certificates associated.
private Certificate[] getCertificatesNoClone() {
if (certs != null) {
return certs;
@@ -228,9 +228,9 @@
// the lowest certs first; the CAs are at the last
//
// So the following loop scans trough the certs and checks
- // that every next certificate is an Issuer of the previous one.
- // Any certificate that is not an Issuer of the previous one starts a
- // new chain (== a new CertPath)
+ // that every next certificate is an Issuer of the previous one.
+ // Any certificate that is not an Issuer of the previous one starts a
+ // new chain (== a new CertPath)
for (int i = 0; i < certs.length; i++) {
if (!(certs[i] instanceof X509Certificate)) {
@@ -245,7 +245,7 @@
} else {
X500Principal subj = x509.getSubjectX500Principal();
if (!prevIssuer.equals(subj)) {
- // Ok, this ends the previous chain,
+ // Ok, this ends the previous chain,
// so transform this one into CertPath ...
CertPath cpath = makeCertPath(list);
if (cpath != null) {
@@ -275,13 +275,13 @@
return tmp;
}
- // Makes an CertPath from a given List of X509Certificate-s.
+ // Makes an CertPath from a given List of X509Certificate-s.
// @param list
- // @return CertPath, or null if CertPath cannot be made
+ // @return CertPath, or null if CertPath cannot be made
private CertPath makeCertPath(List<? extends Certificate> list) {
if (factory == null) {
try {
- factory = CertificateFactory.getInstance("X.509");
+ factory = CertificateFactory.getInstance("X.509");
} catch (CertificateException ex) {
//? throw new Error("X.509 is a 'must be'", ex);
return null;
@@ -390,7 +390,7 @@
*/
public boolean implies(CodeSource cs) {
//
- // Here, javadoc:N refers to the appropriate item in the API spec for
+ // Here, javadoc:N refers to the appropriate item in the API spec for
// the CodeSource.implies()
// The info was taken from the 1.5 final API spec
@@ -400,9 +400,9 @@
}
// javadoc:2
- // with a comment: the javadoc says only about certificates and does
+ // with a comment: the javadoc says only about certificates and does
// not explicitly mention CodeSigners' certs.
- // It seems more convenient to use getCerts() to get the real
+ // It seems more convenient to use getCerts() to get the real
// certificates - with a certificates got form the signers
Certificate[] thizCerts = getCertificatesNoClone();
if (thizCerts != null) {
@@ -435,44 +435,44 @@
return false;
}
- // 1. According to the spec, an empty string will be considered
+ // 1. According to the spec, an empty string will be considered
// as "localhost" in the SocketPermission
// 2. 'file://' URLs will have an empty getHost()
- // so, let's make a special processing of localhost-s, I do
- // believe this'll improve performance of file:// code sources
+ // so, let's make a special processing of localhost-s, I do
+ // believe this'll improve performance of file:// code sources
//
// Don't have to evaluate both the boolean-s each time.
// It's better to evaluate them directly under if() statement.
- //
+ //
// boolean thisIsLocalHost = thisHost.length() == 0 || "localhost".equals(thisHost);
// boolean thatIsLocalHost = thatHost.length() == 0 || "localhost".equals(thatHost);
- //
+ //
// if( !(thisIsLocalHost && thatIsLocalHost) &&
// !thisHost.equals(thatHost)) {
- if (!((thisHost.length() == 0 || "localhost".equals(thisHost)) && (thatHost
- .length() == 0 || "localhost".equals(thatHost)))
+ if (!((thisHost.length() == 0 || "localhost".equals(thisHost)) && (thatHost
+ .length() == 0 || "localhost".equals(thatHost)))
&& !thisHost.equals(thatHost)) {
// Obvious, but very slow way....
- //
+ //
// SocketPermission thisPerm = new SocketPermission(
// this.location.getHost(), "resolve");
// SocketPermission thatPerm = new SocketPermission(
// cs.location.getHost(), "resolve");
- // if (!thisPerm.implies(thatPerm)) {
+ // if (!thisPerm.implies(thatPerm)) {
// return false;
// }
//
- // let's cache it:
+ // let's cache it:
if (this.sp == null) {
- this.sp = new SocketPermission(thisHost, "resolve");
+ this.sp = new SocketPermission(thisHost, "resolve");
}
if (cs.sp == null) {
- cs.sp = new SocketPermission(thatHost, "resolve");
+ cs.sp = new SocketPermission(thatHost, "resolve");
}
if (!this.sp.implies(cs.sp)) {
@@ -492,25 +492,25 @@
String thisFile = this.location.getFile();
String thatFile = cs.location.getFile();
- if (thisFile.endsWith("/-")) { //javadoc:3.6."/-"
+ if (thisFile.endsWith("/-")) { //javadoc:3.6."/-"
if (!thatFile.startsWith(thisFile.substring(0, thisFile
.length() - 2))) {
return false;
}
- } else if (thisFile.endsWith("/*")) { //javadoc:3.6."/*"
+ } else if (thisFile.endsWith("/*")) { //javadoc:3.6."/*"
if (!thatFile.startsWith(thisFile.substring(0, thisFile
.length() - 2))) {
return false;
}
// no further separators(s) allowed
- if (thatFile.indexOf("/", thisFile.length() - 1) != -1) {
+ if (thatFile.indexOf("/", thisFile.length() - 1) != -1) {
return false;
}
} else {
// javadoc:3.6."/"
if (!thisFile.equals(thatFile)) {
- if (!thisFile.endsWith("/")) {
- if (!thatFile.equals(thisFile + "/")) {
+ if (!thisFile.endsWith("/")) {
+ if (!thatFile.equals(thisFile + "/")) {
return false;
}
} else {
@@ -525,12 +525,12 @@
return false;
}
}
- // ok, every check was made, and they all were successful.
+ // ok, every check was made, and they all were successful.
// it's ok to return true.
} // if this.location != null
- // javadoc: a note about CodeSource with null location and null Certs
- // is applicable here
+ // javadoc: a note about CodeSource with null location and null Certs
+ // is applicable here
return true;
}
@@ -544,24 +544,24 @@
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
- buf.append("CodeSource, url=");
- buf.append(location == null ? "<null>" : location.toString());
+ buf.append("CodeSource, url=");
+ buf.append(location == null ? "<null>" : location.toString());
if (certs == null) {
- buf.append(", <no certificates>");
+ buf.append(", <no certificates>");
} else {
- buf.append("\nCertificates [\n");
+ buf.append("\nCertificates [\n");
for (int i = 0; i < certs.length; i++) {
- buf.append(i + 1).append(") ").append(certs[i]).append("\n");
+ buf.append(i + 1).append(") ").append(certs[i]).append("\n");
}
- buf.append("]\n");
+ buf.append("]\n");
}
if (signers != null) {
- buf.append("\nCodeSigners [\n");
+ buf.append("\nCodeSigners [\n");
for (int i = 0; i < signers.length; i++) {
- buf.append(i + 1).append(") ").append(signers[i]).append("\n");
+ buf.append(i + 1).append(") ").append(signers[i]).append("\n");
}
- buf.append("]\n");
+ buf.append("]\n");
}
return buf.toString();
}
@@ -583,7 +583,7 @@
oos.write(data);
} catch (CertificateEncodingException ex) {
throw (IOException) new IOException(
- Messages.getString("security.18")).initCause(ex);
+ Messages.getString("security.18")).initCause(ex);
}
}
}
@@ -594,9 +594,9 @@
private void readObject(ObjectInputStream ois) throws IOException,
ClassNotFoundException {
-
+
ois.defaultReadObject();
-
+
int certsCount = ois.readInt();
certs = null;
if (certsCount != 0) {
@@ -608,7 +608,7 @@
factory = CertificateFactory.getInstance(type);
} catch (CertificateException ex) {
throw new ClassNotFoundException(
- Messages.getString("security.19", type),
+ Messages.getString("security.19", type),
ex);
}
int dataLen = ois.readInt();
@@ -619,7 +619,7 @@
certs[i] = factory.generateCertificate(bais);
} catch (CertificateException ex) {
throw (IOException) new IOException(
- Messages.getString("security.1A")).initCause(ex);
+ Messages.getString("security.1A")).initCause(ex);
}
}
}
diff --git a/luni/src/main/java/java/security/DigestInputStream.java b/luni/src/main/java/java/security/DigestInputStream.java
index 480239a..5b9dc7f 100644
--- a/luni/src/main/java/java/security/DigestInputStream.java
+++ b/luni/src/main/java/java/security/DigestInputStream.java
@@ -145,7 +145,7 @@
*/
@Override
public String toString() {
- return super.toString() + ", " + digest.toString() +
- (isOn ? ", is on" : ", is off");
+ return super.toString() + ", " + digest.toString() +
+ (isOn ? ", is on" : ", is off");
}
}
diff --git a/luni/src/main/java/java/security/DigestOutputStream.java b/luni/src/main/java/java/security/DigestOutputStream.java
index 014a413..e587e65 100644
--- a/luni/src/main/java/java/security/DigestOutputStream.java
+++ b/luni/src/main/java/java/security/DigestOutputStream.java
@@ -130,7 +130,7 @@
*/
@Override
public String toString() {
- return super.toString() + ", " + digest.toString() +
- (isOn ? ", is on" : ", is off");
+ return super.toString() + ", " + digest.toString() +
+ (isOn ? ", is on" : ", is off");
}
}
diff --git a/luni/src/main/java/java/security/DomainCombiner.java b/luni/src/main/java/java/security/DomainCombiner.java
index 36433b3..520ad93 100644
--- a/luni/src/main/java/java/security/DomainCombiner.java
+++ b/luni/src/main/java/java/security/DomainCombiner.java
@@ -20,7 +20,7 @@
/**
* {@code DomainCombiner} is used to update and optimize {@code
* ProtectionDomain}s from an {@code AccessControlContext}.
- *
+ *
* @see AccessControlContext
* @see AccessControlContext#AccessControlContext(AccessControlContext,
* DomainCombiner)
diff --git a/luni/src/main/java/java/security/Identity.java b/luni/src/main/java/java/security/Identity.java
index 12da304..900134e 100644
--- a/luni/src/main/java/java/security/Identity.java
+++ b/luni/src/main/java/java/security/Identity.java
@@ -38,7 +38,7 @@
private PublicKey publicKey;
- private String info = "no additional info";
+ private String info = "no additional info";
private IdentityScope scope;
@@ -100,12 +100,12 @@
throws KeyManagementException {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("addIdentityCertificate");
+ sm.checkSecurityAccess("addIdentityCertificate");
}
PublicKey certPK = certificate.getPublicKey();
if (publicKey != null) {
if (!checkKeysEqual(publicKey, certPK)) {
- throw new KeyManagementException(Messages.getString("security.13"));
+ throw new KeyManagementException(Messages.getString("security.13"));
}
} else {
publicKey = certPK;
@@ -117,7 +117,7 @@
}
-
+
private static boolean checkKeysEqual(PublicKey pk1, PublicKey pk2) {
// first, they should have the same format
@@ -138,7 +138,7 @@
}
-
+
/**
* Removes the specified {@code Certificate} from this {@code Identity}.
@@ -160,7 +160,7 @@
throws KeyManagementException {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("removeIdentityCertificate");
+ sm.checkSecurityAccess("removeIdentityCertificate");
}
if (certificates != null) {
// BEGIN android-added
@@ -173,7 +173,7 @@
}
-
+
/**
* Returns the certificates for this {@code Identity}. External
@@ -192,7 +192,7 @@
}
-
+
/**
* Compares the specified {@code Identity} with this {@code Identity} for
@@ -220,7 +220,7 @@
}
-
+
/**
* Returns a string containing a concise, human-readable description of the
@@ -233,13 +233,13 @@
public String toString(boolean detailed) {
String s = toString();
if (detailed) {
- s += " " + info;
+ s += " " + info;
}
return s;
}
-
+
/**
* Returns the {@code IdentityScope} of this {@code Identity}.
@@ -251,7 +251,7 @@
}
-
+
/**
* Sets the specified {@code PublicKey} to this {@code Identity}.
@@ -272,14 +272,14 @@
public void setPublicKey(PublicKey key) throws KeyManagementException {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("setIdentityPublicKey");
+ sm.checkSecurityAccess("setIdentityPublicKey");
}
- // this check does not always work
+ // this check does not always work
if ((scope != null) && (key != null)) {
Identity i = scope.getIdentity(key);
//System.out.println("###DEBUG## Identity: "+i);
if ((i != null) && (i != this)) {
- throw new KeyManagementException(Messages.getString("security.14"));
+ throw new KeyManagementException(Messages.getString("security.14"));
}
}
this.publicKey = key;
@@ -287,7 +287,7 @@
}
-
+
/**
* Returns the {@code PublicKey} associated with this {@code Identity}.
@@ -299,7 +299,7 @@
}
-
+
/**
* Sets an information string for this {@code Identity}.
@@ -317,13 +317,13 @@
public void setInfo(String info) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("setIdentityInfo");
+ sm.checkSecurityAccess("setIdentityInfo");
}
this.info = info;
}
-
+
/**
* Returns the information string of this {@code Identity}.
@@ -335,7 +335,7 @@
}
-
+
/**
* Compares the specified object with this {@code Identity} for equality and
@@ -366,7 +366,7 @@
}
-
+
/**
* Returns the name of this {@code Identity}.
@@ -378,7 +378,7 @@
}
-
+
/**
* Returns the hash code value for this {@code Identity}. Returns the same
@@ -402,7 +402,7 @@
}
-
+
/**
* Returns a string containing a concise, human-readable description of the
diff --git a/luni/src/main/java/java/security/IdentityScope.java b/luni/src/main/java/java/security/IdentityScope.java
index 10a1ab1..e5acc96 100644
--- a/luni/src/main/java/java/security/IdentityScope.java
+++ b/luni/src/main/java/java/security/IdentityScope.java
@@ -75,15 +75,15 @@
* @return the system's scope.
*/
public static IdentityScope getSystemScope() {
- /*
+ /*
* Test shows that the implementation class name is read from security property
* "system.scope", and the class is only loaded from boot classpath. No default
- * implementation as fallback, i.e., return null if fails to init an instance.
+ * implementation as fallback, i.e., return null if fails to init an instance.
*/
if (systemScope == null) {
String className = AccessController.doPrivileged(new PrivilegedAction<String>(){
public String run() {
- return Security.getProperty("system.scope");
+ return Security.getProperty("system.scope");
}
});
if(className != null){
@@ -106,7 +106,7 @@
protected static void setSystemScope(IdentityScope scope) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("setSystemScope");
+ sm.checkSecurityAccess("setSystemScope");
}
systemScope = scope;
}
@@ -197,6 +197,6 @@
@Override
public String toString() {
return new StringBuilder(super.toString())
- .append("[").append(size()).append("]").toString();
+ .append("[").append(size()).append("]").toString();
}
}
diff --git a/luni/src/main/java/java/security/Key.java b/luni/src/main/java/java/security/Key.java
index 28d24ff..1ff4629 100644
--- a/luni/src/main/java/java/security/Key.java
+++ b/luni/src/main/java/java/security/Key.java
@@ -21,7 +21,7 @@
/**
* {@code Key} is the common interface for all keys.
- *
+ *
* @see PublicKey
* @see PrivateKey
*/
@@ -35,7 +35,7 @@
/**
* Returns the name of the algorithm of this key. If the algorithm is
* unknown, {@code null} is returned.
- *
+ *
* @return the name of the algorithm of this key or {@code null} if the
* algorithm is unknown.
*/
@@ -44,7 +44,7 @@
/**
* Returns the name of the format used to encode this key, or {@code null}
* if it can not be encoded.
- *
+ *
* @return the name of the format used to encode this key, or {@code null}
* if it can not be encoded.
*/
@@ -53,7 +53,7 @@
/**
* Returns the encoded form of this key, or {@code null} if encoding is not
* supported by this key.
- *
+ *
* @return the encoded form of this key, or {@code null} if encoding is not
* supported by this key.
*/
diff --git a/luni/src/main/java/java/security/KeyFactory.java b/luni/src/main/java/java/security/KeyFactory.java
index 7a736ea..ca077d0 100644
--- a/luni/src/main/java/java/security/KeyFactory.java
+++ b/luni/src/main/java/java/security/KeyFactory.java
@@ -31,25 +31,25 @@
*/
public class KeyFactory {
// The service name.
- private static final String SERVICE = "KeyFactory";
-
+ private static final String SERVICE = "KeyFactory";
+
// The provider
private Provider provider;
-
-
+
+
// Used to access common engine functionality
static private Engine engine = new Engine(SERVICE);
-
+
// The SPI implementation.
- private KeyFactorySpi spiImpl;
-
+ private KeyFactorySpi spiImpl;
+
// The algorithm.
private String algorithm;
/**
* Constructs a new instance of {@code KeyFactory} with the specified
* arguments.
- *
+ *
* @param keyFacSpi
* the concrete key factory service.
* @param provider
@@ -57,7 +57,7 @@
* @param algorithm
* the algorithm to use.
*/
- protected KeyFactory(KeyFactorySpi keyFacSpi,
+ protected KeyFactory(KeyFactorySpi keyFacSpi,
Provider provider,
String algorithm) {
this.provider = provider;
@@ -68,7 +68,7 @@
/**
* Returns a new instance of {@code KeyFactory} that utilizes the specified
* algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @return a new instance of {@code KeyFactory} that utilizes the specified
@@ -79,7 +79,7 @@
public static KeyFactory getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -90,7 +90,7 @@
/**
* Returns a new instance of {@code KeyFactory} that utilizes the specified
* algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @param provider
@@ -114,13 +114,13 @@
if (p == null) {
throw new NoSuchProviderException(Messages.getString("security.03", provider));
}
- return getInstance(algorithm, p);
+ return getInstance(algorithm, p);
}
/**
* Returns a new instance of {@code KeyFactory} that utilizes the specified
* algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @param provider
@@ -133,10 +133,10 @@
public static KeyFactory getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
@@ -146,7 +146,7 @@
/**
* Returns the provider associated with this {@code KeyFactory}.
- *
+ *
* @return the provider associated with this {@code KeyFactory}.
*/
public final Provider getProvider() {
@@ -156,7 +156,7 @@
/**
* Returns the name of the algorithm associated with this {@code
* KeyFactory}.
- *
+ *
* @return the name of the algorithm associated with this {@code
* KeyFactory}.
*/
@@ -167,7 +167,7 @@
/**
* Generates a instance of {@code PublicKey} from the given key
* specification.
- *
+ *
* @param keySpec
* the specification of the public key
* @return the public key
@@ -182,7 +182,7 @@
/**
* Generates a instance of {@code PrivateKey} from the given key
* specification.
- *
+ *
* @param keySpec
* the specification of the private key.
* @return the private key.
@@ -196,7 +196,7 @@
/**
* Returns the key specification for the specified key.
- *
+ *
* @param key
* the key from which the specification is requested.
* @param keySpec
@@ -214,7 +214,7 @@
/**
* Translates the given key into a key from this key factory.
- *
+ *
* @param key
* the key to translate.
* @return the translated key.
diff --git a/luni/src/main/java/java/security/KeyFactorySpi.java b/luni/src/main/java/java/security/KeyFactorySpi.java
index 0de00b2..31bdfb1 100644
--- a/luni/src/main/java/java/security/KeyFactorySpi.java
+++ b/luni/src/main/java/java/security/KeyFactorySpi.java
@@ -23,28 +23,28 @@
/**
* {@code KeyFactorySpi} is the Service Provider Interface (SPI) definition for
* {@link KeyFactory}.
- *
+ *
* @see KeyFactory
*/
public abstract class KeyFactorySpi {
-
+
/**
* Generates a instance of {@code PublicKey} from the given key
* specification.
- *
+ *
* @param keySpec
* the specification of the public key.
* @return the public key.
* @throws InvalidKeySpecException
* if the specified {@code keySpec} is invalid.
*/
- protected abstract PublicKey engineGeneratePublic(KeySpec keySpec)
+ protected abstract PublicKey engineGeneratePublic(KeySpec keySpec)
throws InvalidKeySpecException;
-
+
/**
* Generates a instance of {@code PrivateKey} from the given key
* specification.
- *
+ *
* @param keySpec
* the specification of the private key.
* @return the private key.
@@ -53,10 +53,10 @@
*/
protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
throws InvalidKeySpecException;
-
+
/**
* Returns the key specification for the specified key.
- *
+ *
* @param key
* the key from which the specification is requested.
* @param keySpec
@@ -69,10 +69,10 @@
protected abstract <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec)
throws InvalidKeySpecException;
//FIXME 1.5 signature: protected abstract <T extends KeySpec> T engineGetKeySpec(Key key, Class<T> keySpec) throws InvalidKeySpecException
-
+
/**
* Translates the given key into a key from this key factory.
- *
+ *
* @param key
* the key to translate.
* @return the translated key.
diff --git a/luni/src/main/java/java/security/KeyPair.java b/luni/src/main/java/java/security/KeyPair.java
index b86593b..cf6ebd2 100644
--- a/luni/src/main/java/java/security/KeyPair.java
+++ b/luni/src/main/java/java/security/KeyPair.java
@@ -22,7 +22,7 @@
/**
* {@code KeyPair} is a container for a public key and a private key. Since the
* private key can be accessed, instances must be treated like a private key.
- *
+ *
* @see PrivateKey
* @see PublicKey
*/
diff --git a/luni/src/main/java/java/security/KeyPairGenerator.java b/luni/src/main/java/java/security/KeyPairGenerator.java
index 48a7684..24f270d 100644
--- a/luni/src/main/java/java/security/KeyPairGenerator.java
+++ b/luni/src/main/java/java/security/KeyPairGenerator.java
@@ -33,7 +33,7 @@
public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
// Store KeyPairGenerator SERVICE name
- private static final String SERVICE = "KeyPairGenerator";
+ private static final String SERVICE = "KeyPairGenerator";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
@@ -70,7 +70,7 @@
/**
* Returns a new instance of {@code KeyPairGenerator} that utilizes the
* specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @return a new instance of {@code KeyPairGenerator} that utilizes the
@@ -82,7 +82,7 @@
public static KeyPairGenerator getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
KeyPairGenerator result;
synchronized (engine) {
@@ -102,7 +102,7 @@
/**
* Returns a new instance of {@code KeyPairGenerator} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @param provider
@@ -118,7 +118,7 @@
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
- Messages.getString("security.02"));
+ Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -130,7 +130,7 @@
/**
* Returns a new instance of {@code KeyPairGenerator} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @param provider
@@ -144,10 +144,10 @@
public static KeyPairGenerator getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
KeyPairGenerator result;
synchronized (engine) {
@@ -255,16 +255,16 @@
}
/**
- *
+ *
* Internal class: KeyPairGenerator implementation
- *
+ *
*/
private static class KeyPairGeneratorImpl extends KeyPairGenerator {
// Save KeyPairGeneratorSpi
private KeyPairGeneratorSpi spiImpl;
// Implementation of KeyPaiGenerator constructor
- //
+ //
// @param KeyPairGeneratorSpi
// @param provider
// @param algorithm
diff --git a/luni/src/main/java/java/security/KeyPairGeneratorSpi.java b/luni/src/main/java/java/security/KeyPairGeneratorSpi.java
index 0aff849..81b093c 100644
--- a/luni/src/main/java/java/security/KeyPairGeneratorSpi.java
+++ b/luni/src/main/java/java/security/KeyPairGeneratorSpi.java
@@ -24,7 +24,7 @@
/**
* {@code KeyPairGeneratorSpi} is the Service Provider Interface (SPI)
* definition for {@link KeyPairGenerator}.
- *
+ *
* @see KeyPairGenerator
*/
public abstract class KeyPairGeneratorSpi {
@@ -66,6 +66,6 @@
*/
public void initialize(AlgorithmParameterSpec params, SecureRandom random)
throws InvalidAlgorithmParameterException {
- throw new UnsupportedOperationException(Messages.getString("security.2E"));
+ throw new UnsupportedOperationException(Messages.getString("security.2E"));
}
}
diff --git a/luni/src/main/java/java/security/KeyRep.java b/luni/src/main/java/java/security/KeyRep.java
index e90d46f..d9bf2f4 100644
--- a/luni/src/main/java/java/security/KeyRep.java
+++ b/luni/src/main/java/java/security/KeyRep.java
@@ -71,16 +71,16 @@
this.format = format;
this.encoded = encoded;
if(this.type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
if(this.algorithm == null) {
- throw new NullPointerException(Messages.getString("security.08"));
+ throw new NullPointerException(Messages.getString("security.08"));
}
if(this.format == null) {
- throw new NullPointerException(Messages.getString("security.09"));
+ throw new NullPointerException(Messages.getString("security.09"));
}
if(this.encoded == null) {
- throw new NullPointerException(Messages.getString("security.0A"));
+ throw new NullPointerException(Messages.getString("security.0A"));
}
}
@@ -108,50 +108,50 @@
protected Object readResolve() throws ObjectStreamException {
switch (type) {
case SECRET:
- if ("RAW".equals(format)) {
+ if ("RAW".equals(format)) {
try {
return new SecretKeySpec(encoded, algorithm);
} catch (IllegalArgumentException e) {
throw new NotSerializableException(
- Messages.getString("security.0B", e));
+ Messages.getString("security.0B", e));
}
}
throw new NotSerializableException(
- Messages.getString("security.0C", type, format));
+ Messages.getString("security.0C", type, format));
case PUBLIC:
- if ("X.509".equals(format)) {
+ if ("X.509".equals(format)) {
try {
KeyFactory kf = KeyFactory.getInstance(algorithm);
return kf.generatePublic(new X509EncodedKeySpec(encoded));
} catch (NoSuchAlgorithmException e) {
throw new NotSerializableException(
- Messages.getString("security.0D", e));
+ Messages.getString("security.0D", e));
}
catch (InvalidKeySpecException e) {
throw new NotSerializableException(
- Messages.getString("security.0D", e));
+ Messages.getString("security.0D", e));
}
}
throw new NotSerializableException(
- Messages.getString("security.0C", type, format));
+ Messages.getString("security.0C", type, format));
case PRIVATE:
- if ("PKCS#8".equals(format)) {
+ if ("PKCS#8".equals(format)) {
try {
KeyFactory kf = KeyFactory.getInstance(algorithm);
return kf.generatePrivate(new PKCS8EncodedKeySpec(encoded));
} catch (NoSuchAlgorithmException e) {
throw new NotSerializableException(
- Messages.getString("security.0D", e));
+ Messages.getString("security.0D", e));
}
catch (InvalidKeySpecException e) {
throw new NotSerializableException(
- Messages.getString("security.0D", e));
+ Messages.getString("security.0D", e));
}
}
throw new NotSerializableException(
- Messages.getString("security.0C", type, format));
+ Messages.getString("security.0C", type, format));
}
- throw new NotSerializableException(Messages.getString("security.0E", type));
+ throw new NotSerializableException(Messages.getString("security.0E", type));
}
// Makes defensive copy of key encoding
@@ -160,7 +160,7 @@
is.defaultReadObject();
byte[] new_encoded = new byte[encoded.length];
System.arraycopy(encoded, 0, new_encoded, 0, new_encoded.length);
- encoded = new_encoded;
+ encoded = new_encoded;
}
/**
diff --git a/luni/src/main/java/java/security/KeyStore.java b/luni/src/main/java/java/security/KeyStore.java
index 7816405..27bae20 100644
--- a/luni/src/main/java/java/security/KeyStore.java
+++ b/luni/src/main/java/java/security/KeyStore.java
@@ -52,16 +52,16 @@
public class KeyStore {
// Store KeyStore SERVICE name
- private static final String SERVICE = "KeyStore";
+ private static final String SERVICE = "KeyStore";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
// Store KeyStore property name
- private static final String PROPERTYNAME = "keystore.type";
+ private static final String PROPERTYNAME = "keystore.type";
// Store default KeyStore type
- private static final String DEFAULT_KEYSTORE_TYPE = "jks";
+ private static final String DEFAULT_KEYSTORE_TYPE = "jks";
// Message to report about non-initialized key store object
// BEGIN android-changed
@@ -103,7 +103,7 @@
*/
private static void throwNotInitialized() throws KeyStoreException {
if (NOTINITKEYSTORE == null) {
- NOTINITKEYSTORE = Messages.getString("security.4F");
+ NOTINITKEYSTORE = Messages.getString("security.4F");
}
throw new KeyStoreException(NOTINITKEYSTORE);
}
@@ -124,7 +124,7 @@
*/
public static KeyStore getInstance(String type) throws KeyStoreException {
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
synchronized (engine) {
try {
@@ -161,7 +161,7 @@
public static KeyStore getInstance(String type, String provider)
throws KeyStoreException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -198,10 +198,10 @@
throws KeyStoreException {
// check parameters
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
// return KeyStore instance
synchronized (engine) {
@@ -373,7 +373,7 @@
if (null != key && key instanceof PrivateKey
&& (chain == null || chain.length == 0)) {
throw new IllegalArgumentException(Messages
- .getString("security.52"));
+ .getString("security.52"));
}
implSpi.engineSetKeyEntry(alias, key, password, chain);
}
@@ -457,7 +457,7 @@
// END android-changed
}
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
implSpi.engineDeleteEntry(alias);
}
@@ -498,7 +498,7 @@
// END android-changed
}
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
return implSpi.engineContainsAlias(alias);
}
@@ -538,7 +538,7 @@
// END android-changed
}
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
return implSpi.engineIsKeyEntry(alias);
}
@@ -564,7 +564,7 @@
// END android-changed
}
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
return implSpi.engineIsCertificateEntry(alias);
}
@@ -724,7 +724,7 @@
throws NoSuchAlgorithmException, UnrecoverableEntryException,
KeyStoreException {
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
if (!isInit) {
// BEGIN android-changed
@@ -761,10 +761,10 @@
// END android-changed
}
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
if (entry == null) {
- throw new NullPointerException(Messages.getString("security.39"));
+ throw new NullPointerException(Messages.getString("security.39"));
}
implSpi.engineSetEntry(alias, entry, param);
}
@@ -782,14 +782,14 @@
* @throws KeyStoreException
* if this {@code KeyStore} is not initialized.
*/
- public final boolean entryInstanceOf(String alias,
+ public final boolean entryInstanceOf(String alias,
Class<? extends KeyStore.Entry> entryClass)
throws KeyStoreException {
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
if (entryClass == null) {
- throw new NullPointerException(Messages.getString("security.40"));
+ throw new NullPointerException(Messages.getString("security.40"));
}
if (!isInit) {
@@ -860,10 +860,10 @@
public static Builder newInstance(KeyStore keyStore,
ProtectionParameter protectionParameter) {
if (keyStore == null) {
- throw new NullPointerException(Messages.getString("security.41"));
+ throw new NullPointerException(Messages.getString("security.41"));
}
if (protectionParameter == null) {
- throw new NullPointerException(Messages.getString("security.42"));
+ throw new NullPointerException(Messages.getString("security.42"));
}
if (!keyStore.isInit) {
@@ -907,26 +907,26 @@
File file, ProtectionParameter protectionParameter) {
// check null parameters
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
if (protectionParameter == null) {
- throw new NullPointerException(Messages.getString("security.42"));
+ throw new NullPointerException(Messages.getString("security.42"));
}
if (file == null) {
- throw new NullPointerException(Messages.getString("security.43"));
+ throw new NullPointerException(Messages.getString("security.43"));
}
// protection parameter should be PasswordProtection or
// CallbackHandlerProtection
if (!(protectionParameter instanceof PasswordProtection)
&& !(protectionParameter instanceof CallbackHandlerProtection)) {
- throw new IllegalArgumentException(Messages.getString("security.35"));
+ throw new IllegalArgumentException(Messages.getString("security.35"));
}
// check file parameter
if (!file.exists()) {
- throw new IllegalArgumentException(Messages.getString("security.44", file.getName()));
+ throw new IllegalArgumentException(Messages.getString("security.44", file.getName()));
}
if (!file.isFile()) {
- throw new IllegalArgumentException(Messages.getString("security.45", file.getName()));
+ throw new IllegalArgumentException(Messages.getString("security.45", file.getName()));
}
// create new instance
return new BuilderImpl(null, protectionParameter, file,
@@ -963,10 +963,10 @@
public static Builder newInstance(String type, Provider provider,
ProtectionParameter protectionParameter) {
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
if (protectionParameter == null) {
- throw new NullPointerException(Messages.getString("security.42"));
+ throw new NullPointerException(Messages.getString("security.42"));
}
return new BuilderImpl(null, protectionParameter, null,
type, provider, AccessController.getContext());
@@ -974,9 +974,9 @@
/*
* This class is implementation of abstract class KeyStore.Builder
- *
+ *
* @author Vera Petrashkova
- *
+ *
*/
private static class BuilderImpl extends Builder {
// Store used KeyStore
@@ -1025,14 +1025,14 @@
// Implementation of abstract getKeyStore() method If
// KeyStoreBuilder encapsulates KeyStore object then this object is
// returned
- //
+ //
// If KeyStoreBuilder encapsulates KeyStore type and provider then
// KeyStore is created using these parameters. If KeyStoreBuilder
// encapsulates file and ProtectionParameter then KeyStore data are
// loaded from FileInputStream that is created on file. If file is
// not defined then KeyStore object is initialized with null
// InputStream and null password.
- //
+ //
// Result KeyStore object is returned.
//
@Override
@@ -1067,7 +1067,7 @@
passwd = KeyStoreSpi
.getPasswordFromCallBack(protParameter);
} else {
- throw new KeyStoreException(Messages.getString("security.35"));
+ throw new KeyStoreException(Messages.getString("security.35"));
}
// load KeyStore from file
@@ -1082,7 +1082,7 @@
} finally {
// close file input stream
if( fis != null ) {
- fis.close();
+ fis.close();
}
}
} else {
@@ -1093,7 +1093,7 @@
}
}, accControlContext);
-
+
isGetKeyStore = true;
return ks;
} catch (KeyStoreException e) {
@@ -1108,7 +1108,7 @@
//
// This is implementation of abstract method
// getProtectionParameter(String alias)
- //
+ //
// Return: ProtectionParameter to get Entry which was saved in
// KeyStore with defined alias
//
@@ -1116,10 +1116,10 @@
public synchronized ProtectionParameter getProtectionParameter(
String alias) throws KeyStoreException {
if (alias == null) {
- throw new NullPointerException(Messages.getString("security.3F"));
+ throw new NullPointerException(Messages.getString("security.3F"));
}
if (!isGetKeyStore) {
- throw new IllegalStateException(Messages.getString("security.46"));
+ throw new IllegalStateException(Messages.getString("security.46"));
}
return protParameter;
}
@@ -1170,7 +1170,7 @@
*/
public CallbackHandlerProtection(CallbackHandler handler) {
if (handler == null) {
- throw new NullPointerException(Messages.getString("security.47"));
+ throw new NullPointerException(Messages.getString("security.47"));
}
this.callbackHandler = handler;
}
@@ -1245,7 +1245,7 @@
*/
public synchronized char[] getPassword() {
if (isDestroyed) {
- throw new IllegalStateException(Messages.getString("security.36"));
+ throw new IllegalStateException(Messages.getString("security.36"));
}
return password;
}
@@ -1313,27 +1313,27 @@
*/
public PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain) {
if (privateKey == null) {
- throw new NullPointerException(Messages.getString("security.48"));
+ throw new NullPointerException(Messages.getString("security.48"));
}
if (chain == null) {
- throw new NullPointerException(Messages.getString("security.49"));
+ throw new NullPointerException(Messages.getString("security.49"));
}
if (chain.length == 0) {
- throw new IllegalArgumentException(Messages.getString("security.4A"));
+ throw new IllegalArgumentException(Messages.getString("security.4A"));
}
// Match algorithm of private key and algorithm of public key from
// the end certificate
String s = chain[0].getType();
if (!(chain[0].getPublicKey().getAlgorithm()).equals(privateKey
.getAlgorithm())) {
- throw new IllegalArgumentException(Messages.getString("security.4B"));
+ throw new IllegalArgumentException(Messages.getString("security.4B"));
}
// Match certificate types
for (int i = 1; i < chain.length; i++) {
if (!s.equals(chain[i].getType())) {
throw new IllegalArgumentException(
- Messages.getString("security.4C"));
+ Messages.getString("security.4C"));
}
}
// clone chain - this.chain = (Certificate[])chain.clone();
@@ -1345,7 +1345,7 @@
break;
}
}
-
+
if(isAllX509Certificates){
this.chain = new X509Certificate[chain.length];
}
@@ -1392,12 +1392,12 @@
@Override
public String toString() {
StringBuilder sb = new StringBuilder(
- "PrivateKeyEntry: number of elements in certificate chain is ");
+ "PrivateKeyEntry: number of elements in certificate chain is ");
sb.append(Integer.toString(chain.length));
- sb.append("\n");
+ sb.append("\n");
for (int i = 0; i < chain.length; i++) {
sb.append(chain[i].toString());
- sb.append("\n");
+ sb.append("\n");
}
return sb.toString();
}
@@ -1423,7 +1423,7 @@
*/
public SecretKeyEntry(SecretKey secretKey) {
if (secretKey == null) {
- throw new NullPointerException(Messages.getString("security.4D"));
+ throw new NullPointerException(Messages.getString("security.4D"));
}
this.secretKey = secretKey;
}
@@ -1446,7 +1446,7 @@
*/
@Override
public String toString() {
- StringBuilder sb = new StringBuilder("SecretKeyEntry: algorithm - ");
+ StringBuilder sb = new StringBuilder("SecretKeyEntry: algorithm - ");
sb.append(secretKey.getAlgorithm());
return sb.toString();
}
@@ -1472,7 +1472,7 @@
*/
public TrustedCertificateEntry(Certificate trustCertificate) {
if (trustCertificate == null) {
- throw new NullPointerException(Messages.getString("security.4E"));
+ throw new NullPointerException(Messages.getString("security.4E"));
}
this.trustCertificate = trustCertificate;
}
@@ -1495,7 +1495,7 @@
*/
@Override
public String toString() {
- return "Trusted certificate entry:\n" + trustCertificate;
+ return "Trusted certificate entry:\n" + trustCertificate;
}
}
}
diff --git a/luni/src/main/java/java/security/KeyStoreException.java b/luni/src/main/java/java/security/KeyStoreException.java
index 4327f7f..ef9869b 100644
--- a/luni/src/main/java/java/security/KeyStoreException.java
+++ b/luni/src/main/java/java/security/KeyStoreException.java
@@ -19,7 +19,7 @@
/**
* {@code KeyStoreException} is a general {@code KeyStore} exception.
- *
+ *
* @see KeyStore
*/
public class KeyStoreException extends GeneralSecurityException {
diff --git a/luni/src/main/java/java/security/KeyStoreSpi.java b/luni/src/main/java/java/security/KeyStoreSpi.java
index 42928cd..ffee714 100644
--- a/luni/src/main/java/java/security/KeyStoreSpi.java
+++ b/luni/src/main/java/java/security/KeyStoreSpi.java
@@ -255,7 +255,7 @@
*/
public void engineStore(KeyStore.LoadStoreParameter param)
throws IOException, NoSuchAlgorithmException, CertificateException {
- throw new UnsupportedOperationException(Messages.getString("security.33"));
+ throw new UnsupportedOperationException(Messages.getString("security.33"));
}
/**
@@ -323,7 +323,7 @@
}
}
throw new UnsupportedOperationException(
- Messages.getString("security.35"));
+ Messages.getString("security.35"));
}
/**
@@ -361,13 +361,13 @@
passW = ((KeyStore.PasswordProtection) protParam)
.getPassword();
} catch (IllegalStateException ee) {
- throw new KeyStoreException(Messages.getString("security.36"), ee);
+ throw new KeyStoreException(Messages.getString("security.36"), ee);
}
} else if (protParam instanceof KeyStore.CallbackHandlerProtection) {
passW = getPasswordFromCallBack(protParam);
} else {
throw new UnrecoverableEntryException(
- Messages.getString("security.37",
+ Messages.getString("security.37",
protParam.toString()));
}
}
@@ -385,7 +385,7 @@
throw new KeyStoreException(e);
}
}
- throw new NoSuchAlgorithmException(Messages.getString("security.38"));
+ throw new NoSuchAlgorithmException(Messages.getString("security.38"));
}
/**
@@ -407,7 +407,7 @@
public void engineSetEntry(String alias, KeyStore.Entry entry,
KeyStore.ProtectionParameter protParam) throws KeyStoreException {
if (entry == null) {
- throw new KeyStoreException(Messages.getString("security.39"));
+ throw new KeyStoreException(Messages.getString("security.39"));
}
if (engineContainsAlias(alias)) {
@@ -425,7 +425,7 @@
try {
passW = ((KeyStore.PasswordProtection) protParam).getPassword();
} catch (IllegalStateException ee) {
- throw new KeyStoreException(Messages.getString("security.36"), ee);
+ throw new KeyStoreException(Messages.getString("security.36"), ee);
}
} else {
if (protParam instanceof KeyStore.CallbackHandlerProtection) {
@@ -436,7 +436,7 @@
}
} else {
throw new KeyStoreException(
- Messages.getString("security.3A"));
+ Messages.getString("security.3A"));
}
}
@@ -455,7 +455,7 @@
}
throw new KeyStoreException(
- Messages.getString("security.3B", entry.toString()));
+ Messages.getString("security.3B", entry.toString()));
}
/**
@@ -479,17 +479,17 @@
if (engineIsCertificateEntry(alias)) {
return entryClass
.isAssignableFrom(Class
- .forName("java.security.KeyStore$TrustedCertificateEntry"));
+ .forName("java.security.KeyStore$TrustedCertificateEntry"));
}
if (engineIsKeyEntry(alias)) {
if (entryClass.isAssignableFrom(Class
- .forName("java.security.KeyStore$PrivateKeyEntry"))) {
+ .forName("java.security.KeyStore$PrivateKeyEntry"))) {
return engineGetCertificate(alias) != null;
}
if (entryClass.isAssignableFrom(Class
- .forName("java.security.KeyStore$SecretKeyEntry"))) {
+ .forName("java.security.KeyStore$SecretKeyEntry"))) {
return engineGetCertificate(alias) == null;
}
}
@@ -512,21 +512,21 @@
if (!(protParam instanceof KeyStore.CallbackHandlerProtection)) {
throw new UnrecoverableEntryException(
- Messages.getString("security.3C"));
+ Messages.getString("security.3C"));
}
String clName = Security
- .getProperty("auth.login.defaultCallbackHandler");
+ .getProperty("auth.login.defaultCallbackHandler");
if (clName == null) {
throw new UnrecoverableEntryException(
- Messages.getString("security.3D"));
+ Messages.getString("security.3D"));
}
try {
Class<?> cl = Class.forName(clName);
CallbackHandler cbHand = (CallbackHandler) cl.newInstance();
- PasswordCallback[] pwCb = { new PasswordCallback("password: ", true) };
+ PasswordCallback[] pwCb = { new PasswordCallback("password: ", true) };
cbHand.handle(pwCb);
return pwCb[0].getPassword();
} catch (Exception e) {
diff --git a/luni/src/main/java/java/security/MessageDigest.java b/luni/src/main/java/java/security/MessageDigest.java
index a8a4121..3d3b9a2 100644
--- a/luni/src/main/java/java/security/MessageDigest.java
+++ b/luni/src/main/java/java/security/MessageDigest.java
@@ -32,7 +32,7 @@
public abstract class MessageDigest extends MessageDigestSpi {
// The service name
- private static final String SERVICE = "MessageDigest";
+ private static final String SERVICE = "MessageDigest";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
@@ -46,7 +46,7 @@
/**
* Constructs a new instance of {@code MessageDigest} with the name of
* the algorithm to use.
- *
+ *
* @param algorithm
* the name of algorithm to use
*/
@@ -57,7 +57,7 @@
/**
* Returns a new instance of {@code MessageDigest} that utilizes the
* specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @return a new instance of {@code MessageDigest} that utilizes the
@@ -70,7 +70,7 @@
public static MessageDigest getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
MessageDigest result;
synchronized (engine) {
@@ -89,7 +89,7 @@
/**
* Returns a new instance of {@code MessageDigest} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @param provider
@@ -107,12 +107,12 @@
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(Messages
- .getString("security.02"));
+ .getString("security.02"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
throw new NoSuchProviderException(Messages.getString(
- "security.03", provider));
+ "security.03", provider));
}
return getInstance(algorithm, p);
}
@@ -120,7 +120,7 @@
/**
* Returns a new instance of {@code MessageDigest} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use
* @param provider
@@ -136,10 +136,10 @@
throws NoSuchAlgorithmException {
if (provider == null) {
throw new IllegalArgumentException(Messages
- .getString("security.04"));
+ .getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
MessageDigest result;
synchronized (engine) {
@@ -166,7 +166,7 @@
/**
* Updates this {@code MessageDigest} using the given {@code byte}.
- *
+ *
* @param arg0
* the {@code byte} to update this {@code MessageDigest} with
* @see #reset()
@@ -177,7 +177,7 @@
/**
* Updates this {@code MessageDigest} using the given {@code byte[]}.
- *
+ *
* @param input
* the {@code byte} array
* @param offset
@@ -195,14 +195,14 @@
// see HARMONY-1120 for details
(long) offset + (long) len > input.length) {
throw new IllegalArgumentException(Messages
- .getString("security.05"));
+ .getString("security.05"));
}
engineUpdate(input, offset, len);
}
/**
* Updates this {@code MessageDigest} using the given {@code byte[]}.
- *
+ *
* @param input
* the {@code byte} array
* @throws NullPointerException
@@ -210,7 +210,7 @@
*/
public void update(byte[] input) {
if (input == null) {
- throw new NullPointerException(Messages.getString("security.06"));
+ throw new NullPointerException(Messages.getString("security.06"));
}
engineUpdate(input, 0, input.length);
}
@@ -218,7 +218,7 @@
/**
* Computes and returns the final hash value for this {@link MessageDigest}.
* After the digest is computed the receiver is reset.
- *
+ *
* @return the computed one way hash value
* @see #reset
*/
@@ -229,7 +229,7 @@
/**
* Computes and stores the final hash value for this {@link MessageDigest}.
* After the digest is computed the receiver is reset.
- *
+ *
* @param buf
* the buffer to store the result
* @param offset
@@ -251,7 +251,7 @@
// see HARMONY-1148 for details
(long) offset + (long) len > buf.length) {
throw new IllegalArgumentException(Messages
- .getString("security.05"));
+ .getString("security.05"));
}
return engineDigest(buf, offset, len);
}
@@ -260,7 +260,7 @@
* Performs the final update and then computes and returns the final hash
* value for this {@link MessageDigest}. After the digest is computed the
* receiver is reset.
- *
+ *
* @param input
* the {@code byte} array
* @return the computed one way hash value
@@ -274,18 +274,18 @@
/**
* Returns a string containing a concise, human-readable description of this
* {@code MessageDigest} including the name of its algorithm.
- *
+ *
* @return a printable representation for this {@code MessageDigest}
*/
@Override
public String toString() {
- return "MESSAGE DIGEST " + algorithm;
+ return "MESSAGE DIGEST " + algorithm;
}
/**
* Indicates whether to digest are equal by performing a simply
* byte-per-byte compare of the two digests.
- *
+ *
* @param digesta
* the first digest to be compared
* @param digestb
@@ -306,7 +306,7 @@
/**
* Returns the name of the algorithm of this {@code MessageDigest}.
- *
+ *
* @return the name of the algorithm of this {@code MessageDigest}
*/
public final String getAlgorithm() {
@@ -315,7 +315,7 @@
/**
* Returns the provider associated with this {@code MessageDigest}.
- *
+ *
* @return the provider associated with this {@code MessageDigest}
*/
public final Provider getProvider() {
@@ -326,7 +326,7 @@
* Returns the engine digest length in bytes. If the implementation does not
* implement this function or is not an instance of {@code Cloneable},
* {@code 0} is returned.
- *
+ *
* @return the digest length in bytes, or {@code 0}
*/
public final int getDigestLength() {
@@ -355,7 +355,7 @@
/**
* Updates this {@code MessageDigest} using the given {@code input}.
- *
+ *
* @param input
* the {@code ByteBuffer}
*/
@@ -364,9 +364,9 @@
}
/**
- *
+ *
* The internal MessageDigest implementation
- *
+ *
*/
private static class MessageDigestImpl extends MessageDigest {
@@ -418,7 +418,7 @@
MessageDigestSpi spi = (MessageDigestSpi) spiImpl.clone();
return new MessageDigestImpl(spi, getProvider(), getAlgorithm());
}
-
+
throw new CloneNotSupportedException();
}
}
diff --git a/luni/src/main/java/java/security/MessageDigestSpi.java b/luni/src/main/java/java/security/MessageDigestSpi.java
index ded232b..6210595 100644
--- a/luni/src/main/java/java/security/MessageDigestSpi.java
+++ b/luni/src/main/java/java/security/MessageDigestSpi.java
@@ -26,33 +26,33 @@
* for {@link MessageDigest}. Examples of digest algorithms are MD5 and SHA. A
* digest is a secure one way hash function for a stream of bytes. It acts like
* a fingerprint for a stream of bytes.
- *
+ *
* @see MessageDigest
*/
public abstract class MessageDigestSpi {
-
+
/**
* Returns the engine digest length in bytes. If the implementation does not
* implement this function {@code 0} is returned.
- *
+ *
* @return the digest length in bytes, or {@code 0}.
*/
protected int engineGetDigestLength() {
return 0;
}
-
+
/**
* Updates this {@code MessageDigestSpi} using the given {@code byte}.
- *
+ *
* @param input
* the {@code byte} to update this {@code MessageDigestSpi} with.
* @see #engineReset()
*/
protected abstract void engineUpdate(byte input);
-
+
/**
* Updates this {@code MessageDigestSpi} using the given {@code byte[]}.
- *
+ *
* @param input
* the {@code byte} array.
* @param offset
@@ -64,10 +64,10 @@
* {@code input}.
*/
protected abstract void engineUpdate(byte[] input, int offset, int len);
-
+
/**
* Updates this {@code MessageDigestSpi} using the given {@code input}.
- *
+ *
* @param input
* the {@code ByteBuffer}.
*/
@@ -87,24 +87,24 @@
tmp = new byte[input.limit() - input.position()];
input.get(tmp);
engineUpdate(tmp, 0, tmp.length);
- }
+ }
}
-
+
/**
* Computes and returns the final hash value for this
* {@link MessageDigestSpi}. After the digest is computed the receiver is
* reset.
- *
+ *
* @return the computed one way hash value.
* @see #engineReset()
*/
protected abstract byte[] engineDigest();
-
+
/**
* Computes and stores the final hash value for this
* {@link MessageDigestSpi}. After the digest is computed the receiver is
* reset.
- *
+ *
* @param buf
* the buffer to store the result in.
* @param offset
@@ -123,30 +123,30 @@
throws DigestException {
if (len < engineGetDigestLength()) {
engineReset();
- throw new DigestException(Messages.getString("security.1B"));
+ throw new DigestException(Messages.getString("security.1B"));
}
if (offset < 0) {
engineReset();
- throw new DigestException(Messages.getString("security.1C"));
+ throw new DigestException(Messages.getString("security.1C"));
}
if (offset + len > buf.length) {
engineReset();
- throw new DigestException(Messages.getString("security.1D"));
+ throw new DigestException(Messages.getString("security.1D"));
}
byte tmp[] = engineDigest();
if (len < tmp.length) {
- throw new DigestException(Messages.getString("security.1B"));
+ throw new DigestException(Messages.getString("security.1B"));
}
System.arraycopy(tmp, 0, buf, offset, tmp.length);
- return tmp.length;
+ return tmp.length;
}
-
+
/**
* Puts this {@code MessageDigestSpi} back in an initial state, such that it
* is ready to compute a one way hash value.
*/
protected abstract void engineReset();
-
+
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
diff --git a/luni/src/main/java/java/security/Permission.java b/luni/src/main/java/java/security/Permission.java
index 5d698a4..60a5c7e 100644
--- a/luni/src/main/java/java/security/Permission.java
+++ b/luni/src/main/java/java/security/Permission.java
@@ -154,8 +154,8 @@
@Override
public String toString() {
String actions = getActions();
- actions = (actions == null || actions.length() == 0) ? "" : " "
+ actions = (actions == null || actions.length() == 0) ? "" : " "
+ getActions();
- return "(" + getClass().getName() + " " + getName() + actions + ")";
+ return "(" + getClass().getName() + " " + getName() + actions + ")";
}
}
diff --git a/luni/src/main/java/java/security/PermissionCollection.java b/luni/src/main/java/java/security/PermissionCollection.java
index 1e4ab98..4677034 100644
--- a/luni/src/main/java/java/security/PermissionCollection.java
+++ b/luni/src/main/java/java/security/PermissionCollection.java
@@ -43,7 +43,7 @@
/**
* Adds the specified {@code Permission} to this collection.
- *
+ *
* @param permission
* the {@code Permission} to add.
* @throws IllegalStateException
@@ -54,7 +54,7 @@
/**
* Returns an enumeration over all {@link Permission}s encapsulated by this
* {@code PermissionCollection}.
- *
+ *
* @return an enumeration over all {@link Permission}s.
*/
public abstract Enumeration<Permission> elements();
@@ -62,7 +62,7 @@
/**
* Indicates whether the specified permission is implied by this {@code
* PermissionCollection}.
- *
+ *
* @param permission
* the permission to check.
* @return {@code true} if the given permission is implied by the
@@ -73,7 +73,7 @@
/**
* Indicates whether new permissions can be added to this {@code
* PermissionCollection}.
- *
+ *
* @return {@code true} if the receiver is read only, {@code false} if new
* elements can still be added to this {@code PermissionCollection}.
*/
@@ -92,7 +92,7 @@
/**
* Returns a string containing a concise, human-readable description of this
* {@code PermissionCollection}.
- *
+ *
* @return a printable representation for this {@code PermissionCollection}.
*/
@Override
@@ -111,10 +111,10 @@
int esize = elist.size();
totalLength += esize * 4;
StringBuilder result = new StringBuilder(totalLength).append(superStr)
- .append(" (");
+ .append(" (");
for (int i = 0; i < esize; i++) {
- result.append("\n ").append(elist.get(i).toString());
+ result.append("\n ").append(elist.get(i).toString());
}
- return result.append("\n)\n").toString();
+ return result.append("\n)\n").toString();
}
}
diff --git a/luni/src/main/java/java/security/Permissions.java b/luni/src/main/java/java/security/Permissions.java
index bca777a..4512fb0 100644
--- a/luni/src/main/java/java/security/Permissions.java
+++ b/luni/src/main/java/java/security/Permissions.java
@@ -46,8 +46,8 @@
private static final long serialVersionUID = 4858622370623524688L;
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("perms", Hashtable.class),
- new ObjectStreamField("allPermission", PermissionCollection.class), };
+ new ObjectStreamField("perms", Hashtable.class),
+ new ObjectStreamField("allPermission", PermissionCollection.class), };
// Hash to store PermissionCollection's
private transient Map klasses = new HashMap();
@@ -69,11 +69,11 @@
*/
public void add(Permission permission) {
if (isReadOnly()) {
- throw new SecurityException(Messages.getString("security.15"));
+ throw new SecurityException(Messages.getString("security.15"));
}
if (permission == null) {
- throw new NullPointerException(Messages.getString("security.20"));
+ throw new NullPointerException(Messages.getString("security.20"));
}
Class klass = permission.getClass();
@@ -107,7 +107,7 @@
/**
* An auxiliary implementation for enumerating individual permissions from a
* collection of PermissionCollections.
- *
+ *
*/
final static class MetaEnumeration implements Enumeration {
@@ -117,7 +117,7 @@
/**
* Initiates this enumeration.
- *
+ *
* @param outer an iterator over external collection of
* PermissionCollections
*/
@@ -157,14 +157,14 @@
return next;
}
- throw new NoSuchElementException(Messages.getString("security.17"));
+ throw new NoSuchElementException(Messages.getString("security.17"));
}
}
public boolean implies(Permission permission) {
if (permission == null) {
// RI compatible
- throw new NullPointerException(Messages.getString("security.21"));
+ throw new NullPointerException(Messages.getString("security.21"));
}
if (allEnabled) {
return true;
@@ -212,7 +212,7 @@
private void readObject(java.io.ObjectInputStream in) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
- Map perms = (Map)fields.get("perms", null);
+ Map perms = (Map)fields.get("perms", null);
klasses = new HashMap();
synchronized (klasses) {
for (Iterator iter = perms.entrySet().iterator(); iter.hasNext();) {
@@ -220,14 +220,14 @@
Class key = (Class) entry.getKey();
PermissionCollection pc = (PermissionCollection) entry.getValue();
if (key != pc.elements().nextElement().getClass()) {
- throw new InvalidObjectException(Messages.getString("security.22"));
+ throw new InvalidObjectException(Messages.getString("security.22"));
}
klasses.put(key, pc);
}
}
- allEnabled = fields.get("allPermission", null) != null;
+ allEnabled = fields.get("allPermission", null) != null;
if (allEnabled && !klasses.containsKey(AllPermission.class)) {
- throw new InvalidObjectException(Messages.getString("security.23"));
+ throw new InvalidObjectException(Messages.getString("security.23"));
}
}
@@ -236,8 +236,8 @@
*/
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
ObjectOutputStream.PutField fields = out.putFields();
- fields.put("perms", new Hashtable(klasses));
- fields.put("allPermission", allEnabled ? klasses
+ fields.put("perms", new Hashtable(klasses));
+ fields.put("allPermission", allEnabled ? klasses
.get(AllPermission.class) : null);
out.writeFields();
}
diff --git a/luni/src/main/java/java/security/Policy.java b/luni/src/main/java/java/security/Policy.java
index 198bda1..c61c41d 100644
--- a/luni/src/main/java/java/security/Policy.java
+++ b/luni/src/main/java/java/security/Policy.java
@@ -35,19 +35,19 @@
* Only one instance of a {@code Policy} is active at any time.
*/
public abstract class Policy {
-
+
// Key to security properties, defining default policy provider.
- private static final String POLICY_PROVIDER = "policy.provider";
+ private static final String POLICY_PROVIDER = "policy.provider";
// The SecurityPermission required to set custom Policy.
private static final SecurityPermission SET_POLICY = new SecurityPermission(
- "setPolicy");
+ "setPolicy");
// The SecurityPermission required to get current Policy.
private static final SecurityPermission GET_POLICY = new SecurityPermission(
- "getPolicy");
+ "getPolicy");
- // The policy currently in effect.
+ // The policy currently in effect.
private static Policy activePolicy;
/**
@@ -148,16 +148,16 @@
}
// Reads name of default policy provider from security.properties,
- // loads the class and instantiates the provider.<br>
- // In case of any error, including undefined provider name,
- // returns new instance of org.apache.harmony.security.FilePolicy provider.
+ // loads the class and instantiates the provider.<br>
+ // In case of any error, including undefined provider name,
+ // returns new instance of org.apache.harmony.security.FilePolicy provider.
private static Policy getDefaultProvider() {
final String defaultClass = AccessController
.doPrivileged(new PolicyUtils.SecurityPropertyAccessor(
POLICY_PROVIDER));
if (defaultClass == null) {
//TODO log warning
- //System.err.println("No policy provider specified. Loading the "
+ //System.err.println("No policy provider specified. Loading the "
// + DefaultPolicy.class.getName());
return new DefaultPolicy();
}
@@ -171,10 +171,10 @@
ClassLoader.getSystemClassLoader()).newInstance();
}
catch (Exception e) {
- //TODO log error
- //System.err.println("Error loading policy provider <"
- // + defaultClass + "> : " + e
- // + "\nSwitching to the default "
+ //TODO log error
+ //System.err.println("Error loading policy provider <"
+ // + defaultClass + "> : " + e
+ // + "\nSwitching to the default "
// + DefaultPolicy.class.getName());
return new DefaultPolicy();
}
@@ -182,7 +182,7 @@
});
}
-
+
/**
* Returns {@code true} if system policy provider is instantiated.
*/
@@ -192,7 +192,7 @@
/**
* Shortcut accessor for friendly classes, to skip security checks.
- * If active policy was set to <code>null</code>, loads default provider,
+ * If active policy was set to <code>null</code>, loads default provider,
* so this method never returns <code>null</code>. <br>
* This method is synchronized with setPolicy()
*/
@@ -200,7 +200,7 @@
Policy current = activePolicy;
if (current == null) {
synchronized (Policy.class) {
- // double check in case value has been reassigned
+ // double check in case value has been reassigned
// while we've been awaiting monitor
if (activePolicy == null) {
activePolicy = getDefaultProvider();
diff --git a/luni/src/main/java/java/security/PrivateKey.java b/luni/src/main/java/java/security/PrivateKey.java
index 246f286..8fac1e9 100644
--- a/luni/src/main/java/java/security/PrivateKey.java
+++ b/luni/src/main/java/java/security/PrivateKey.java
@@ -19,7 +19,7 @@
/**
* {@code PrivateKey} is the common interface for private keys.
- *
+ *
* @see PublicKey
*/
public interface PrivateKey extends Key {
diff --git a/luni/src/main/java/java/security/PrivilegedActionException.java b/luni/src/main/java/java/security/PrivilegedActionException.java
index 62d89af..7965469 100644
--- a/luni/src/main/java/java/security/PrivilegedActionException.java
+++ b/luni/src/main/java/java/security/PrivilegedActionException.java
@@ -86,7 +86,7 @@
@Override
public String toString() {
String s = getClass().getName();
- return exception == null ? s : s + ": " + exception;
+ return exception == null ? s : s + ": " + exception;
}
}
diff --git a/luni/src/main/java/java/security/ProtectionDomain.java b/luni/src/main/java/java/security/ProtectionDomain.java
index a10d71d..3b4449d 100644
--- a/luni/src/main/java/java/security/ProtectionDomain.java
+++ b/luni/src/main/java/java/security/ProtectionDomain.java
@@ -40,8 +40,8 @@
// Set of principals associated with this ProtectionDomain
private Principal[] principals;
- // false if this ProtectionDomain was constructed with static
- // permissions, true otherwise.
+ // false if this ProtectionDomain was constructed with static
+ // permissions, true otherwise.
private boolean dynamicPerms;
/**
@@ -190,15 +190,15 @@
* this {@code ProtectionDomain}, {@code false} otherwise.
*/
public boolean implies(Permission permission) {
- // First, test with the Policy, as the default Policy.implies()
- // checks for both dynamic and static collections of the
+ // First, test with the Policy, as the default Policy.implies()
+ // checks for both dynamic and static collections of the
// ProtectionDomain passed...
if (dynamicPerms
&& Policy.getAccessiblePolicy().implies(this, permission)) {
return true;
}
- // ... and we get here if
+ // ... and we get here if
// either the permissions are static
// or Policy.implies() did not check for static permissions
// or the permission is not implied
@@ -214,32 +214,32 @@
@Override
public String toString() {
StringBuilder buf = new StringBuilder(200);
- buf.append("ProtectionDomain\n");
- buf.append("CodeSource=").append(
- codeSource == null ? "<null>" : codeSource.toString()).append(
- "\n");
- buf.append("ClassLoader=").append(
- classLoader == null ? "<null>" : classLoader.toString())
- .append("\n");
+ buf.append("ProtectionDomain\n");
+ buf.append("CodeSource=").append(
+ codeSource == null ? "<null>" : codeSource.toString()).append(
+ "\n");
+ buf.append("ClassLoader=").append(
+ classLoader == null ? "<null>" : classLoader.toString())
+ .append("\n");
if (principals == null || principals.length == 0) {
- buf.append("<no principals>\n");
+ buf.append("<no principals>\n");
} else {
- buf.append("Principals: <\n");
+ buf.append("Principals: <\n");
for (int i = 0; i < principals.length; i++) {
- buf.append("\t").append(
- principals[i] == null ? "<null>" : principals[i]
- .toString()).append("\n");
+ buf.append("\t").append(
+ principals[i] == null ? "<null>" : principals[i]
+ .toString()).append("\n");
}
- buf.append(">");
+ buf.append(">");
}
//permissions here
- buf.append("Permissions:\n");
+ buf.append("Permissions:\n");
if (permissions == null) {
- buf.append("\t\t<no static permissions>\n");
+ buf.append("\t\t<no static permissions>\n");
} else {
- buf.append("\t\tstatic: ").append(permissions.toString()).append(
- "\n");
+ buf.append("\t\tstatic: ").append(permissions.toString()).append(
+ "\n");
}
if (dynamicPerms) {
@@ -247,13 +247,13 @@
PermissionCollection perms;
perms = Policy.getAccessiblePolicy().getPermissions(this);
if (perms == null) {
- buf.append("\t\t<no dynamic permissions>\n");
+ buf.append("\t\t<no dynamic permissions>\n");
} else {
- buf.append("\t\tdynamic: ").append(perms.toString())
- .append("\n");
+ buf.append("\t\tdynamic: ").append(perms.toString())
+ .append("\n");
}
} else {
- buf.append("\t\t<no dynamic permissions>\n");
+ buf.append("\t\t<no dynamic permissions>\n");
}
}
return buf.toString();
diff --git a/luni/src/main/java/java/security/Provider.java b/luni/src/main/java/java/security/Provider.java
index c107374..7b40d1b 100644
--- a/luni/src/main/java/java/security/Provider.java
+++ b/luni/src/main/java/java/security/Provider.java
@@ -53,7 +53,7 @@
private String info;
- //The provider preference order number.
+ //The provider preference order number.
// Equals -1 for non registered provider.
private transient int providerNumber = -1;
@@ -145,7 +145,7 @@
*/
@Override
public String toString() {
- return name + " version " + version;
+ return name + " version " + version;
}
/**
@@ -165,7 +165,7 @@
public synchronized void clear() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("clearProviderProperties." + name);
+ sm.checkSecurityAccess("clearProviderProperties." + name);
}
super.clear();
if (serviceTable != null) {
@@ -221,7 +221,7 @@
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("putProviderProperty." + name);
+ sm.checkSecurityAccess("putProviderProperty." + name);
}
myPutAll(t);
}
@@ -236,7 +236,7 @@
while (it.hasNext()) {
Map.Entry<?, ?> entry = it.next();
key = entry.getKey();
- if (key instanceof String && ((String) key).startsWith("Provider.")) {
+ if (key instanceof String && ((String) key).startsWith("Provider.")) {
// Provider service type is reserved
continue;
}
@@ -291,9 +291,9 @@
public synchronized Object put(Object key, Object value) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("putProviderProperty." + name);
+ sm.checkSecurityAccess("putProviderProperty." + name);
}
- if (key instanceof String && ((String) key).startsWith("Provider.")) {
+ if (key instanceof String && ((String) key).startsWith("Provider.")) {
// Provider service type is reserved
return null;
}
@@ -332,9 +332,9 @@
public synchronized Object remove(Object key) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("removeProviderProperty." + name);
+ sm.checkSecurityAccess("removeProviderProperty." + name);
}
- if (key instanceof String && ((String) key).startsWith("Provider.")) {
+ if (key instanceof String && ((String) key).startsWith("Provider.")) {
// Provider service type is reserved
return null;
}
@@ -357,7 +357,7 @@
* Returns true if this provider implements the given algorithm. Caller
* must specify the cryptographic service and specify constraints via the
* attribute name and value.
- *
+ *
* @param serv
* Crypto service.
* @param alg
@@ -369,12 +369,12 @@
* @return
*/
boolean implementsAlg(String serv, String alg, String attribute, String val) {
- String servAlg = serv + "." + alg;
+ String servAlg = serv + "." + alg;
String prop = getPropertyIgnoreCase(servAlg);
if (prop == null) {
- alg = getPropertyIgnoreCase("Alg.Alias." + servAlg);
+ alg = getPropertyIgnoreCase("Alg.Alias." + servAlg);
if (alg != null) {
- servAlg = serv + "." + alg;
+ servAlg = serv + "." + alg;
prop = getPropertyIgnoreCase(servAlg);
}
}
@@ -390,10 +390,10 @@
// Returns true if this provider has the same value as is given for the
// given attribute
private boolean checkAttribute(String servAlg, String attribute, String val) {
-
+
String attributeValue = getPropertyIgnoreCase(servAlg + ' ' + attribute);
if (attributeValue != null) {
- if (Util.equalsIgnoreCase(attribute,"KeySize")) {
+ if (Util.equalsIgnoreCase(attribute,"KeySize")) {
// BEGIN android-changed
if (Integer.parseInt(attributeValue) >= Integer.parseInt(val)) {
return true;
@@ -409,9 +409,9 @@
}
/**
- *
+ *
* Set the provider preference order number.
- *
+ *
* @param n
*/
void setProviderNumber(int n) {
@@ -419,9 +419,9 @@
}
/**
- *
+ *
* Get the provider preference order number.
- *
+ *
* @return
*/
int getProviderNumber() {
@@ -430,7 +430,7 @@
/**
* Get the service of the specified type
- *
+ *
*/
synchronized Provider.Service getService(String type) {
updatePropertyServiceTable();
@@ -548,9 +548,9 @@
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("putProviderProperty." + name);
+ sm.checkSecurityAccess("putProviderProperty." + name);
}
- if ("Provider".equals(s.getType())) { // Provider service type cannot be
+ if ("Provider".equals(s.getType())) { // Provider service type cannot be
// added
return;
}
@@ -593,7 +593,7 @@
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("removeProviderProperty." + name);
+ sm.checkSecurityAccess("removeProviderProperty." + name);
}
servicesChanged();
if (serviceTable != null) {
@@ -609,16 +609,16 @@
// Add Service information to the provider's properties.
private void serviceInfoToProperties(Provider.Service s) {
- super.put(s.type + "." + s.algorithm, s.className);
+ super.put(s.type + "." + s.algorithm, s.className);
if (s.aliases != null) {
for (Iterator<String> i = s.aliases.iterator(); i.hasNext();) {
- super.put("Alg.Alias." + s.type + "." + i.next(), s.algorithm);
+ super.put("Alg.Alias." + s.type + "." + i.next(), s.algorithm);
}
}
if (s.attributes != null) {
for (Iterator<Map.Entry<String, String>> i = s.attributes.entrySet().iterator(); i.hasNext();) {
Map.Entry<String, String> entry = i.next();
- super.put(s.type + "." + s.algorithm + " " + entry.getKey(),
+ super.put(s.type + "." + s.algorithm + " " + entry.getKey(),
entry.getValue());
}
}
@@ -630,16 +630,16 @@
// Remove Service information from the provider's properties.
private void serviceInfoFromProperties(Provider.Service s) {
- super.remove(s.type + "." + s.algorithm);
+ super.remove(s.type + "." + s.algorithm);
if (s.aliases != null) {
for (Iterator<String> i = s.aliases.iterator(); i.hasNext();) {
- super.remove("Alg.Alias." + s.type + "." + i.next());
+ super.remove("Alg.Alias." + s.type + "." + i.next());
}
}
if (s.attributes != null) {
for (Iterator<Map.Entry<String, String>> i = s.attributes.entrySet().iterator(); i.hasNext();) {
Map.Entry<String, String> entry = i.next();
- super.remove(s.type + "." + s.algorithm + " " + entry.getKey());
+ super.remove(s.type + "." + s.algorithm + " " + entry.getKey());
}
}
if (providerNumber != -1) {
@@ -654,7 +654,7 @@
return;
}
String k = (String) key;
- if (k.startsWith("Provider.")) { // Provider service type is reserved
+ if (k.startsWith("Provider.")) { // Provider service type is reserved
return;
}
Provider.Service s;
@@ -662,7 +662,7 @@
String algorithm = null;
String attribute = null;
int i;
- if (k.startsWith("Alg.Alias.")) { // Alg.Alias.<crypto_service>.<aliasName>=<standardName>
+ if (k.startsWith("Alg.Alias.")) { // Alg.Alias.<crypto_service>.<aliasName>=<standardName>
String aliasName;
String service_alias = k.substring(10);
i = service_alias.indexOf('.');
@@ -738,11 +738,11 @@
}
String key = (String) _key;
String value = (String) _value;
- if (key.startsWith("Provider")) { // Provider service type is reserved
+ if (key.startsWith("Provider")) { // Provider service type is reserved
continue;
}
int i;
- if (key.startsWith("Alg.Alias.")) { // Alg.Alias.<crypto_service>.<aliasName>=<standardName>
+ if (key.startsWith("Alg.Alias.")) { // Alg.Alias.<crypto_service>.<aliasName>=<standardName>
String aliasName;
String service_alias = key.substring(10);
i = service_alias.indexOf('.');
@@ -768,7 +768,7 @@
Util.toUpperCase(aliasName), s);
} else {
String className = (String) changedProperties
- .get(serviceName + "." + algorithm);
+ .get(serviceName + "." + algorithm);
if (className != null) {
List<String> l = new ArrayList<String>();
l.add(aliasName);
@@ -829,7 +829,7 @@
// END android-changed
} else {
String className = (String) changedProperties
- .get(serviceName + "." + algorithm);
+ .get(serviceName + "." + algorithm);
if (className != null) {
Map<String, String> m = new HashMap<String, String>();
m.put(attribute, value);
@@ -855,8 +855,8 @@
lastServicesSet = null;
}
- // These attributes should be placed in each Provider object:
- // Provider.id name, Provider.id version, Provider.id info,
+ // These attributes should be placed in each Provider object:
+ // Provider.id name, Provider.id version, Provider.id info,
// Provider.id className
@SuppressWarnings("nls")
private void putProviderInfo() {
@@ -868,7 +868,7 @@
// Searches for the property with the specified key in the provider
// properties. Key is not case-sensitive.
- //
+ //
// @param prop
// @return the property value with the specified key value.
private String getPropertyIgnoreCase(String key) {
@@ -960,7 +960,7 @@
// BEGIN android-added
/**
* Adds an alias.
- *
+ *
* @param alias the alias to add
*/
/*package*/ void addAlias(String alias) {
@@ -972,7 +972,7 @@
/**
* Puts a new attribute mapping.
- *
+ *
* @param name the attribute name.
* @param value the attribute value.
*/
@@ -1082,7 +1082,7 @@
true, cl);
} catch (Exception e) {
return new NoSuchAlgorithmException(
- Messages.getString("security.11",
+ Messages.getString("security.11",
new Object[]{type, algorithm, e}));
}
lastClassName = className;
@@ -1097,28 +1097,28 @@
try {
return implementation.newInstance();
} catch (Exception e) {
- throw new NoSuchAlgorithmException(Messages.getString("security.199",
+ throw new NoSuchAlgorithmException(Messages.getString("security.199",
type, algorithm), e);
}
}
if (!supportsParameter(constructorParameter)) {
throw new InvalidParameterException(
- Messages.getString("security.12", type));
+ Messages.getString("security.12", type));
}
Class[] parameterTypes = new Class[1];
Object[] initargs = { constructorParameter };
try {
- if (Util.equalsIgnoreCase(type,"CertStore")) {
+ if (Util.equalsIgnoreCase(type,"CertStore")) {
parameterTypes[0] = Class
- .forName("java.security.cert.CertStoreParameters");
+ .forName("java.security.cert.CertStoreParameters");
} else {
parameterTypes[0] = constructorParameter.getClass();
}
return implementation.getConstructor(parameterTypes)
.newInstance(initargs);
} catch (Exception e) {
- throw new NoSuchAlgorithmException(Messages.getString("security.199",
+ throw new NoSuchAlgorithmException(Messages.getString("security.199",
type, algorithm), e);
}
}
@@ -1144,18 +1144,18 @@
*/
@Override
public String toString() {
- String result = "Provider " + provider.getName() + " Service "
- + type + "." + algorithm + " " + className;
+ String result = "Provider " + provider.getName() + " Service "
+ + type + "." + algorithm + " " + className;
if (aliases != null) {
- result = result + "\nAliases " + aliases.toString();
+ result = result + "\nAliases " + aliases.toString();
}
if (attributes != null) {
- result = result + "\nAttributes " + attributes.toString();
+ result = result + "\nAttributes " + attributes.toString();
}
return result;
}
}
-
+
private void readObject(java.io.ObjectInputStream in) throws NotActiveException, IOException, ClassNotFoundException {
in.defaultReadObject();
versionString = String.valueOf(version);
diff --git a/luni/src/main/java/java/security/ProviderException.java b/luni/src/main/java/java/security/ProviderException.java
index 22950f5..d1fcd5a 100644
--- a/luni/src/main/java/java/security/ProviderException.java
+++ b/luni/src/main/java/java/security/ProviderException.java
@@ -20,7 +20,7 @@
/**
* {@code ProviderException} is a general exception, thrown by security {@code
* Providers}.
- *
+ *
* @see Provider
*/
public class ProviderException extends RuntimeException {
diff --git a/luni/src/main/java/java/security/PublicKey.java b/luni/src/main/java/java/security/PublicKey.java
index c197840..64777af 100644
--- a/luni/src/main/java/java/security/PublicKey.java
+++ b/luni/src/main/java/java/security/PublicKey.java
@@ -19,7 +19,7 @@
/**
* {@code PublicKey} is the common interface for public keys.
- *
+ *
* @see PrivateKey
*/
public interface PublicKey extends Key {
diff --git a/luni/src/main/java/java/security/SecureClassLoader.java b/luni/src/main/java/java/security/SecureClassLoader.java
index 07bebc9..bca7207 100644
--- a/luni/src/main/java/java/security/SecureClassLoader.java
+++ b/luni/src/main/java/java/security/SecureClassLoader.java
@@ -136,7 +136,7 @@
: defineClass(name, data, 0, data.length, getPD(cs));
}
- // Constructs and caches ProtectionDomain for the given CodeSource
+ // Constructs and caches ProtectionDomain for the given CodeSource
// object.<br>
// It calls {@link getPermissions()} to get a set of permissions.
//
@@ -146,7 +146,7 @@
if (cs == null) {
return null;
}
- // need to cache PDs, otherwise every class from a given CodeSource
+ // need to cache PDs, otherwise every class from a given CodeSource
// will have it's own ProtectionDomain, which does not look right.
ProtectionDomain pd;
synchronized (pds) {
diff --git a/luni/src/main/java/java/security/SecureRandom.java b/luni/src/main/java/java/security/SecureRandom.java
index 8f54a7f..52a0c6d 100644
--- a/luni/src/main/java/java/security/SecureRandom.java
+++ b/luni/src/main/java/java/security/SecureRandom.java
@@ -32,32 +32,32 @@
* cryptographically secure pseudo-random numbers.
*/
public class SecureRandom extends Random {
-
+
private static final long serialVersionUID = 4940670005562187L;
-
+
// The service name.
- private static final transient String SERVICE = "SecureRandom";
-
+ private static final transient String SERVICE = "SecureRandom";
+
// Used to access common engine functionality
private static transient Engine engine = new Engine(SERVICE);
-
+
private Provider provider;
-
+
private SecureRandomSpi secureRandomSpi;
-
+
private String algorithm;
-
+
private byte[] state;
-
+
private byte[] randomBytes;
-
+
private int randomBytesUsed;
-
+
private long counter;
-
+
// Internal SecureRandom used for getSeed(int)
private static transient SecureRandom internalSecureRandom;
-
+
/**
* Constructs a new instance of {@code SecureRandom}. An implementation for
* the highest-priority provider is returned. The constructed instance will
@@ -69,7 +69,7 @@
if (service == null) {
this.provider = null;
this.secureRandomSpi = new SHA1PRNG_SecureRandomImpl();
- this.algorithm = "SHA1PRNG";
+ this.algorithm = "SHA1PRNG";
} else {
try {
this.provider = service.getProvider();
@@ -77,15 +77,15 @@
this.algorithm = service.getAlgorithm();
} catch (Exception e) {
throw new RuntimeException(e);
- }
- }
+ }
+ }
}
/**
* Constructs a new instance of {@code SecureRandom}. An implementation for
* the highest-priority provider is returned. The constructed instance will
* be seeded with the parameter.
- *
+ *
* @param seed
* the seed for this generator.
*/
@@ -93,24 +93,24 @@
this();
setSeed(seed);
}
-
+
//Find SecureRandom service.
private Provider.Service findService() {
Set s;
Provider.Service service;
for (Iterator it1 = Services.getProvidersList().iterator(); it1.hasNext();) {
- service = ((Provider)it1.next()).getService("SecureRandom");
+ service = ((Provider)it1.next()).getService("SecureRandom");
if (service != null) {
return service;
}
}
return null;
}
-
+
/**
* Constructs a new instance of {@code SecureRandom} using the given
* implementation from the specified provider.
- *
+ *
* @param secureRandomSpi
* the implementation.
* @param provider
@@ -118,9 +118,9 @@
*/
protected SecureRandom(SecureRandomSpi secureRandomSpi,
Provider provider) {
- this(secureRandomSpi, provider, "unknown");
+ this(secureRandomSpi, provider, "unknown");
}
-
+
// Constructor
private SecureRandom(SecureRandomSpi secureRandomSpi,
Provider provider,
@@ -134,7 +134,7 @@
/**
* Returns a new instance of {@code SecureRandom} that utilizes the
* specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @return a new instance of {@code SecureRandom} that utilizes the
@@ -147,7 +147,7 @@
public static SecureRandom getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -158,7 +158,7 @@
/**
* Returns a new instance of {@code SecureRandom} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @param provider
@@ -176,19 +176,19 @@
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
- Messages.getString("security.02"));
+ Messages.getString("security.02"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
- throw new NoSuchProviderException(Messages.getString("security.03", provider));
+ throw new NoSuchProviderException(Messages.getString("security.03", provider));
}
- return getInstance(algorithm, p);
+ return getInstance(algorithm, p);
}
/**
* Returns a new instance of {@code SecureRandom} that utilizes the
* specified algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the algorithm to use.
* @param provider
@@ -203,10 +203,10 @@
public static SecureRandom getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
@@ -216,16 +216,16 @@
/**
* Returns the provider associated with this {@code SecureRandom}.
- *
+ *
* @return the provider associated with this {@code SecureRandom}.
*/
public final Provider getProvider() {
return provider;
}
-
+
/**
* Returns the name of the algorithm of this {@code SecureRandom}.
- *
+ *
* @return the name of the algorithm of this {@code SecureRandom}.
*/
public String getAlgorithm() {
@@ -236,7 +236,7 @@
* Reseeds this {@code SecureRandom} instance with the specified {@code
* seed}. The seed of this {@code SecureRandom} instance is supplemented,
* not replaced.
- *
+ *
* @param seed
* the new seed.
*/
@@ -248,7 +248,7 @@
* Reseeds this this {@code SecureRandom} instance with the eight bytes
* described by the representation of the given {@code long seed}. The seed
* of this {@code SecureRandom} instance is supplemented, not replaced.
- *
+ *
* @param seed
* the new seed.
*/
@@ -273,7 +273,7 @@
/**
* Generates and stores random bytes in the given {@code byte[]} for each
* array element.
- *
+ *
* @param bytes
* the {@code byte[]} to be filled with random bytes.
*/
@@ -285,7 +285,7 @@
/**
* Generates and returns an {@code int} containing the specified number of
* random bits (right justified, with leading zeros).
- *
+ *
* @param numBits
* number of bits to be generated. An input value should be in
* the range [0, 32].
@@ -303,11 +303,11 @@
int bytes = (numBits+7)/8;
byte[] next = new byte[bytes];
int ret = 0;
-
+
nextBytes(next);
for (int i = 0; i < bytes; i++) {
ret = (next[i] & 0xFF) | (ret << 8);
- }
+ }
ret = ret >>> (bytes*8 - numBits);
return ret;
}
@@ -315,7 +315,7 @@
/**
* Generates and returns the specified number of seed bytes, computed using
* the seed generation algorithm used by this {@code SecureRandom}.
- *
+ *
* @param numBytes
* the number of seed bytes.
* @return the seed bytes
@@ -330,7 +330,7 @@
/**
* Generates and returns the specified number of seed bytes, computed using
* the seed generation algorithm used by this {@code SecureRandom}.
- *
+ *
* @param numBytes
* the number of seed bytes.
* @return the seed bytes.
@@ -338,5 +338,5 @@
public byte[] generateSeed(int numBytes) {
return secureRandomSpi.engineGenerateSeed(numBytes);
}
-
+
}
diff --git a/luni/src/main/java/java/security/SecureRandomSpi.java b/luni/src/main/java/java/security/SecureRandomSpi.java
index 829464f..5b079c1 100644
--- a/luni/src/main/java/java/security/SecureRandomSpi.java
+++ b/luni/src/main/java/java/security/SecureRandomSpi.java
@@ -22,36 +22,36 @@
/**
* {@code SecureRandomSpi} is the <i>Service Provider Interface</i> (<b>SPI</b>) definition
* for {@link SecureRandom}.
- *
+ *
* @see SecureRandom
*/
public abstract class SecureRandomSpi implements Serializable {
-
+
private static final long serialVersionUID = -2991854161009191830L;
-
+
/**
* Reseeds this {@code SecureRandomSpi} instance with the specified {@code
* seed}. The seed of this {@code SecureRandomSpi} instance is supplemented,
* not replaced.
- *
+ *
* @param seed
* the new seed.
*/
protected abstract void engineSetSeed(byte[] seed);
-
+
/**
* Generates and stores random bytes in the given {@code byte[]} for each
* array element.
- *
+ *
* @param bytes
* the {@code byte[]} to be filled with random bytes.
*/
protected abstract void engineNextBytes(byte[] bytes);
-
+
/**
* Generates and returns the specified number of seed bytes, computed using
* the seed generation algorithm used by this {@code SecureRandomSpi}.
- *
+ *
* @param numBytes
* the number of seed bytes.
* @return the seed bytes
diff --git a/luni/src/main/java/java/security/Security.java b/luni/src/main/java/java/security/Security.java
index b9689a2..73612b3 100644
--- a/luni/src/main/java/java/security/Security.java
+++ b/luni/src/main/java/java/security/Security.java
@@ -61,7 +61,7 @@
AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
public Void run() {
boolean loaded = false;
-
+
// BEGIN android-added
/*
* Android only uses a local "security.properties" resource
@@ -69,7 +69,7 @@
*/
try {
InputStream configStream =
- getClass().getResourceAsStream("security.properties");
+ getClass().getResourceAsStream("security.properties");
InputStream input = new BufferedInputStream(configStream);
secprops.load(input);
loaded = true;
@@ -81,10 +81,10 @@
// END android-added
// BEGIN android-removed
-// if (Util.equalsIgnoreCase("true", secprops.getProperty("security.allowCustomPropertiesFile", "true"))) {
-// String securityFile = System.getProperty("java.security.properties");
+// if (Util.equalsIgnoreCase("true", secprops.getProperty("security.allowCustomPropertiesFile", "true"))) {
+// String securityFile = System.getProperty("java.security.properties");
// if (securityFile != null) {
-// if (securityFile.startsWith("=")) { // overwrite
+// if (securityFile.startsWith("=")) { // overwrite
// secprops = new Properties();
// loaded = false;
// securityFile = securityFile.substring(1);
@@ -132,10 +132,10 @@
// Register default providers
private static void registerDefaultProviders() {
- secprops.put("security.provider.1", "org.apache.harmony.security.provider.cert.DRLCertFactory");
- secprops.put("security.provider.2", "org.apache.harmony.security.provider.crypto.CryptoProvider");
- secprops.put("security.provider.3", "org.apache.harmony.xnet.provider.jsse.JSSEProvider");
- secprops.put("security.provider.4", "org.bouncycastle.jce.provider.BouncyCastleProvider");
+ secprops.put("security.provider.1", "org.apache.harmony.security.provider.cert.DRLCertFactory");
+ secprops.put("security.provider.2", "org.apache.harmony.security.provider.crypto.CryptoProvider");
+ secprops.put("security.provider.3", "org.apache.harmony.xnet.provider.jsse.JSSEProvider");
+ secprops.put("security.provider.4", "org.bouncycastle.jce.provider.BouncyCastleProvider");
}
/**
@@ -155,7 +155,7 @@
return null;
}
// BEGIN android-changed
- String prop = "Alg." + propName + "." + algName;
+ String prop = "Alg." + propName + "." + algName;
// END android-changed
Provider[] providers = getProviders();
for (int i = 0; i < providers.length; i++) {
@@ -199,7 +199,7 @@
// one position for next providers; Note: The position is 1-based
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("insertProvider." + provider.getName());
+ sm.checkSecurityAccess("insertProvider." + provider.getName());
}
if (getProvider(provider.getName()) != null) {
return -1;
@@ -252,7 +252,7 @@
*/
public static synchronized void removeProvider(String name) {
// It is not clear from spec.:
- // 1. if name is null, should we checkSecurityAccess or not?
+ // 1. if name is null, should we checkSecurityAccess or not?
// throw SecurityException or not?
// 2. as 1 but provider is not installed
// 3. behavior if name is empty string?
@@ -267,7 +267,7 @@
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("removeProvider." + name);
+ sm.checkSecurityAccess("removeProvider." + name);
}
Services.removeProvider(p.getProviderNumber());
renumProviders();
@@ -322,20 +322,20 @@
*/
public static Provider[] getProviders(String filter) {
if (filter == null) {
- throw new NullPointerException(Messages.getString("security.2A"));
+ throw new NullPointerException(Messages.getString("security.2A"));
}
if (filter.length() == 0) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
HashMap<String, String> hm = new HashMap<String, String>();
int i = filter.indexOf(':');
if ((i == filter.length() - 1) || (i == 0)) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
if (i < 1) {
- hm.put(filter, "");
+ hm.put(filter, "");
} else {
hm.put(filter.substring(0, i), filter.substring(i + 1));
}
@@ -368,7 +368,7 @@
*/
public static synchronized Provider[] getProviders(Map<String,String> filter) {
if (filter == null) {
- throw new NullPointerException(Messages.getString("security.2A"));
+ throw new NullPointerException(Messages.getString("security.2A"));
}
if (filter.isEmpty()) {
return null;
@@ -385,22 +385,22 @@
int j = key.indexOf('.');
if (j == -1) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
if (i == -1) { // <crypto_service>.<algorithm_or_type>
if (val.length() != 0) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
} else { // <crypto_service>.<algorithm_or_type> <attribute_name>
if (val.length() == 0) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
attribute = key.substring(i + 1);
if (attribute.trim().length() == 0) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
key = key.substring(0, i);
}
@@ -408,7 +408,7 @@
String alg = key.substring(j + 1);
if (serv.length() == 0 || alg.length() == 0) {
throw new InvalidParameterException(
- Messages.getString("security.2B"));
+ Messages.getString("security.2B"));
}
Provider p;
for (int k = 0; k < result.size(); k++) {
@@ -446,11 +446,11 @@
*/
public static String getProperty(String key) {
if (key == null) {
- throw new NullPointerException(Messages.getString("security.2C"));
+ throw new NullPointerException(Messages.getString("security.2C"));
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("getProperty." + key);
+ sm.checkSecurityAccess("getProperty." + key);
}
String property = secprops.getProperty(key);
if (property != null) {
@@ -478,7 +478,7 @@
public static void setProperty(String key, String datnum) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("setProperty." + key);
+ sm.checkSecurityAccess("setProperty." + key);
}
secprops.put(key, datnum);
}
@@ -516,9 +516,9 @@
}
/**
- *
+ *
* Update sequence numbers of all providers.
- *
+ *
*/
private static void renumProviders() {
Provider[] p = Services.getProviders();
@@ -537,7 +537,7 @@
public Iterator<String> getAliases(Provider.Service s) {
return s.getAliases();
}
-
+
// Access to Provider.getService()
public Provider.Service getService(Provider p, String type) {
return p.getService(type);
diff --git a/luni/src/main/java/java/security/Signature.java b/luni/src/main/java/java/security/Signature.java
index 69a28a4..2051f17 100644
--- a/luni/src/main/java/java/security/Signature.java
+++ b/luni/src/main/java/java/security/Signature.java
@@ -32,13 +32,13 @@
* {@code Signature} is an engine class which is capable of creating and
* verifying digital signatures, using different algorithms that have been
* registered with the {@link Security} class.
- *
+ *
* @see SignatureSpi
*/
public abstract class Signature extends SignatureSpi {
-
+
// The service name.
- private static final String SERVICE = "Signature";
+ private static final String SERVICE = "Signature";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
@@ -101,7 +101,7 @@
public static Signature getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
Signature result;
synchronized (engine) {
@@ -138,15 +138,15 @@
public static Signature getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
- Messages.getString("security.02"));
+ Messages.getString("security.02"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
- throw new NoSuchProviderException(Messages.getString("security.03", provider));
+ throw new NoSuchProviderException(Messages.getString("security.03", provider));
}
return getSignatureInstance(algorithm, p);
}
@@ -169,14 +169,14 @@
public static Signature getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
return getSignatureInstance(algorithm, provider);
}
-
+
private static Signature getSignatureInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
Signature result;
@@ -250,7 +250,7 @@
boolean critical = false;
if (ce != null && !ce.isEmpty()) {
for (Iterator i = ce.iterator(); i.hasNext();) {
- if ("2.5.29.15".equals(i.next())) {
+ if ("2.5.29.15".equals(i.next())) {
//KeyUsage OID = 2.5.29.15
critical = true;
break;
@@ -267,7 +267,7 @@
// KeyUsage ::= BIT STRING { digitalSignature (0), <skipped> }
if ((keyUsage != null) && (!keyUsage[0])) { // digitalSignature
throw new InvalidKeyException(
- Messages.getString("security.26"));
+ Messages.getString("security.26"));
}
}
}
@@ -324,7 +324,7 @@
public final byte[] sign() throws SignatureException {
if (state != SIGN) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
return engineSign();
}
@@ -352,15 +352,15 @@
* {@code outbuf}.
*/
public final int sign(byte[] outbuf, int offset, int len)
- throws SignatureException {
+ throws SignatureException {
if (outbuf == null || offset < 0 || len < 0 ||
offset + len > outbuf.length) {
throw new IllegalArgumentException(
- Messages.getString("security.05"));
+ Messages.getString("security.05"));
}
if (state != SIGN) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
return engineSign(outbuf, offset, len);
}
@@ -384,7 +384,7 @@
public final boolean verify(byte[] signature) throws SignatureException {
if (state != VERIFY) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
return engineVerify(signature);
}
@@ -417,12 +417,12 @@
throws SignatureException {
if (state != VERIFY) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
if (signature == null || offset < 0 || length < 0 ||
offset + length > signature.length) {
throw new IllegalArgumentException(
- Messages.getString("security.05"));
+ Messages.getString("security.05"));
}
return engineVerify(signature, offset, length);
}
@@ -440,7 +440,7 @@
public final void update(byte b) throws SignatureException {
if (state == UNINITIALIZED) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
engineUpdate(b);
}
@@ -458,7 +458,7 @@
public final void update(byte[] data) throws SignatureException {
if (state == UNINITIALIZED) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
engineUpdate(data, 0, data.length);
}
@@ -481,12 +481,12 @@
throws SignatureException {
if (state == UNINITIALIZED) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
if (data == null || off < 0 || len < 0 ||
off + len > data.length) {
throw new IllegalArgumentException(
- Messages.getString("security.05"));
+ Messages.getString("security.05"));
}
engineUpdate(data, off, len);
}
@@ -504,7 +504,7 @@
public final void update(ByteBuffer data) throws SignatureException {
if (state == UNINITIALIZED) {
throw new SignatureException(
- Messages.getString("security.27"));
+ Messages.getString("security.27"));
}
engineUpdate(data);
}
@@ -517,20 +517,20 @@
*/
@Override
public String toString() {
- return "SIGNATURE " + algorithm + " state: " + stateToString(state);
+ return "SIGNATURE " + algorithm + " state: " + stateToString(state);
}
// Convert state to string
private String stateToString(int state) {
switch (state) {
case UNINITIALIZED:
- return "UNINITIALIZED";
+ return "UNINITIALIZED";
case SIGN:
- return "SIGN";
+ return "SIGN";
case VERIFY:
- return "VERIFY";
+ return "VERIFY";
default:
- return "";
+ return "";
}
}
@@ -579,7 +579,7 @@
/**
* Returns the value of the parameter with the specified name.
- *
+ *
* @param param
* the name of the requested parameter value
* @return the value of the parameter with the specified name, maybe {@code
@@ -604,9 +604,9 @@
}
/**
- *
+ *
* Internal Signature implementation
- *
+ *
*/
private static class SignatureImpl extends Signature {
diff --git a/luni/src/main/java/java/security/SignatureException.java b/luni/src/main/java/java/security/SignatureException.java
index f8909d1..f6e934f 100644
--- a/luni/src/main/java/java/security/SignatureException.java
+++ b/luni/src/main/java/java/security/SignatureException.java
@@ -19,7 +19,7 @@
/**
*{@code SignatureException} is a general {@code Signature} exception.
- *
+ *
* @see Signature
*/
public class SignatureException extends GeneralSecurityException {
diff --git a/luni/src/main/java/java/security/SignatureSpi.java b/luni/src/main/java/java/security/SignatureSpi.java
index 8217838..3db7acb 100644
--- a/luni/src/main/java/java/security/SignatureSpi.java
+++ b/luni/src/main/java/java/security/SignatureSpi.java
@@ -25,7 +25,7 @@
/**
* {@code SignatureSpi} is the <i>Service Provider Interface</i> (<b>SPI</b>)
* definition for {@link Signature}.
- *
+ *
* @see Signature
*/
public abstract class SignatureSpi {
@@ -110,7 +110,7 @@
/**
* Updates the data to be verified or to be signed, using the specified
* {@code ByteBuffer}.
- *
+ *
* @param input
* the {@code ByteBuffer} to update with.
* @throws RuntimeException
@@ -131,7 +131,7 @@
int limit = input.limit();
try {
engineUpdate(tmp, offset + position, limit - position);
- } catch (SignatureException e) {
+ } catch (SignatureException e) {
throw new RuntimeException(e); //Wrap SignatureException
}
input.position(limit);
@@ -189,13 +189,13 @@
return 0;
}
if (len < tmp.length) {
- throw new SignatureException(Messages.getString("security.2D"));
+ throw new SignatureException(Messages.getString("security.2D"));
}
if (offset < 0) {
- throw new SignatureException(Messages.getString("security.1C"));
+ throw new SignatureException(Messages.getString("security.1C"));
}
if (offset + len > outbuf.length) {
- throw new SignatureException(Messages.getString("security.05"));
+ throw new SignatureException(Messages.getString("security.05"));
}
System.arraycopy(tmp, 0, outbuf, offset, tmp.length);
return tmp.length;
diff --git a/luni/src/main/java/java/security/SignedObject.java b/luni/src/main/java/java/security/SignedObject.java
index 3347cf3..65867f4 100644
--- a/luni/src/main/java/java/security/SignedObject.java
+++ b/luni/src/main/java/java/security/SignedObject.java
@@ -55,7 +55,7 @@
* Constructs a new instance of {@code SignedObject} with the target object,
* the private key and the engine to compute the signature. The given
* {@code object} is signed with the specified key and engine.
- *
+ *
* @param object
* the object to bes signed.
* @param signingKey
@@ -92,7 +92,7 @@
/**
* Returns the encapsulated object. Each time this method is invoked, the
* encapsulated object is deserialized before it is returned.
- *
+ *
* @return the encapsulated object.
* @throws IOException
* if deserialization failed.
@@ -112,7 +112,7 @@
/**
* Returns the signature data of the encapsulated serialized object.
- *
+ *
* @return the signature data of the encapsulated serialized object.
*/
public byte[] getSignature() {
@@ -123,7 +123,7 @@
/**
* Returns the name of the algorithm of this {@code SignedObject}.
- *
+ *
* @return the name of the algorithm of this {@code SignedObject}.
*/
public String getAlgorithm() {
@@ -133,7 +133,7 @@
/**
* Indicates whether the contained signature for the encapsulated object is
* valid.
- *
+ *
* @param verificationKey
* the public key to verify the signature.
* @param verificationEngine
diff --git a/luni/src/main/java/java/security/Signer.java b/luni/src/main/java/java/security/Signer.java
index 3e9a5e1..58f8c04 100644
--- a/luni/src/main/java/java/security/Signer.java
+++ b/luni/src/main/java/java/security/Signer.java
@@ -20,7 +20,7 @@
/**
* {@link Signer} represents an identity (individual or corporation) that owns a
* private key and the corresponding public key.
- *
+ *
* @deprecated Replaced by behavior in {@link java.security.cert
* java.security.cert} package and {@link java.security.Principal
* Principal}
@@ -80,7 +80,7 @@
public PrivateKey getPrivateKey() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("getSignerPrivateKey");
+ sm.checkSecurityAccess("getSignerPrivateKey");
}
return privateKey;
@@ -104,7 +104,7 @@
*/
public final void setKeyPair(KeyPair pair)
throws InvalidParameterException, KeyException {
-
+
if (pair == null) {
throw new NullPointerException();
}
@@ -114,7 +114,7 @@
}
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("setSignerKeyPair");
+ sm.checkSecurityAccess("setSignerKeyPair");
}
final PublicKey pk = pair.getPublic();
try {
@@ -138,7 +138,7 @@
*/
@Override
public String toString() {
- String s = "[Signer]" + getName();
+ String s = "[Signer]" + getName();
if (getScope() != null) {
s = s + '[' + getScope().toString() + ']';
}
diff --git a/luni/src/main/java/java/security/Timestamp.java b/luni/src/main/java/java/security/Timestamp.java
index ba8a52e..f5a0d66 100644
--- a/luni/src/main/java/java/security/Timestamp.java
+++ b/luni/src/main/java/java/security/Timestamp.java
@@ -52,10 +52,10 @@
*/
public Timestamp(Date timestamp, CertPath signerCertPath) {
if (timestamp == null) {
- throw new NullPointerException(Messages.getString("security.0F"));
+ throw new NullPointerException(Messages.getString("security.0F"));
}
if (signerCertPath == null) {
- throw new NullPointerException(Messages.getString("security.10"));
+ throw new NullPointerException(Messages.getString("security.10"));
}
// Clone timestamp to prevent modifications
this.timestamp = new Date(timestamp.getTime());
@@ -134,8 +134,8 @@
public String toString() {
StringBuilder buf = new StringBuilder(256);
// Dump only the first certificate
- buf.append("Timestamp [").append(timestamp).append(" certPath=");
- buf.append(signerCertPath.getCertificates().get(0)).append("]");
+ buf.append("Timestamp [").append(timestamp).append(" certPath=");
+ buf.append(signerCertPath.getCertificates().get(0)).append("]");
return buf.toString();
}
}
diff --git a/luni/src/main/java/java/security/UnrecoverableEntryException.java b/luni/src/main/java/java/security/UnrecoverableEntryException.java
index 24ff54b..2c2ed2c 100644
--- a/luni/src/main/java/java/security/UnrecoverableEntryException.java
+++ b/luni/src/main/java/java/security/UnrecoverableEntryException.java
@@ -21,7 +21,7 @@
/**
* {@code UnrecoverableEntryException} indicates, that a {@code KeyStore.Entry}
* cannot be recovered from a {@code KeyStore}.
- *
+ *
* @see KeyStore
* @see KeyStore.Entry
*/
diff --git a/luni/src/main/java/java/security/UnrecoverableKeyException.java b/luni/src/main/java/java/security/UnrecoverableKeyException.java
index 3840e6b..59e3708 100644
--- a/luni/src/main/java/java/security/UnrecoverableKeyException.java
+++ b/luni/src/main/java/java/security/UnrecoverableKeyException.java
@@ -20,7 +20,7 @@
/**
* {@code UnrecoverableKeyException} indicates, that a key cannot be recovered
* from a {@code KeyStore}.
- *
+ *
* @see KeyStore
*/
public class UnrecoverableKeyException extends GeneralSecurityException {
diff --git a/luni/src/main/java/java/security/UnresolvedPermission.java b/luni/src/main/java/java/security/UnresolvedPermission.java
index 898cccb..01171d6 100644
--- a/luni/src/main/java/java/security/UnresolvedPermission.java
+++ b/luni/src/main/java/java/security/UnresolvedPermission.java
@@ -43,13 +43,13 @@
private static final long serialVersionUID = -4821973115467008846L;
- private String type;
-
+ private String type;
+
private String name;
-
+
private String actions;
- // The signer certificates
+ // The signer certificates
private transient Certificate[] targetCerts;
// Cached hash value
@@ -92,7 +92,7 @@
// Check type parameter
private final void checkType(String type) {
if (type == null) {
- throw new NullPointerException(Messages.getString("security.2F"));
+ throw new NullPointerException(Messages.getString("security.2F"));
}
// type is the class name of the Permission class.
@@ -224,7 +224,7 @@
*/
@Override
public String getActions() {
- return "";
+ return "";
}
/**
@@ -304,8 +304,8 @@
*/
@Override
public String toString() {
- return "(unresolved " + type + " " + name + " "
- + actions + ")";
+ return "(unresolved " + type + " " + name + " "
+ + actions + ")";
}
/**
@@ -383,20 +383,20 @@
out.write(enc);
} catch (CertificateEncodingException cee) {
throw ((IOException)new NotSerializableException(
- Messages.getString("security.30",
+ Messages.getString("security.30",
targetCerts[i])).initCause(cee));
}
}
}
}
- /**
- * Reads the object from stream and checks target type for validity.
+ /**
+ * Reads the object from stream and checks target type for validity.
*/
private void readObject(ObjectInputStream in) throws IOException,
ClassNotFoundException {
- in.defaultReadObject();
- checkType(getUnresolvedType());
+ in.defaultReadObject();
+ checkType(getUnresolvedType());
int certNumber = in.readInt();
if (certNumber != 0) {
targetCerts = new Certificate[certNumber];
@@ -410,7 +410,7 @@
.generateCertificate(new ByteArrayInputStream(enc));
} catch (CertificateException cee) {
throw ((IOException)new IOException(
- Messages.getString("security.32")).initCause(cee));
+ Messages.getString("security.32")).initCause(cee));
}
}
}
diff --git a/luni/src/main/java/java/security/UnresolvedPermissionCollection.java b/luni/src/main/java/java/security/UnresolvedPermissionCollection.java
index 1a6da62..51b067b 100644
--- a/luni/src/main/java/java/security/UnresolvedPermissionCollection.java
+++ b/luni/src/main/java/java/security/UnresolvedPermissionCollection.java
@@ -44,8 +44,8 @@
private static final long serialVersionUID = -7176153071733132400L;
- private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("permissions", Hashtable.class), };
+ private static final ObjectStreamField[] serialPersistentFields = {
+ new ObjectStreamField("permissions", Hashtable.class), };
// elements of the collection.
private transient Map klasses = new HashMap();
@@ -53,7 +53,7 @@
/**
* Adds an unresolved permission to this {@code
* UnresolvedPermissionCollection}.
- *
+ *
* @param permission
* the permission to be added.
* @throws SecurityException
@@ -64,11 +64,11 @@
*/
public void add(Permission permission) {
if (isReadOnly()) {
- throw new SecurityException(Messages.getString("security.15"));
+ throw new SecurityException(Messages.getString("security.15"));
}
if (permission == null
|| permission.getClass() != UnresolvedPermission.class) {
- throw new IllegalArgumentException(Messages.getString("security.16",
+ throw new IllegalArgumentException(Messages.getString("security.16",
permission));
}
synchronized (klasses) {
@@ -92,17 +92,17 @@
/**
* Always returns {@code false}.
- *
+ *
* @return always {@code false}
* @see UnresolvedPermission#implies(Permission).
*/
public boolean implies(Permission permission) {
return false;
}
-
- /**
- * Returns true if this collection contains unresolved permissions
- * with the same classname as argument permission.
+
+ /**
+ * Returns true if this collection contains unresolved permissions
+ * with the same classname as argument permission.
*/
boolean hasUnresolved(Permission permission) {
return klasses.containsKey(permission.getClass().getName());
@@ -115,7 +115,7 @@
* an appropriate new collection is instantiated and used. All resolved
* permissions are removed from this unresolved collection, and collection
* with resolved ones is returned.
- *
+ *
* @param target
* a kind of permissions to be resolved.
* @param holder
@@ -151,8 +151,8 @@
return holder;
}
- /**
- * Output fields via default mechanism.
+ /**
+ * Output fields via default mechanism.
*/
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
Hashtable permissions = new Hashtable();
@@ -162,17 +162,17 @@
permissions.put(key, new Vector(((Collection) entry.getValue())));
}
ObjectOutputStream.PutField fields = out.putFields();
- fields.put("permissions", permissions);
+ fields.put("permissions", permissions);
out.writeFields();
}
- /**
- * Reads the object from stream and checks elements grouping for validity.
+ /**
+ * Reads the object from stream and checks elements grouping for validity.
*/
private void readObject(java.io.ObjectInputStream in) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = in.readFields();
- Map permissions = (Map)fields.get("permissions", null);
+ Map permissions = (Map)fields.get("permissions", null);
klasses = new HashMap();
synchronized (klasses) {
for (Iterator iter = permissions.entrySet().iterator(); iter
@@ -187,7 +187,7 @@
if (!element.getName().equals(key)) {
throw new InvalidObjectException(
- Messages.getString("security.22"));
+ Messages.getString("security.22"));
}
}
klasses.put(key, new HashSet(values));
diff --git a/luni/src/main/java/java/security/acl/Acl.java b/luni/src/main/java/java/security/acl/Acl.java
index 88dd9f0..146e6bf 100644
--- a/luni/src/main/java/java/security/acl/Acl.java
+++ b/luni/src/main/java/java/security/acl/Acl.java
@@ -25,7 +25,7 @@
* <p>
* An ACL is a set of {@link AclEntry} objects.
* <p>
- * An {@code AclEntry} is a list of {@link Permission}s that are granted
+ * An {@code AclEntry} is a list of {@link Permission}s that are granted
* (<i>positive</i>) or denied
* (<i>negative</i>) to a {@link Principal}.
* <p>
@@ -52,7 +52,7 @@
/**
* Sets the name of this <i>ACL</i> instance.
- *
+ *
* @param caller
* the invoking {@code Principal}.
* @param name
@@ -65,7 +65,7 @@
/**
* Returns the name of this <i>ACL</i> instance.
- *
+ *
* @return the name of this <i>ACL</i> instance.
*/
String getName();
@@ -87,10 +87,10 @@
* <i>ACL</i>.
*/
boolean addEntry(Principal caller, AclEntry entry) throws NotOwnerException;
-
+
/**
* Removes an {@code AclEntry} from this <i>ACL</i> instance.
- *
+ *
* @param caller
* the invoking {@code Principal}.
* @param entry
@@ -101,9 +101,9 @@
* if the invoking {@code Principal} is not an owner of this
* <i>ACL</i>.
*/
- boolean removeEntry(Principal caller, AclEntry entry)
+ boolean removeEntry(Principal caller, AclEntry entry)
throws NotOwnerException;
-
+
/**
* Returns the set of allowed permissions for the specified {@code
* Principal}.
@@ -130,17 +130,17 @@
* the principal to get the allowed permissions for.
* @return the set of allowed permissions for the specified principal.
*/
- Enumeration<Permission> getPermissions(Principal user);
-
+ Enumeration<Permission> getPermissions(Principal user);
+
/**
* Returns an {@code Enumeration} of the {@code AclEntry} of this
* <i>ACL</i>.
- *
+ *
* @return an {@code Enumeration} of the {@code AclEntry} of this
* <i>ACL</i>.
*/
Enumeration<AclEntry> entries();
-
+
/**
* Checks whether the specified principal is granted the specified
* permission.
@@ -157,10 +157,10 @@
* @see #getPermissions(Principal)
*/
boolean checkPermission(Principal principal, Permission permission);
-
+
/**
* Returns the string representation of this ACL.
- *
+ *
* @return the string representation of this ACL.
*/
String toString();
diff --git a/luni/src/main/java/java/security/acl/AclEntry.java b/luni/src/main/java/java/security/acl/AclEntry.java
index fe2fb3a..02dab70 100644
--- a/luni/src/main/java/java/security/acl/AclEntry.java
+++ b/luni/src/main/java/java/security/acl/AclEntry.java
@@ -23,7 +23,7 @@
/**
* The <i>Access Control List Entry</i> interface definition.
* <p>
- * An {@code AclEntry} is a list of the {@link Permission}s that are
+ * An {@code AclEntry} is a list of the {@link Permission}s that are
* granted (<i>positive</i>) or denied (<i>negative</i>) to a {@link Principal}.
*/
public interface AclEntry extends Cloneable {
@@ -39,14 +39,14 @@
* this entry.
*/
boolean setPrincipal(Principal user);
-
+
/**
* Returns the principal of this ACL entry.
- *
+ *
* @return the principal of this ACL entry, or null if none is set.
*/
Principal getPrincipal();
-
+
/**
* Sets this ACL entry to be <i>negative</i>.
* <p>
@@ -57,62 +57,62 @@
* <i>negative</i> by calling this method.
*/
void setNegativePermissions();
-
+
/**
* Returns whether this ACL entry is <i>negative</i>.
- *
+ *
* @return {@code true} if this ACL entry is negative, {@code false} if it's positive.
*/
boolean isNegative();
-
+
/**
* Adds the specified permission to this ACL entry.
- *
+ *
* @param permission
* the permission to be added.
* @return {@code true} if the specified permission is added, {@code false} if the
* permission was already in this entry.
*/
boolean addPermission(Permission permission);
-
+
/**
* Removes the specified permission from this ACL entry.
- *
+ *
* @param permission
* the permission to be removed.
* @return {@code true} if the permission is removed, {@code false} if the permission was
* not in this entry.
*/
boolean removePermission(Permission permission);
-
+
/**
* Checks whether the specified permission is in this ACL entry.
- *
+ *
* @param permission
* the permission to check.
* @return {@code true} if the permission is in this entry, otherwise {@code false}.
*/
boolean checkPermission(Permission permission);
-
+
/**
* Returns the list of permissions of this ACL entry.
- *
+ *
* @return the list of permissions of this ACL entry,
*/
Enumeration<Permission> permissions();
-
+
/**
* Returns the string representation of this ACL entry.
- *
+ *
* @return the string representation of this ACL entry.
*/
String toString();
-
+
/**
* Clones this ACL entry instance.
- *
+ *
* @return a copy of this entry.
*/
Object clone();
-
+
}
diff --git a/luni/src/main/java/java/security/acl/Group.java b/luni/src/main/java/java/security/acl/Group.java
index 7452181..2117d63 100644
--- a/luni/src/main/java/java/security/acl/Group.java
+++ b/luni/src/main/java/java/security/acl/Group.java
@@ -22,43 +22,43 @@
/**
* A {@code Principal} that represents a group of principals.
- *
+ *
* @see Principal
*/
public interface Group extends Principal {
-
+
/**
* Adds a member to this group.
- *
+ *
* @param user
* the member to add.
* @return {@code true} if the member was added, {@code false} if it was already a member.
*/
boolean addMember(Principal user);
-
+
/**
* Removes a member from this group.
- *
+ *
* @param user
* the member to remove.
* @return {@code true} if the member was removed, {@code false} if it was not a member.
*/
boolean removeMember(Principal user);
-
+
/**
* Returns whether the specified principal is a member of this group.
- *
+ *
* @param member
* the principal to check.
* @return {@code true} if the principal is a member, otherwise {@code false}.
*/
boolean isMember(Principal member);
-
+
/**
* Returns the members of this group.
- *
+ *
* @return the members of this group.
*/
Enumeration<? extends Principal> members();
-
+
}
diff --git a/luni/src/main/java/java/security/acl/NotOwnerException.java b/luni/src/main/java/java/security/acl/NotOwnerException.java
index c7de8c9..d077761 100644
--- a/luni/src/main/java/java/security/acl/NotOwnerException.java
+++ b/luni/src/main/java/java/security/acl/NotOwnerException.java
@@ -21,7 +21,7 @@
* The exception that is thrown when an action that requires ownership is
* attempted by a principal that is not an owner of the object for which
* ownership is required.
- *
+ *
* @see Acl
* @see Owner
*/
diff --git a/luni/src/main/java/java/security/acl/Owner.java b/luni/src/main/java/java/security/acl/Owner.java
index c392e2f..f56db29 100644
--- a/luni/src/main/java/java/security/acl/Owner.java
+++ b/luni/src/main/java/java/security/acl/Owner.java
@@ -21,15 +21,15 @@
/**
* The interface to manage owners of objects that require ownership.
- *
+ *
* @see Acl
* @see Principal
*/
public interface Owner {
-
+
/**
* Adds a principal to the list of owners.
- *
+ *
* @param caller
* the invoking principal.
* @param owner
@@ -38,12 +38,12 @@
* @throws NotOwnerException
* if the invoking principal is not an owner.
*/
- boolean addOwner(Principal caller, Principal owner)
+ boolean addOwner(Principal caller, Principal owner)
throws NotOwnerException;
-
+
/**
* Removes a principal from the list of owners.
- *
+ *
* @param caller
* the invoking principal.
* @param owner
@@ -55,12 +55,12 @@
* if the owner to be removed is the last owner and hence removing it
* would make this object owner-less.
*/
- boolean deleteOwner(Principal caller, Principal owner)
+ boolean deleteOwner(Principal caller, Principal owner)
throws NotOwnerException, LastOwnerException;
-
+
/**
* Checks whether the specified principal is an owner of this object.
- *
+ *
* @param owner
* the principal to check.
* @return {@code true} if the specified principal is an owner, otherwise {@code false}.
diff --git a/luni/src/main/java/java/security/acl/Permission.java b/luni/src/main/java/java/security/acl/Permission.java
index f2ee251..1b452d9 100644
--- a/luni/src/main/java/java/security/acl/Permission.java
+++ b/luni/src/main/java/java/security/acl/Permission.java
@@ -20,25 +20,25 @@
/**
* The interface that represents a permission.
* <p>
- * It can be granted or denied to a {@link java.security.Principal Principal}
- * using an {@link Acl}.
+ * It can be granted or denied to a {@link java.security.Principal Principal}
+ * using an {@link Acl}.
*/
public interface Permission {
-
+
/**
* Checks whether the specified object equals this permission.
- *
+ *
* @param another
* the permission object to compare to this permission.
* @return true if the specified permission object is equal to this, false
* if not.
*/
boolean equals(Object another);
-
+
/**
* Returns the string representation of this permission.
- *
+ *
* @return the string representation of this permission.
*/
String toString();
diff --git a/luni/src/main/java/java/security/cert/CRL.java b/luni/src/main/java/java/security/cert/CRL.java
index 8153853..c40edbd 100644
--- a/luni/src/main/java/java/security/cert/CRL.java
+++ b/luni/src/main/java/java/security/cert/CRL.java
@@ -21,7 +21,7 @@
* This class represents Certificate Revocation Lists (CRLs) maintained by a
* certificate authority. They are used to indicate that a given Certificate has
* expired and consequently has become invalid.
- *
+ *
* @see CertificateFactory
*/
public abstract class CRL {
diff --git a/luni/src/main/java/java/security/cert/CRLException.java b/luni/src/main/java/java/security/cert/CRLException.java
index 01e2071..05ade7c 100644
--- a/luni/src/main/java/java/security/cert/CRLException.java
+++ b/luni/src/main/java/java/security/cert/CRLException.java
@@ -28,7 +28,7 @@
/**
* Creates a new {@code CRLException} with the specified message.
- *
+ *
* @param msg
* the detail message for this exception.
*/
@@ -44,7 +44,7 @@
/**
* Creates a new {@code CRLException} with the specified message and cause.
- *
+ *
* @param message
* the detail message for this exception.
* @param cause
@@ -56,7 +56,7 @@
/**
* Creates a new {@code CRLException} with the specified cause.
- *
+ *
* @param cause
* the cause for this exception.
*/
diff --git a/luni/src/main/java/java/security/cert/CRLSelector.java b/luni/src/main/java/java/security/cert/CRLSelector.java
index 5b14446..6f7ec99 100644
--- a/luni/src/main/java/java/security/cert/CRLSelector.java
+++ b/luni/src/main/java/java/security/cert/CRLSelector.java
@@ -23,7 +23,7 @@
* <p>
* The implementations of this interface are typically used to define the
* criteria for selecting {@code CRL}s from a {@code CertStore}.
- *
+ *
* @see CertStore
* @see CRL
*/
@@ -31,7 +31,7 @@
/**
* Clones this {@code CRLSelector} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone();
@@ -39,7 +39,7 @@
/**
* Checks whether the defined criteria of this instance match the specified
* CRL.
- *
+ *
* @param crl
* the CRL to be evaluated.
* @return {@code true} if the CRL matches the criteria, {@code false}
diff --git a/luni/src/main/java/java/security/cert/CertPath.java b/luni/src/main/java/java/security/cert/CertPath.java
index 5ff1f07..d00adf7 100644
--- a/luni/src/main/java/java/security/cert/CertPath.java
+++ b/luni/src/main/java/java/security/cert/CertPath.java
@@ -114,34 +114,34 @@
*/
public String toString() {
StringBuilder sb = new StringBuilder(getType());
- sb.append(" Cert Path, len=");
+ sb.append(" Cert Path, len=");
sb.append(getCertificates().size());
- sb.append(": [\n");
+ sb.append(": [\n");
int n=1;
// BEGIN android-changed
for (Iterator<? extends Certificate> i=getCertificates().iterator();
i.hasNext(); n++) {
- sb.append("---------------certificate ");
+ sb.append("---------------certificate ");
sb.append(n);
- sb.append("---------------\n");
+ sb.append("---------------\n");
sb.append(((Certificate)i.next()).toString());
}
// END android-changed
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
/**
* Returns an immutable List of the {@code Certificate}s contained
* in the {@code CertPath}.
- *
+ *
* @return a list of {@code Certificate}s in the {@code CertPath}.
*/
public abstract List<? extends Certificate> getCertificates();
/**
* Returns an encoding of the {@code CertPath} using the default encoding.
- *
+ *
* @return default encoding of the {@code CertPath}.
* @throws CertificateEncodingException
* if the encoding fails.
@@ -151,7 +151,7 @@
/**
* Returns an encoding of the {@code CertPath} using the specified encoding.
- *
+ *
* @param encoding
* encoding that should be generated.
* @return default encoding of the {@code CertPath}.
@@ -164,7 +164,7 @@
/**
* Returns an {@code Iterator} over the supported encodings for a
* representation of the certificate path.
- *
+ *
* @return {@code Iterator} over supported encodings (as {@code String}s).
*/
public abstract Iterator<String> getEncodings();
@@ -181,7 +181,7 @@
return new CertPathRep(getType(), getEncoded());
} catch (CertificateEncodingException e) {
throw new NotSerializableException (
- Messages.getString("security.66", e));
+ Messages.getString("security.66", e));
}
}
@@ -200,8 +200,8 @@
// Force default serialization to use writeUnshared/readUnshared
// for cert path data
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("type", String.class),
- new ObjectStreamField("data", byte[].class, true)
+ new ObjectStreamField("type", String.class),
+ new ObjectStreamField("data", byte[].class, true)
};
/**
@@ -232,7 +232,7 @@
return cf.generateCertPath(new ByteArrayInputStream(data));
} catch (Throwable t) {
throw new NotSerializableException(
- Messages.getString("security.67", t));
+ Messages.getString("security.67", t));
}
}
}
diff --git a/luni/src/main/java/java/security/cert/CertPathBuilder.java b/luni/src/main/java/java/security/cert/CertPathBuilder.java
index eb28742..e0b8e52 100644
--- a/luni/src/main/java/java/security/cert/CertPathBuilder.java
+++ b/luni/src/main/java/java/security/cert/CertPathBuilder.java
@@ -35,17 +35,17 @@
public class CertPathBuilder {
// Store CertPathBuilder service name
- private static final String SERVICE = "CertPathBuilder";
+ private static final String SERVICE = "CertPathBuilder";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
// Store default property name
- private static final String PROPERTYNAME = "certpathbuilder.type";
+ private static final String PROPERTYNAME = "certpathbuilder.type";
// Default value of CertPathBuilder type. It returns if certpathbuild.type
// property is not defined in java.security file
- private static final String DEFAULTPROPERTY = "PKIX";
+ private static final String DEFAULTPROPERTY = "PKIX";
// Store used provider
private final Provider provider;
@@ -94,7 +94,7 @@
/**
* Creates a new {@code CertPathBuilder} instance with the specified
* algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @return a builder for the requested algorithm.
@@ -106,7 +106,7 @@
public static CertPathBuilder getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -118,7 +118,7 @@
/**
* Creates a new {@code CertPathBuilder} instance from the specified
* provider providing the specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @param provider
@@ -136,7 +136,7 @@
public static CertPathBuilder getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -149,7 +149,7 @@
/**
* Creates a new {@code CertPathBuilder} instance from the specified
* provider providing the specified algorithm.
- *
+ *
* @param algorithm
* the name of the algorithm.
* @param provider
@@ -165,10 +165,10 @@
public static CertPathBuilder getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/java/security/cert/CertPathBuilderException.java b/luni/src/main/java/java/security/cert/CertPathBuilderException.java
index 58a4a60..59b3f8f 100644
--- a/luni/src/main/java/java/security/cert/CertPathBuilderException.java
+++ b/luni/src/main/java/java/security/cert/CertPathBuilderException.java
@@ -29,7 +29,7 @@
/**
* Creates a new {@code CertPathBuilderException} with the specified message
* and cause.
- *
+ *
* @param msg
* the detail message for the exception
* @param cause
@@ -41,7 +41,7 @@
/**
* Creates a new {@code CertPathBuilderException} with the specified cause.
- *
+ *
* @param cause
* why the building of the certification path failed.
*/
@@ -52,7 +52,7 @@
/**
* Creates a new {@code CertPathBuilderException} with the specified
* message.
- *
+ *
* @param msg
* the detail message for the exception.
*/
diff --git a/luni/src/main/java/java/security/cert/CertPathBuilderResult.java b/luni/src/main/java/java/security/cert/CertPathBuilderResult.java
index 36d99a1..75db612 100644
--- a/luni/src/main/java/java/security/cert/CertPathBuilderResult.java
+++ b/luni/src/main/java/java/security/cert/CertPathBuilderResult.java
@@ -25,14 +25,14 @@
/**
* Clones this {@code CertPathBuilderResult} instance.
- *
+ *
* @return the copy of this instance.
*/
public Object clone();
/**
* Returns the built {@code CertPath} instance. Never returns {@code null}.
- *
+ *
* @return the built certificate path instance.
*/
public CertPath getCertPath();
diff --git a/luni/src/main/java/java/security/cert/CertPathBuilderSpi.java b/luni/src/main/java/java/security/cert/CertPathBuilderSpi.java
index 80ee0ef..106d5d9 100644
--- a/luni/src/main/java/java/security/cert/CertPathBuilderSpi.java
+++ b/luni/src/main/java/java/security/cert/CertPathBuilderSpi.java
@@ -33,7 +33,7 @@
/**
* Builds a certification path with the specified algorithm parameters.
- *
+ *
* @param params
* the algorithm parameters.
* @return a result of the build.
diff --git a/luni/src/main/java/java/security/cert/CertPathParameters.java b/luni/src/main/java/java/security/cert/CertPathParameters.java
index e2cee18..1bd9b8a 100644
--- a/luni/src/main/java/java/security/cert/CertPathParameters.java
+++ b/luni/src/main/java/java/security/cert/CertPathParameters.java
@@ -27,7 +27,7 @@
/**
* Clones this {@code CertPathParameters} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone();
diff --git a/luni/src/main/java/java/security/cert/CertPathValidator.java b/luni/src/main/java/java/security/cert/CertPathValidator.java
index 3ec3a66..dfb9ee6 100644
--- a/luni/src/main/java/java/security/cert/CertPathValidator.java
+++ b/luni/src/main/java/java/security/cert/CertPathValidator.java
@@ -35,17 +35,17 @@
*/
public class CertPathValidator {
// Store CertPathValidator implementation service name
- private static final String SERVICE = "CertPathValidator";
+ private static final String SERVICE = "CertPathValidator";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
// Store default property name
- private static final String PROPERTYNAME = "certpathvalidator.type";
+ private static final String PROPERTYNAME = "certpathvalidator.type";
// Default value of CertPathBuilder type. It returns if certpathbuild.type
// property is not defined in java.security file
- private static final String DEFAULTPROPERTY = "PKIX";
+ private static final String DEFAULTPROPERTY = "PKIX";
// Store used provider
private final Provider provider;
@@ -93,7 +93,7 @@
/**
* Returns a new certification path validator for the specified algorithm.
- *
+ *
* @param algorithm
* the algorithm name.
* @return a certification path validator for the requested algorithm.
@@ -105,7 +105,7 @@
public static CertPathValidator getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -117,7 +117,7 @@
/**
* Returns a new certification path validator for the specified algorithm
* from the specified provider.
- *
+ *
* @param algorithm
* the algorithm name.
* @param provider
@@ -137,7 +137,7 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -149,7 +149,7 @@
/**
* Returns a new certification path validator for the specified algorithm
* from the specified provider.
- *
+ *
* @param algorithm
* the algorithm name.
* @param provider
@@ -166,10 +166,10 @@
public static CertPathValidator getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
@@ -181,7 +181,7 @@
/**
* Validates the {@code CertPath} with the algorithm of this {@code
* CertPathValidator} using the specified algorithm parameters.
- *
+ *
* @param certPath
* the certification path to be validated.
* @param params
diff --git a/luni/src/main/java/java/security/cert/CertPathValidatorException.java b/luni/src/main/java/java/security/cert/CertPathValidatorException.java
index e3b82c9..c9c19b3 100644
--- a/luni/src/main/java/java/security/cert/CertPathValidatorException.java
+++ b/luni/src/main/java/java/security/cert/CertPathValidatorException.java
@@ -47,7 +47,7 @@
* Creates a new {@code CertPathValidatorException} with the specified
* message , cause, certification path and certificate index in the
* certification path.
- *
+ *
* @param msg
* the detail message for this exception.
* @param cause
@@ -69,11 +69,11 @@
// check certPath and index parameters
if ((certPath == null) && (index != -1)) {
throw new IllegalArgumentException(
- Messages.getString("security.53"));
+ Messages.getString("security.53"));
}
if ((certPath != null)
&& ((index < -1) || (index >= certPath.getCertificates().size()))) {
- throw new IndexOutOfBoundsException(Messages.getString("security.54"));
+ throw new IndexOutOfBoundsException(Messages.getString("security.54"));
}
this.certPath = certPath;
this.index = index;
@@ -82,7 +82,7 @@
/**
* Creates a new {@code CertPathValidatorException} with the specified
* message and cause.
- *
+ *
* @param msg
* the detail message for this exception.
* @param cause
@@ -95,7 +95,7 @@
/**
* Creates a new {@code CertPathValidatorException} with the specified
* cause.
- *
+ *
* @param cause
* the cause why the path could not be validated.
*/
@@ -106,7 +106,7 @@
/**
* Creates a new {@code CertPathValidatorException} with the specified
* message.
- *
+ *
* @param msg
* the detail message for this exception.
*/
@@ -122,7 +122,7 @@
/**
* Returns the certification path that failed validation.
- *
+ *
* @return the certification path that failed validation, or {@code null} if
* none was specified.
*/
@@ -132,7 +132,7 @@
/**
* Returns the index of the failed certificate in the certification path.
- *
+ *
* @return the index of the failed certificate in the certification path, or
* {@code -1} if none was specified.
*/
diff --git a/luni/src/main/java/java/security/cert/CertPathValidatorResult.java b/luni/src/main/java/java/security/cert/CertPathValidatorResult.java
index 7fab21a..2e74286 100644
--- a/luni/src/main/java/java/security/cert/CertPathValidatorResult.java
+++ b/luni/src/main/java/java/security/cert/CertPathValidatorResult.java
@@ -26,7 +26,7 @@
/**
* Clones this {@code CertPathValidatorResult} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone();
diff --git a/luni/src/main/java/java/security/cert/CertSelector.java b/luni/src/main/java/java/security/cert/CertSelector.java
index c490b22..5b91bb8 100644
--- a/luni/src/main/java/java/security/cert/CertSelector.java
+++ b/luni/src/main/java/java/security/cert/CertSelector.java
@@ -23,7 +23,7 @@
* <p>
* The implementations of this interface are typically used to define the
* criteria for selecting {@code Certificate}s from a {@code CertStore}.
- *
+ *
* @see CertStore
* @see Certificate
*/
@@ -31,7 +31,7 @@
/**
* Clones this {@code CertSelector} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone();
@@ -39,7 +39,7 @@
/**
* Checks whether the defined criteria of this instance match the specified
* certificate.
- *
+ *
* @param cert
* the certificate to be evaluated.
* @return {@code true} if the certificate matches the criteria, {@code
diff --git a/luni/src/main/java/java/security/cert/CertStore.java b/luni/src/main/java/java/security/cert/CertStore.java
index 7e286a3..f5332d4 100644
--- a/luni/src/main/java/java/security/cert/CertStore.java
+++ b/luni/src/main/java/java/security/cert/CertStore.java
@@ -37,17 +37,17 @@
public class CertStore {
// Store spi implementation service name
- private static final String SERVICE = "CertStore";
+ private static final String SERVICE = "CertStore";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
// Store default property name
- private static final String PROPERTYNAME = "certstore.type";
+ private static final String PROPERTYNAME = "certstore.type";
// Default value of CertStore type. It returns if certpathbuild.type
// property is not defined in java.security file
- private static final String DEFAULTPROPERTY = "LDAP";
+ private static final String DEFAULTPROPERTY = "LDAP";
// Store used provider
private final Provider provider;
@@ -84,7 +84,7 @@
/**
* Creates a new {@code CertStore} instance with the specified type and
* initialized with the specified parameters.
- *
+ *
* @param type
* the certificate store type.
* @param params
@@ -102,7 +102,7 @@
public static CertStore getInstance(String type, CertStoreParameters params)
throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
try {
synchronized (engine) {
@@ -123,7 +123,7 @@
/**
* Creates a new {@code CertStore} instance from the specified provider with
* the specified type and initialized with the specified parameters.
- *
+ *
* @param type
* the certificate store type.
* @param params
@@ -149,7 +149,7 @@
throws InvalidAlgorithmParameterException,
NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -183,10 +183,10 @@
CertStoreParameters params, Provider provider)
throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
try {
synchronized (engine) {
diff --git a/luni/src/main/java/java/security/cert/CertStoreException.java b/luni/src/main/java/java/security/cert/CertStoreException.java
index 7f356b2..4fb5445 100644
--- a/luni/src/main/java/java/security/cert/CertStoreException.java
+++ b/luni/src/main/java/java/security/cert/CertStoreException.java
@@ -29,7 +29,7 @@
/**
* Creates a new {@code CertStoreException} with the specified message and
* cause.
- *
+ *
* @param msg
* the detail message for this exception.
* @param cause
@@ -41,7 +41,7 @@
/**
* Creates a new {@code CertStoreException} with the specified cause.
- *
+ *
* @param cause
* the cause why the access to the certificate store failed.
*/
@@ -51,7 +51,7 @@
/**
* Creates a new {@code CertStoreException} with the specified message.
- *
+ *
* @param msg
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/security/cert/CertStoreParameters.java b/luni/src/main/java/java/security/cert/CertStoreParameters.java
index 06a1976..7a99d83 100644
--- a/luni/src/main/java/java/security/cert/CertStoreParameters.java
+++ b/luni/src/main/java/java/security/cert/CertStoreParameters.java
@@ -25,7 +25,7 @@
/**
* Clones this {@code CertStoreParameters} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone();
diff --git a/luni/src/main/java/java/security/cert/CertStoreSpi.java b/luni/src/main/java/java/security/cert/CertStoreSpi.java
index cb38a31..1880136 100644
--- a/luni/src/main/java/java/security/cert/CertStoreSpi.java
+++ b/luni/src/main/java/java/security/cert/CertStoreSpi.java
@@ -28,7 +28,7 @@
/**
* Creates a new {@code CertStoreSpi}.
- *
+ *
* @param params
* the initialization parameters.
* @throws InvalidAlgorithmParameterException
@@ -42,7 +42,7 @@
/**
* Returns the list of {@code Certificate}s for the specified {@code
* CertSelector} from this instance.
- *
+ *
* @param selector
* the selector containing the criteria to search for
* certificates in this instance.
@@ -57,7 +57,7 @@
/**
* Returns the list of {@code CRL}s for the specified {@code CRLSelector}
* from this instance.
- *
+ *
* @param selector
* the selector containing the criteria to search for certificate
* revocation lists in instance.
diff --git a/luni/src/main/java/java/security/cert/Certificate.java b/luni/src/main/java/java/security/cert/Certificate.java
index 0fc4eda..8fe94f1 100644
--- a/luni/src/main/java/java/security/cert/Certificate.java
+++ b/luni/src/main/java/java/security/cert/Certificate.java
@@ -197,9 +197,9 @@
protected Object writeReplace() throws ObjectStreamException {
try {
return new CertificateRep(getType(), getEncoded());
- } catch (CertificateEncodingException e) {
+ } catch (CertificateEncodingException e) {
throw new NotSerializableException (
- Messages.getString("security.66", e));
+ Messages.getString("security.66", e));
}
}
@@ -218,8 +218,8 @@
// Force default serialization to use writeUnshared/readUnshared
// for the certificate data
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("type", String.class),
- new ObjectStreamField("data", byte[].class, true)
+ new ObjectStreamField("type", String.class),
+ new ObjectStreamField("data", byte[].class, true)
};
/**
@@ -250,7 +250,7 @@
return cf.generateCertificate(new ByteArrayInputStream(data));
} catch (Throwable t) {
throw new NotSerializableException(
- Messages.getString("security.68", t));
+ Messages.getString("security.68", t));
}
}
}
diff --git a/luni/src/main/java/java/security/cert/CertificateEncodingException.java b/luni/src/main/java/java/security/cert/CertificateEncodingException.java
index c5532b9..0abebc9 100644
--- a/luni/src/main/java/java/security/cert/CertificateEncodingException.java
+++ b/luni/src/main/java/java/security/cert/CertificateEncodingException.java
@@ -28,7 +28,7 @@
/**
* Creates a new {@code CertificateEncodingException} with the specified
* message.
- *
+ *
* @param msg
* The detail message for the exception.
*/
@@ -45,7 +45,7 @@
/**
* Creates a new {@code CertificateEncodingException} with the specified
* message and cause.
- *
+ *
* @param message
* the detail message for the exception.
* @param cause
@@ -58,7 +58,7 @@
/**
* Creates a new {@code CertificateEncodingException} with the specified
* cause.
- *
+ *
* @param cause
* the cause.
*/
diff --git a/luni/src/main/java/java/security/cert/CertificateException.java b/luni/src/main/java/java/security/cert/CertificateException.java
index 8b1c4d3..ebf1e3f 100644
--- a/luni/src/main/java/java/security/cert/CertificateException.java
+++ b/luni/src/main/java/java/security/cert/CertificateException.java
@@ -28,7 +28,7 @@
/**
* Creates a new {@code CertificateException} with the specified message.
- *
+ *
* @param msg
* the detail message for the exception.
*/
@@ -45,7 +45,7 @@
/**
* Creates a new {@code CertificateException} with the specified message and
* cause.
- *
+ *
* @param message
* the detail message for the exception.
* @param cause
@@ -57,7 +57,7 @@
/**
* Creates a new {@code CertificateException} with the specified cause.
- *
+ *
* @param cause
* the cause
*/
diff --git a/luni/src/main/java/java/security/cert/CertificateExpiredException.java b/luni/src/main/java/java/security/cert/CertificateExpiredException.java
index e15bf98..c24b171 100644
--- a/luni/src/main/java/java/security/cert/CertificateExpiredException.java
+++ b/luni/src/main/java/java/security/cert/CertificateExpiredException.java
@@ -27,7 +27,7 @@
/**
* Creates a new {@code CertificateExpiredException} with the specified
* message.
- *
+ *
* @param msg
* the detail message for this exception
*/
diff --git a/luni/src/main/java/java/security/cert/CertificateFactory.java b/luni/src/main/java/java/security/cert/CertificateFactory.java
index c746f7e..0199a96 100644
--- a/luni/src/main/java/java/security/cert/CertificateFactory.java
+++ b/luni/src/main/java/java/security/cert/CertificateFactory.java
@@ -40,7 +40,7 @@
public class CertificateFactory {
// Store CertificateFactory service name
- private static final String SERVICE = "CertificateFactory";
+ private static final String SERVICE = "CertificateFactory";
// Used to access common engine functionality
private static Engine engine = new Engine(SERVICE);
@@ -74,7 +74,7 @@
/**
* Creates a new {@code CertificateFactory} instance that provides the
* requested certificate type.
- *
+ *
* @param type
* the certificate type.
* @return the new {@code CertificateFactory} instance.
@@ -87,7 +87,7 @@
public static final CertificateFactory getInstance(String type)
throws CertificateException {
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
try {
synchronized (engine) {
@@ -103,7 +103,7 @@
/**
* Creates a new {@code CertificateFactory} instance from the specified
* provider that provides the requested certificate type.
- *
+ *
* @param type
* the certificate type.
* @param provider
@@ -124,7 +124,7 @@
String provider) throws CertificateException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02"));
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -136,7 +136,7 @@
/**
* Creates a new {@code CertificateFactory} instance from the specified
* provider that provides the requested certificate type.
- *
+ *
* @param type
* the certificate type.
* @param provider
@@ -154,10 +154,10 @@
public static final CertificateFactory getInstance(String type,
Provider provider) throws CertificateException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("security.04"));
+ throw new IllegalArgumentException(Messages.getString("security.04"));
}
if (type == null) {
- throw new NullPointerException(Messages.getString("security.07"));
+ throw new NullPointerException(Messages.getString("security.07"));
}
try {
synchronized (engine) {
@@ -173,7 +173,7 @@
/**
* Returns the {@code Provider} of the certificate factory represented by
* the certificate.
- *
+ *
* @return the provider of this certificate factory.
*/
public final Provider getProvider() {
@@ -182,7 +182,7 @@
/**
* Returns the Certificate type.
- *
+ *
* @return type of certificate being used.
*/
public final String getType() {
@@ -192,7 +192,7 @@
/**
* Generates and initializes a {@code Certificate} from the provided input
* stream.
- *
+ *
* @param inStream
* the stream from where data is read to create the {@code
* Certificate}.
@@ -208,7 +208,7 @@
/**
* Returns an {@code Iterator} over the supported {@code CertPath} encodings
* (as Strings). The first element is the default encoding scheme to apply.
- *
+ *
* @return an iterator over supported {@link CertPath} encodings (as
* Strings).
*/
@@ -219,7 +219,7 @@
/**
* Generates a {@code CertPath} (a certificate chain) from the provided
* {@code InputStream}. The default encoding scheme is applied.
- *
+ *
* @param inStream
* {@code InputStream} with encoded data.
* @return a {@code CertPath} initialized from the provided data.
@@ -230,7 +230,7 @@
throws CertificateException {
Iterator<String> it = getCertPathEncodings();
if (!it.hasNext()) {
- throw new CertificateException(Messages.getString("security.74"));
+ throw new CertificateException(Messages.getString("security.74"));
}
return spiImpl.engineGenerateCertPath(inStream, it.next());
}
@@ -238,7 +238,7 @@
/**
* Generates a {@code CertPath} (a certificate chain) from the provided
* {@code InputStream} and the specified encoding scheme.
- *
+ *
* @param inStream
* {@code InputStream} containing certificate path data in
* specified encoding.
@@ -258,7 +258,7 @@
/**
* Generates a {@code CertPath} from the provided list of certificates. The
* encoding is the default encoding.
- *
+ *
* @param certificates
* the list containing certificates in a format supported by the
* {@code CertificateFactory}.
@@ -276,7 +276,7 @@
/**
* Generates and initializes a collection of (unrelated) certificates from
* the provided input stream.
- *
+ *
* @param inStream
* the stream from which the data is read to create the
* collection.
@@ -292,7 +292,7 @@
/**
* Generates and initializes a <i>Certificate Revocation List</i> (CRL) from
* the provided input stream.
- *
+ *
* @param inStream
* the stream from where data is read to create the CRL.
* @return an initialized CRL.
@@ -306,7 +306,7 @@
/**
* Generates and initializes a collection of <i>Certificate Revocation
* List</i> (CRL) from the provided input stream.
- *
+ *
* @param inStream
* the stream from which the data is read to create the CRLs.
* @return an initialized collection of CRLs.
diff --git a/luni/src/main/java/java/security/cert/CertificateFactorySpi.java b/luni/src/main/java/java/security/cert/CertificateFactorySpi.java
index 625b7c3..5b6db66 100644
--- a/luni/src/main/java/java/security/cert/CertificateFactorySpi.java
+++ b/luni/src/main/java/java/security/cert/CertificateFactorySpi.java
@@ -41,7 +41,7 @@
/**
* Generates and initializes a {@code Certificate} from the provided input
* stream.
- *
+ *
* @param inStream
* the stream from which the data is read to create the
* certificate.
@@ -55,20 +55,20 @@
/**
* Generates and initializes a collection of certificates from the provided
* input stream.
- *
+ *
* @param inStream
* the stream from where data is read to create the certificates.
* @return a collection of certificates.
* @exception CertificateException
* if parsing problems are detected.
*/
- public abstract Collection<? extends Certificate>
+ public abstract Collection<? extends Certificate>
engineGenerateCertificates(InputStream inStream) throws CertificateException;
/**
* Generates and initializes a <i>Certificate Revocation List</i> (CRL) from
* the provided input stream.
- *
+ *
* @param inStream
* the stream from where data is read to create the CRL.
* @return an CRL instance.
@@ -81,20 +81,20 @@
/**
* Generates and initializes a collection of <i>Certificate Revocation
* List</i> (CRL) from the provided input stream.
- *
+ *
* @param inStream
* the stream from which the data is read to create the CRLs.
* @return a collection of CRLs.
* @exception CRLException
* if parsing problems are detected.
*/
- public abstract Collection<? extends CRL>
+ public abstract Collection<? extends CRL>
engineGenerateCRLs(InputStream inStream) throws CRLException;
/**
* Generates a {@code CertPath} from the provided {@code InputStream}. The
* default encoding scheme is applied.
- *
+ *
* @param inStream
* an input stream with encoded data.
* @return a {@code CertPath} initialized from the provided data.
@@ -104,13 +104,13 @@
public CertPath engineGenerateCertPath(InputStream inStream)
throws CertificateException {
throw new UnsupportedOperationException(
- Messages.getString("security.70"));
+ Messages.getString("security.70"));
}
/**
* Generates a {@code CertPath} from the provided {@code
* InputStream} in the specified encoding.
- *
+ *
* @param inStream
* an input stream containing certificate path data in specified
* encoding.
@@ -125,13 +125,13 @@
public CertPath engineGenerateCertPath(InputStream inStream, String encoding)
throws CertificateException {
throw new UnsupportedOperationException(
- Messages.getString("security.71"));
+ Messages.getString("security.71"));
}
/**
* Generates a {@code CertPath} from the provided list of certificates. The
* encoding is the default encoding.
- *
+ *
* @param certificates
* the list containing certificates in a format supported by the
* {@code CertificateFactory}.
@@ -141,21 +141,21 @@
* @throws UnsupportedOperationException
* if the provider does not implement this method.
*/
- public CertPath engineGenerateCertPath(List<? extends Certificate> certificates)
+ public CertPath engineGenerateCertPath(List<? extends Certificate> certificates)
throws CertificateException {
throw new UnsupportedOperationException(
- Messages.getString("security.72"));
+ Messages.getString("security.72"));
}
/**
* Returns an {@code Iterator} over the supported {@code CertPath} encodings
* (as Strings). The first element is the default encoding.
- *
+ *
* @return an iterator over supported {@code CertPath} encodings (as
* Strings).
*/
public Iterator<String> engineGetCertPathEncodings() {
throw new UnsupportedOperationException(
- Messages.getString("security.73"));
+ Messages.getString("security.73"));
}
}
diff --git a/luni/src/main/java/java/security/cert/CertificateNotYetValidException.java b/luni/src/main/java/java/security/cert/CertificateNotYetValidException.java
index dd26bf8..bb1dcd4 100644
--- a/luni/src/main/java/java/security/cert/CertificateNotYetValidException.java
+++ b/luni/src/main/java/java/security/cert/CertificateNotYetValidException.java
@@ -28,7 +28,7 @@
/**
* Creates a new {@code CertificateNotYetValidException} with the specified
* message.
- *
+ *
* @param msg
* the detail message for the exception.
*/
diff --git a/luni/src/main/java/java/security/cert/CollectionCertStoreParameters.java b/luni/src/main/java/java/security/cert/CollectionCertStoreParameters.java
index 54b944b..de3c85d 100644
--- a/luni/src/main/java/java/security/cert/CollectionCertStoreParameters.java
+++ b/luni/src/main/java/java/security/cert/CollectionCertStoreParameters.java
@@ -96,9 +96,9 @@
*/
public String toString() {
StringBuilder sb =
- new StringBuilder("CollectionCertStoreParameters: [\ncollection: ");
+ new StringBuilder("CollectionCertStoreParameters: [\ncollection: ");
sb.append(getCollection().toString());
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/LDAPCertStoreParameters.java b/luni/src/main/java/java/security/cert/LDAPCertStoreParameters.java
index 90a396e..5b01f90 100644
--- a/luni/src/main/java/java/security/cert/LDAPCertStoreParameters.java
+++ b/luni/src/main/java/java/security/cert/LDAPCertStoreParameters.java
@@ -22,8 +22,8 @@
*/
public class LDAPCertStoreParameters implements CertStoreParameters {
// Default LDAP server name
- private static final String DEFAULT_LDAP_SERVER_NAME = "localhost";
- // Default LDAP server port number
+ private static final String DEFAULT_LDAP_SERVER_NAME = "localhost";
+ // Default LDAP server port number
private static final int DEFAULT_LDAP_PORT = 389;
// LDAP server name for this cert store
@@ -118,11 +118,11 @@
*/
public String toString() {
StringBuilder sb =
- new StringBuilder("LDAPCertStoreParameters: [\n serverName: ");
+ new StringBuilder("LDAPCertStoreParameters: [\n serverName: ");
sb.append(getServerName());
- sb.append("\n port: ");
+ sb.append("\n port: ");
sb.append(getPort());
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/PKIXBuilderParameters.java b/luni/src/main/java/java/security/cert/PKIXBuilderParameters.java
index 1f3daf8..f0871c1 100644
--- a/luni/src/main/java/java/security/cert/PKIXBuilderParameters.java
+++ b/luni/src/main/java/java/security/cert/PKIXBuilderParameters.java
@@ -27,8 +27,8 @@
/**
* The parameter specification for a PKIX {@code CertPathBuilder}
- * algorithm used to {@link CertPathBuilder#build(CertPathParameters) build}
- * certificate chains validated with the PKIX certification path validation.
+ * algorithm used to {@link CertPathBuilder#build(CertPathParameters) build}
+ * certificate chains validated with the PKIX certification path validation.
* <p>
* The parameters must be created with <i>trusted</i> certificate authorities
* and constraints for the target certificates.
@@ -43,7 +43,7 @@
/**
* Creates a new {@code PKIXBuilderParameters} instance with the specified
* set of {@code TrustAnchor} and certificate constraints.
- *
+ *
* @param trustAnchors
* the set of {@code TrustAnchors}.
* @param targetConstraints
@@ -64,7 +64,7 @@
/**
* Creates a new {@code PKIXBuilderParameters} instance with the trusted
* {@code X509Certificate} entries from the specified {@code KeyStore}.
- *
+ *
* @param keyStore
* the key store containing trusted certificates.
* @param targetConstraints
@@ -101,7 +101,7 @@
* <p>
* This is the maximum number of non-self-signed certificates in a
* certification path.
- *
+ *
* @param maxPathLength
* the maximum length of a certification path.
* @throws InvalidParameterException
@@ -110,7 +110,7 @@
public void setMaxPathLength(int maxPathLength) {
if (maxPathLength < -1) {
throw new InvalidParameterException(
- Messages.getString("security.5B"));
+ Messages.getString("security.5B"));
}
this.maxPathLength = maxPathLength;
}
@@ -118,16 +118,16 @@
/**
* Returns a string representation of this {@code PKIXBuilderParameters}
* instance.
- *
+ *
* @return a string representation of this {@code PKIXBuilderParameters}
* instance.
*/
public String toString() {
- StringBuilder sb = new StringBuilder("[\n");
+ StringBuilder sb = new StringBuilder("[\n");
sb.append(super.toString());
- sb.append(" Max Path Length: ");
+ sb.append(" Max Path Length: ");
sb.append(maxPathLength);
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/PKIXCertPathBuilderResult.java b/luni/src/main/java/java/security/cert/PKIXCertPathBuilderResult.java
index 3e0622fa..f113c3c 100644
--- a/luni/src/main/java/java/security/cert/PKIXCertPathBuilderResult.java
+++ b/luni/src/main/java/java/security/cert/PKIXCertPathBuilderResult.java
@@ -35,7 +35,7 @@
* Creates a new {@code PKIXCertPathBuilderResult} instance with the
* specified validated certification path, the trust anchor of the
* certification path, the policy tree and the public key of the subject.
- *
+ *
* @param certPath
* the validated certification path.
* @param trustAnchor
@@ -53,13 +53,13 @@
super(trustAnchor, policyTree, subjectPublicKey);
this.certPath = certPath;
if (this.certPath == null) {
- throw new NullPointerException(Messages.getString("security.55"));
+ throw new NullPointerException(Messages.getString("security.55"));
}
}
/**
* Returns the validated certification path.
- *
+ *
* @return the validated certification path.
*/
public CertPath getCertPath() {
@@ -69,15 +69,15 @@
/**
* Returns a string representation of this {@code PKIXCertPathBuilderResult}
* instance.
- *
+ *
* @return a string representation of this {@code PKIXCertPathBuilderResult}
* instance.
*/
public String toString() {
StringBuilder sb = new StringBuilder(super.toString());
- sb.append("\n Certification Path: ");
+ sb.append("\n Certification Path: ");
sb.append(certPath.toString());
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/PKIXCertPathChecker.java b/luni/src/main/java/java/security/cert/PKIXCertPathChecker.java
index 5eaac74..0991cd5 100644
--- a/luni/src/main/java/java/security/cert/PKIXCertPathChecker.java
+++ b/luni/src/main/java/java/security/cert/PKIXCertPathChecker.java
@@ -48,7 +48,7 @@
/**
* Clones this {@code PKIXCertPathChecker} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone() {
@@ -62,7 +62,7 @@
/**
* Initializes this {@code PKIXCertPathChecker} instance for specified
* <i>checking direction</i>.
- *
+ *
* @param forward
* the direction of the certification path processing, {@code
* true} if the certificates are processed in forward direction
@@ -79,7 +79,7 @@
/**
* Returns whether this {@code PKIXCertPathChecker} instance supports
* <i>forward checking</i>.
- *
+ *
* @return {@code true} if this {@code PKIXCertPathChecker} instance
* supports forward checking, otherwise {@code false}.
*/
@@ -88,7 +88,7 @@
/**
* Returns the list of extensions of X.509 certificates that this {@code
* PKIXCertPathChecker} is able to process.
- *
+ *
* @return the list of extensions of X.509 certificates that this {@code
* PKIXCertPathChecker} is able to process, or {@code null} if there
* are none.
@@ -98,7 +98,7 @@
/**
* Checks the specified certificate and removes the processed critical
* extensions from the specified list of X.509 extension <i>OID</i>s.
- *
+ *
* @param cert
* the certificate.
* @param unresolvedCritExts
diff --git a/luni/src/main/java/java/security/cert/PKIXCertPathValidatorResult.java b/luni/src/main/java/java/security/cert/PKIXCertPathValidatorResult.java
index 5b3a21c..35f16d9 100644
--- a/luni/src/main/java/java/security/cert/PKIXCertPathValidatorResult.java
+++ b/luni/src/main/java/java/security/cert/PKIXCertPathValidatorResult.java
@@ -23,7 +23,7 @@
/**
* The implementation of the result of the PKIX certification path validation.
- *
+ *
* @see CertPathValidator
* @see CertPathValidator#validate(CertPath, CertPathParameters)
*/
@@ -39,7 +39,7 @@
/**
* Creates a new {@code PKIXCertPathValidatorResult} with the specified
* trust anchor, the valid policy tree and the subject public key.
- *
+ *
* @param trustAnchor
* the trust anchor describing the certification authority (CA)
* that served as trust anchor for the certification path.
@@ -54,17 +54,17 @@
this.policyTree = policyTree;
this.subjectPublicKey = subjectPublicKey;
if (this.trustAnchor == null) {
- throw new NullPointerException(Messages.getString("security.64"));
+ throw new NullPointerException(Messages.getString("security.64"));
}
if (this.subjectPublicKey == null) {
throw new NullPointerException(
- Messages.getString("security.65"));
+ Messages.getString("security.65"));
}
}
/**
* Returns the valid policy tree from the validation.
- *
+ *
* @return the valid policy tree from the validation.
*/
public PolicyNode getPolicyTree() {
@@ -73,7 +73,7 @@
/**
* Returns the subject public key from the validation.
- *
+ *
* @return the subject public key from the validation.
*/
public PublicKey getPublicKey() {
@@ -83,7 +83,7 @@
/**
* Returns the trust anchor describing the certification authority (CA) that
* served as trust anchor for this certification path.
- *
+ *
* @return the trust anchor.
*/
public TrustAnchor getTrustAnchor() {
@@ -92,7 +92,7 @@
/**
* Clones this {@code PKIXCertPathValidatorResult} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone() {
@@ -106,20 +106,20 @@
/**
* Returns a string representation for this {@code
* PKIXCertPathValidatorResult} instance.
- *
+ *
* @return a string representation for this {@code
* PKIXCertPathValidatorResult} instance.
*/
public String toString() {
StringBuilder sb = new StringBuilder(super.toString());
- sb.append(": [\n Trust Anchor: ");
+ sb.append(": [\n Trust Anchor: ");
sb.append(trustAnchor.toString());
- sb.append("\n Policy Tree: ");
- sb.append(policyTree == null ? "no valid policy tree\n"
+ sb.append("\n Policy Tree: ");
+ sb.append(policyTree == null ? "no valid policy tree\n"
: policyTree.toString());
- sb.append("\n Subject Public Key: ");
+ sb.append("\n Subject Public Key: ");
sb.append(subjectPublicKey.toString());
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/PKIXParameters.java b/luni/src/main/java/java/security/cert/PKIXParameters.java
index 2c89e96..173e666 100644
--- a/luni/src/main/java/java/security/cert/PKIXParameters.java
+++ b/luni/src/main/java/java/security/cert/PKIXParameters.java
@@ -72,7 +72,7 @@
/**
* Creates a new {@code PKIXParameters} instance with the specified set of
* <i>trusted</i> certificate authorities.
- *
+ *
* @param trustAnchors
* the trusted CAs.
* @throws InvalidAlgorithmParameterException
@@ -81,7 +81,7 @@
public PKIXParameters(Set<TrustAnchor> trustAnchors)
throws InvalidAlgorithmParameterException {
if (trustAnchors == null) {
- throw new NullPointerException(Messages.getString("security.6F"));
+ throw new NullPointerException(Messages.getString("security.6F"));
}
checkTrustAnchors(trustAnchors);
this.trustAnchors = new HashSet<TrustAnchor>(trustAnchors);
@@ -90,7 +90,7 @@
/**
* Creates a new {@code PKIXParameters} instance with the trusted {@code
* X509Certificate} entries from the specified {@code KeyStore}.
- *
+ *
* @param keyStore
* the key store containing trusted certificates.
* @throws KeyStoreException
@@ -103,13 +103,13 @@
throws KeyStoreException,
InvalidAlgorithmParameterException {
if (keyStore == null) {
- throw new NullPointerException(Messages.getString("security.41"));
+ throw new NullPointerException(Messages.getString("security.41"));
}
// Will throw KeyStoreException if
// keyStore has not been initialized (loaded)
if (keyStore.size() == 0) {
throw new InvalidAlgorithmParameterException(
- Messages.getString("security.6A"));
+ Messages.getString("security.6A"));
}
// keyStore is not null and loaded
trustAnchors = new HashSet<TrustAnchor>();
@@ -131,7 +131,7 @@
/**
* Returns a unmodifiable set of the <i>trusted</i> certificate authorities.
- *
+ *
* @return a unmodifiable set of the <i>trusted</i> certificate authorities.
*/
public Set<TrustAnchor> getTrustAnchors() {
@@ -140,7 +140,7 @@
/**
* Sets the set of <i>trusted</i> certificate authorities.
- *
+ *
* @param trustAnchors
* the set of <i>trusted</i> certificate authorities.
* @throws InvalidAlgorithmParameterException
@@ -150,7 +150,7 @@
throws InvalidAlgorithmParameterException {
if (trustAnchors == null) {
throw new NullPointerException(
- Messages.getString("security.6F"));
+ Messages.getString("security.6F"));
}
checkTrustAnchors(trustAnchors);
// make shallow copy
@@ -160,7 +160,7 @@
/**
* Returns whether the <i>any policy OID</i> will be inhibited if it's
* included in a certificate.
- *
+ *
* @return {@code true} if the <i>any policy OID</i> will be inhibited,
* otherwise {@code false}.
*/
@@ -171,7 +171,7 @@
/**
* Sets whether the <i>any policy OID</i> should be inhibited if it's
* included in a certificate.
- *
+ *
* @param anyPolicyInhibited
* {@code true} if the <i>any policy OID</i> should be inhibited,
* otherwise {@code false}.
@@ -199,9 +199,9 @@
return Collections.unmodifiableList(certPathCheckers);
}
// List is not empty - do deep copy
- ArrayList<PKIXCertPathChecker> modifiableList =
+ ArrayList<PKIXCertPathChecker> modifiableList =
new ArrayList<PKIXCertPathChecker>();
- for (Iterator<PKIXCertPathChecker> i
+ for (Iterator<PKIXCertPathChecker> i
= certPathCheckers.iterator(); i.hasNext();) {
modifiableList.add((PKIXCertPathChecker)i.next().clone());
}
@@ -212,7 +212,7 @@
* Sets the list of checkers for the certification path.
* <p>
* The list is copied and the entries are cloned.
- *
+ *
* @param certPathCheckers
* the list of checkers for the certification path, or {@code
* null} to clear the checkers.
@@ -229,7 +229,7 @@
}
// non-empty list provided - do deep copy
this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
- for (Iterator<PKIXCertPathChecker> i
+ for (Iterator<PKIXCertPathChecker> i
= certPathCheckers.iterator(); i.hasNext();) {
this.certPathCheckers.add((PKIXCertPathChecker)i.next().clone());
}
@@ -238,7 +238,7 @@
/**
* Adds the specified {@code PKIXCertPathChecker} to the list of
* certification path checkers.
- *
+ *
* @param checker
* the {@code PKIXCertPathChecker} to add, if {@code null}, it
* will be ignored.
@@ -259,7 +259,7 @@
/**
* Returns the list of certificate stores that are used to find certificates
* and CRLs.
- *
+ *
* @return an immutable list of certificate stores.
*/
public List<CertStore> getCertStores() {
@@ -274,7 +274,7 @@
return Collections.unmodifiableList(certStores);
}
// List is not empty - do shallow copy
- ArrayList<CertStore> modifiableList
+ ArrayList<CertStore> modifiableList
= new ArrayList<CertStore>(certStores);
return Collections.unmodifiableList(modifiableList);
}
@@ -282,7 +282,7 @@
/**
* Set the list of certificate stores that are used to find certificates and
* CRLs.
- *
+ *
* @param certStores the list of certificate stores.
*/
public void setCertStores(List<CertStore> certStores) {
@@ -299,7 +299,7 @@
// check that all elements are CertStore
for (Iterator i = this.certStores.iterator(); i.hasNext();) {
if (!(i.next() instanceof CertStore)) {
- throw new ClassCastException(Messages.getString("security.6B"));
+ throw new ClassCastException(Messages.getString("security.6B"));
}
}
}
@@ -307,7 +307,7 @@
/**
* Adds a certificate store to the list of certificate stores that are used
* to find certificates and CRLs.
- *
+ *
* @param store
* the store to add, if {@code null}, it will be ignored.
*/
@@ -327,7 +327,7 @@
/**
* Returns the time for which the validation of the certification path
* should be evaluated.
- *
+ *
* @return the time for the validation, or {@code null} for the current
* time.
*/
@@ -338,7 +338,7 @@
/**
* Sets the time for which the validation of the certification path sould be
* evaluated.
- *
+ *
* @param date
* the time for the validation, or {@code null} for the current
* time.
@@ -350,7 +350,7 @@
/**
* Returns whether an acceptable policy needs to be explicit identified in
* every certificate.
- *
+ *
* @return {@code true} if an explicit policy is required, otherwise {@code
* false}.
*/
@@ -361,7 +361,7 @@
/**
* Sets whether an an acceptable policy needs to be explicit identified in
* every certificate.
- *
+ *
* @param explicitPolicyRequired
* {@code true} if an explicit policy is required, otherwise
* {@code false}.
@@ -373,7 +373,7 @@
/**
* Returns the list of policies (as OID strings) that would be acceptable
* for the purpose of certification path processing.
- *
+ *
* @return the unmodifiable list of policies, or an empty set if any policy
* is acceptable.
*/
@@ -396,7 +396,7 @@
/**
* Sets the list of policies (as OID strings) that would be acceptable for
* the purpose of certification path processing.
- *
+ *
* @param initialPolicies
* the list of policies, or an empty set or {@code null} if any
* policy is acceptable.
@@ -416,14 +416,14 @@
// check that all elements are String
for (Iterator i = this.initialPolicies.iterator(); i.hasNext();) {
if (!(i.next() instanceof String)) {
- throw new ClassCastException(Messages.getString("security.6C"));
+ throw new ClassCastException(Messages.getString("security.6C"));
}
}
}
/**
* Returns whether policy mapping is inhibited.
- *
+ *
* @return {@code true} if policy mapping is inhibited, otherwise {@code
* false}.
*/
@@ -433,7 +433,7 @@
/**
* Sets whether policy mapping is to be inhibited.
- *
+ *
* @param policyMappingInhibited
* {@code true} if policy mapping is to be inhibited, otherwise
* {@code false}.
@@ -445,7 +445,7 @@
/**
* Returns whether certificates are rejected that include policy
* qualifiers in a certificate policy extension that is marked as critical.
- *
+ *
* @return {@code true} if the certificates should be rejected, otherwise
* {@code false}.
*/
@@ -456,7 +456,7 @@
/**
* Sets whether certificates should be rejected that include policy
* qualifiers in a certificate policy extension that is marked as critical.
- *
+ *
* @param policyQualifiersRejected
* {@code true} if the certificates should be rejected, otherwise
* {@code false}.
@@ -468,7 +468,7 @@
/**
* Returns whether the default revocation checking mechanism of the
* underlying service provider is used.
- *
+ *
* @return {@code true} if the default revocation checking mechanism is
* used, otherwise {@code false}.
*/
@@ -479,7 +479,7 @@
/**
* Sets whether the default revocation checking mechanism of the underlying
* service provider should be used.
- *
+ *
* @param revocationEnabled
* {@code true} id the default revocation checking mechanism
* should be used, otherwise {@code false}.
@@ -490,7 +490,7 @@
/**
* Returns the name of the signature provider.
- *
+ *
* @return the name of the signature provider, or {@code null} if none is
* set.
*/
@@ -504,7 +504,7 @@
* If set, the specified provider will be preferred for creating signatures.
* If not set, the first provider found supporting creation of signatures
* will be used.
- *
+ *
* @param sigProvider
* the name of the preferred signature provider, or {@code null}
* if none is preferred.
@@ -515,7 +515,7 @@
/**
* Returns the constraints that are required for the target certificate.
- *
+ *
* @return the constraints for the target certificate, or {@code null} if
* none are set.
*/
@@ -526,7 +526,7 @@
/**
* Sets the constraints that are required for the target certificate.
- *
+ *
* @param targetCertConstraints
* the constraints for the target certificate, or {@code null} if
* none should be used.
@@ -538,7 +538,7 @@
/**
* Clones this {@code PKIXParameters} instance.
- *
+ *
* @return the cloned instance.
*/
public Object clone() {
@@ -560,39 +560,39 @@
/**
* Returns a string representation of this {@code PKIXParameters} instance.
- *
+ *
* @return a string representation of this {@code PKIXParameters} instance.
*/
public String toString() {
StringBuilder sb =
- new StringBuilder("[\n Trust Anchors: ");
+ new StringBuilder("[\n Trust Anchors: ");
sb.append(trustAnchors);
- sb.append("\n Revocation Enabled: ");
+ sb.append("\n Revocation Enabled: ");
sb.append(revocationEnabled);
- sb.append("\n Explicit Policy Required: ");
+ sb.append("\n Explicit Policy Required: ");
sb.append(explicitPolicyRequired);
- sb.append("\n Policy Mapping Inhibited: ");
+ sb.append("\n Policy Mapping Inhibited: ");
sb.append(policyMappingInhibited);
- sb.append("\n Any Policy Inhibited: ");
+ sb.append("\n Any Policy Inhibited: ");
sb.append(anyPolicyInhibited);
- sb.append("\n Policy Qualifiers Rejected: ");
+ sb.append("\n Policy Qualifiers Rejected: ");
sb.append(policyQualifiersRejected);
- sb.append("\n Initial Policy OIDs: ");
+ sb.append("\n Initial Policy OIDs: ");
sb.append((initialPolicies == null || initialPolicies.isEmpty())
- ? "any" : initialPolicies.toString());
- sb.append("\n Cert Stores: ");
+ ? "any" : initialPolicies.toString());
+ sb.append("\n Cert Stores: ");
sb.append((certStores==null||certStores.isEmpty())?
- "no":certStores.toString());
- sb.append("\n Validity Date: ");
+ "no":certStores.toString());
+ sb.append("\n Validity Date: ");
sb.append(date);
- sb.append("\n Cert Path Checkers: ");
+ sb.append("\n Cert Path Checkers: ");
sb.append((certPathCheckers==null||certPathCheckers.isEmpty())?
- "no":certPathCheckers.toString());
- sb.append("\n Signature Provider: ");
+ "no":certPathCheckers.toString());
+ sb.append("\n Signature Provider: ");
sb.append(sigProvider);
- sb.append("\n Target Certificate Constraints: ");
+ sb.append("\n Target Certificate Constraints: ");
sb.append(targetCertConstraints);
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
@@ -609,12 +609,12 @@
throws InvalidAlgorithmParameterException {
if (trustAnchors.isEmpty()) {
throw new InvalidAlgorithmParameterException(
- Messages.getString("security.6D"));
+ Messages.getString("security.6D"));
}
for (Iterator i = trustAnchors.iterator(); i.hasNext();) {
if (!(i.next() instanceof TrustAnchor)) {
throw new ClassCastException(
- Messages.getString("security.6E"));
+ Messages.getString("security.6E"));
}
}
}
diff --git a/luni/src/main/java/java/security/cert/PolicyNode.java b/luni/src/main/java/java/security/cert/PolicyNode.java
index c485b69..653e872 100644
--- a/luni/src/main/java/java/security/cert/PolicyNode.java
+++ b/luni/src/main/java/java/security/cert/PolicyNode.java
@@ -31,7 +31,7 @@
/**
* Returns the list of children of this node as an {@code Iterator}.
- *
+ *
* @return the list of children of this node as an {@code Iterator}.
*/
public Iterator<? extends PolicyNode> getChildren();
@@ -40,35 +40,35 @@
* Returns the depth of this node in the policy tree.
* <p>
* the depth is zero based.
- *
+ *
* @return the depth of this node in the policy tree.
*/
public int getDepth();
/**
* Returns the expected policies for the next certificate to be valid.
- *
+ *
* @return the expected policies.
*/
public Set<String> getExpectedPolicies();
/**
* Returns the parent policy node.
- *
+ *
* @return the parent policy node.
*/
public PolicyNode getParent();
/**
* Returns the policy qualifiers associated with the policy of this node.
- *
+ *
* @return the policy qualifiers associated with the policy of this node.
*/
public Set<? extends PolicyQualifierInfo> getPolicyQualifiers();
/**
* Returns the valid policy of this node.
- *
+ *
* @return the valid policy of this node.
*/
public String getValidPolicy();
@@ -76,7 +76,7 @@
/**
* Returns whether the certificate policy extension of the most recently
* processed certificate is marked as critical.
- *
+ *
* @return {@code true} if the extension is marked as critical, otherwise
* {@code false}.
*/
diff --git a/luni/src/main/java/java/security/cert/PolicyQualifierInfo.java b/luni/src/main/java/java/security/cert/PolicyQualifierInfo.java
index 0a981f7..10b263f 100644
--- a/luni/src/main/java/java/security/cert/PolicyQualifierInfo.java
+++ b/luni/src/main/java/java/security/cert/PolicyQualifierInfo.java
@@ -41,7 +41,7 @@
/**
* Creates a new {@code PolicyQualifierInfo} from the specified encoded
* form.
- *
+ *
* @param encoded
* the DER encoded policy qualifier.
* @throws IOException
@@ -49,14 +49,14 @@
*/
public PolicyQualifierInfo(byte[] encoded) throws IOException {
if (encoded == null) {
- throw new NullPointerException(Messages.getString("security.0A"));
+ throw new NullPointerException(Messages.getString("security.0A"));
}
if (encoded.length == 0) {
- throw new IOException(Messages.getString("security.69"));
+ throw new IOException(Messages.getString("security.69"));
}
this.encoded = new byte[encoded.length];
System.arraycopy(encoded, 0, this.encoded, 0, this.encoded.length);
-
+
// DER Decoding:
Object[] decoded = (Object[]) org.apache.harmony.security.x509.PolicyQualifierInfo.ASN1
.decode(this.encoded);
@@ -66,7 +66,7 @@
/**
* Returns a ASN.1 DER encoded copy of policy qualifier info.
- *
+ *
* @return a ASN.1 DER encoded copy of policy qualifier info.
*/
public final byte[] getEncoded() {
@@ -77,7 +77,7 @@
/**
* Returns the identifier (an OID) of this policy qualifier info.
- *
+ *
* @return the identifier of this policy qualifier info.
*/
public final String getPolicyQualifierId() {
@@ -87,7 +87,7 @@
/**
* Returns a ASN.1 DER encoded copy of the qualifier of this policy
* qualifier info.
- *
+ *
* @return a ASN.1 DER encoded copy of the qualifier of this policy
* qualifier info.
*/
@@ -103,17 +103,17 @@
/**
* Returns a string representation of this {@code PolicyQualifierInfo}
* instance.
- *
+ *
* @return a string representation of this {@code PolicyQualifierInfo}
* instance.
*/
public String toString() {
StringBuilder sb =
- new StringBuilder("PolicyQualifierInfo: [\npolicyQualifierId: ");
+ new StringBuilder("PolicyQualifierInfo: [\npolicyQualifierId: ");
sb.append(policyQualifierId);
- sb.append("\npolicyQualifier: \n");
- sb.append(Array.toString(policyQualifier, " "));
- sb.append("]");
+ sb.append("\npolicyQualifier: \n");
+ sb.append(Array.toString(policyQualifier, " "));
+ sb.append("]");
return sb.toString();
}
}
diff --git a/luni/src/main/java/java/security/cert/TrustAnchor.java b/luni/src/main/java/java/security/cert/TrustAnchor.java
index 56c71dc..904670c 100644
--- a/luni/src/main/java/java/security/cert/TrustAnchor.java
+++ b/luni/src/main/java/java/security/cert/TrustAnchor.java
@@ -66,7 +66,7 @@
*/
public TrustAnchor(X509Certificate trustedCert, byte[] nameConstraints) {
if (trustedCert == null) {
- throw new NullPointerException(Messages.getString("security.5C"));
+ throw new NullPointerException(Messages.getString("security.5C"));
}
this.trustedCert = trustedCert;
// copy nameConstraints if not null
@@ -105,11 +105,11 @@
public TrustAnchor(String caName, PublicKey caPublicKey,
byte[] nameConstraints) {
if (caName == null) {
- throw new NullPointerException(Messages.getString("security.5D"));
+ throw new NullPointerException(Messages.getString("security.5D"));
}
this.caName = caName;
if (caPublicKey == null) {
- throw new NullPointerException(Messages.getString("security.5E"));
+ throw new NullPointerException(Messages.getString("security.5E"));
}
this.caPublicKey = caPublicKey;
// copy nameConstraints if not null
@@ -127,7 +127,7 @@
// X500Principal checks caName validity
if (caName.length() == 0) {
throw new IllegalArgumentException(
- Messages.getString("security.5F"));
+ Messages.getString("security.5F"));
}
this.caPrincipal = new X500Principal(this.caName);
}
@@ -139,7 +139,7 @@
* <p>
* The name constraints will be used as additional constraints during the
* validation of certification paths.
- *
+ *
* @param caPrincipal
* the name of the certificate authority as X500 principal.
* @param caPublicKey
@@ -153,11 +153,11 @@
public TrustAnchor(X500Principal caPrincipal,
PublicKey caPublicKey, byte[] nameConstraints) {
if (caPrincipal == null) {
- throw new NullPointerException(Messages.getString("security.60"));
+ throw new NullPointerException(Messages.getString("security.60"));
}
this.caPrincipal = caPrincipal;
if (caPublicKey == null) {
- throw new NullPointerException(Messages.getString("security.5E"));
+ throw new NullPointerException(Messages.getString("security.5E"));
}
this.caPublicKey = caPublicKey;
// copy nameConstraints if not null
@@ -176,7 +176,7 @@
/**
* Returns a copy of the name constraints in ASN.1 DER encoded form.
- *
+ *
* @return a copy of the name constraints in ASN.1 DER encoded form.
*/
public final byte[] getNameConstraints() {
@@ -191,7 +191,7 @@
/**
* Returns the certificate of this <i>trusted</i> certificate authority.
- *
+ *
* @return the certificate of this CA or {@code null}, if the trust anchor
* of this instance was not created with a certificate.
*/
@@ -201,7 +201,7 @@
/**
* Returns the name of the certificate authority as {@code X500Principal}.
- *
+ *
* @return the name of the certificate authority or {@code null} if the
* trust anchor of this instance was not created with a {@code
* X500Principal}.
@@ -213,7 +213,7 @@
/**
* Returns the name of the certificate authority as {@code String} in RFC
* 2253 format.
- *
+ *
* @return the name of the certificate authority as {@code String} in RFC
* 2253 format or {@code null} if the trust anchor of this instance
* was not created with a CA name.
@@ -224,7 +224,7 @@
/**
* Returns the public key of the certificate authority.
- *
+ *
* @return the public key of the certificate authority or {@code null} if
* the trust anchor if this instance was not created with a public
* key.
@@ -235,32 +235,32 @@
/**
* Returns a string representation of this {@code TrustAnchor} instance.
- *
+ *
* @return a string representation of this {@code TrustAnchor} instance.
*/
public String toString() {
- StringBuilder sb = new StringBuilder("TrustAnchor: [\n");
+ StringBuilder sb = new StringBuilder("TrustAnchor: [\n");
if (trustedCert != null) {
- sb.append("Trusted CA certificate: ");
+ sb.append("Trusted CA certificate: ");
sb.append(trustedCert);
- sb.append("\n");
+ sb.append("\n");
}
if (caPrincipal != null) {
- sb.append("Trusted CA Name: ");
+ sb.append("Trusted CA Name: ");
sb.append(caPrincipal);
- sb.append("\n");
+ sb.append("\n");
}
if (caPublicKey != null) {
- sb.append("Trusted CA Public Key: ");
+ sb.append("Trusted CA Public Key: ");
sb.append(caPublicKey);
- sb.append("\n");
+ sb.append("\n");
}
// FIXME if needed:
if (nameConstraints != null) {
- sb.append("Name Constraints:\n");
- sb.append(Array.toString(nameConstraints, " "));
+ sb.append("Name Constraints:\n");
+ sb.append(Array.toString(nameConstraints, " "));
}
- sb.append("\n]");
+ sb.append("\n]");
return sb.toString();
}
diff --git a/luni/src/main/java/java/security/cert/X509CRL.java b/luni/src/main/java/java/security/cert/X509CRL.java
index 9ddd9f7..8f74f43 100644
--- a/luni/src/main/java/java/security/cert/X509CRL.java
+++ b/luni/src/main/java/java/security/cert/X509CRL.java
@@ -51,12 +51,12 @@
* Creates a new {@code X509CRL} instance.
*/
protected X509CRL() {
- super("X.509");
+ super("X.509");
}
/**
* Returns whether the specified object equals to this instance.
- *
+ *
* @param other
* the object to compare.
* @return {@code true} if the specified object is equal to this, otherwise
@@ -79,7 +79,7 @@
/**
* Returns the hashcode of this CRL instance.
- *
+ *
* @return the hashcode.
*/
public int hashCode() {
@@ -97,7 +97,7 @@
/**
* Returns this CRL in ASN.1 DER encoded form.
- *
+ *
* @return this CRL in ASN.1 DER encoded form.
* @throws CRLException
* if encoding fails.
@@ -108,7 +108,7 @@
/**
* Verifies this CRL by verifying that this CRL was signed with the
* corresponding private key to the specified public key.
- *
+ *
* @param key
* the public key to verify this CRL with.
* @throws CRLException
@@ -131,7 +131,7 @@
* Verifies this CRL by verifying that this CRL was signed with the
* corresponding private key to the specified public key. The signature
* verification engine of the specified provider will be used.
- *
+ *
* @param key
* the public key to verify this CRL with.
* @param sigProvider
@@ -154,7 +154,7 @@
/**
* Returns the version number of this CRL.
- *
+ *
* @return the version number of this CRL.
*/
public abstract int getVersion();
@@ -162,14 +162,14 @@
/**
* <b>Do not use</b>, use {@link #getIssuerX500Principal()} instead. Returns
* the issuer as an implementation specific Principal object.
- *
+ *
* @return the issuer distinguished name.
*/
public abstract Principal getIssuerDN();
/**
* Returns the issuer distinguished name of this CRL.
- *
+ *
* @return the issuer distinguished name of this CRL.
*/
public X500Principal getIssuerX500Principal() {
@@ -177,7 +177,7 @@
// TODO if there is no X.509 certificate provider installed
// should we try to access Harmony X509CRLImpl via classForName?
CertificateFactory factory = CertificateFactory
- .getInstance("X.509");
+ .getInstance("X.509");
X509CRL crl = (X509CRL) factory
.generateCRL(new ByteArrayInputStream(getEncoded()));
@@ -185,20 +185,20 @@
return crl.getIssuerX500Principal();
} catch (Exception e) {
- throw new RuntimeException(Messages.getString("security.59"), e);
+ throw new RuntimeException(Messages.getString("security.59"), e);
}
}
/**
* Returns the {@code thisUpdate} value of this CRL.
- *
+ *
* @return the {@code thisUpdate} value of this CRL.
*/
public abstract Date getThisUpdate();
/**
* Returns the {@code nextUpdate} value of this CRL.
- *
+ *
* @return the {@code nextUpdate} value of this CRL, or {@code null} if none
* is present.
*/
@@ -206,7 +206,7 @@
/**
* Returns the CRL entry with the specified certificate serial number.
- *
+ *
* @param serialNumber
* the certificate serial number to search for a CRL entry.
* @return the entry for the specified certificate serial number, or {@code
@@ -216,7 +216,7 @@
/**
* Returns the CRL entry for the specified certificate.
- *
+ *
* @param certificate
* the certificate to search a CRL entry for.
* @return the entry for the specified certificate, or {@code null} if not
@@ -228,10 +228,10 @@
}
return getRevokedCertificate(certificate.getSerialNumber());
}
-
+
/**
* Returns the set of revoked certificates.
- *
+ *
* @return the set of revoked certificates, or {@code null} if no revoked
* certificates are in this CRL.
*/
@@ -240,7 +240,7 @@
/**
* Returns the {@code tbsCertList} information of this CRL in DER encoded
* form.
- *
+ *
* @return the CRL information in DER encoded form.
* @throws CRLException
* if encoding fails.
@@ -249,28 +249,28 @@
/**
* Returns the signature bytes of this CRL.
- *
+ *
* @return the signature bytes of this CRL.
*/
public abstract byte[] getSignature();
/**
* Returns the name of the signature algorithm.
- *
+ *
* @return the name of the signature algorithm.
*/
public abstract String getSigAlgName();
/**
* Returns the OID of the signature algorithm.
- *
+ *
* @return the OID of the signature algorithm.
*/
public abstract String getSigAlgOID();
/**
* Returns the parameters of the signature algorithm in DER encoded form.
- *
+ *
* @return the parameters of the signature algorithm in DER encoded form, or
* {@code null} if not present.
*/
diff --git a/luni/src/main/java/java/security/cert/X509CRLEntry.java b/luni/src/main/java/java/security/cert/X509CRLEntry.java
index ccdaf2f..ac0805c 100644
--- a/luni/src/main/java/java/security/cert/X509CRLEntry.java
+++ b/luni/src/main/java/java/security/cert/X509CRLEntry.java
@@ -27,7 +27,7 @@
/**
* Abstract base class for entries in a certificate revocation list (CRL).
- *
+ *
* @see X509CRL
*/
public abstract class X509CRLEntry implements X509Extension {
@@ -39,7 +39,7 @@
/**
* Returns whether the specified object equals to this instance.
- *
+ *
* @param other
* the object to compare.
* @return {@code true} if the specified object equals to this instance,
@@ -62,7 +62,7 @@
/**
* Returns the hashcode of this instance.
- *
+ *
* @return the hashcode of this instance.
*/
public int hashCode() {
@@ -79,7 +79,7 @@
/**
* Returns this entry in ASN.1 DER encoded form.
- *
+ *
* @return the encoded form of this entry.
* @throws CRLException
* if encoding fails.
@@ -88,14 +88,14 @@
/**
* Returns the serial number of the revoked certificate.
- *
+ *
* @return the serial number of the revoked certificate.
*/
public abstract BigInteger getSerialNumber();
/**
* Returns the issuer of the revoked certificate.
- *
+ *
* @return the issuer of the revoked certificate, or {@code null} if the
* issuer is equal to the CRL issuer.
*/
@@ -105,14 +105,14 @@
/**
* Returns the date when the certificate is revoked.
- *
+ *
* @return the date when the certificate is revoked.
*/
public abstract Date getRevocationDate();
/**
* Returns whether this CRL entry has extensions.
- *
+ *
* @return {@code true} is this CRL entry has extensions, otherwise {@code
* false}.
*/
@@ -120,7 +120,7 @@
/**
* Returns a string representation of this instance.
- *
+ *
* @return a string representation of this instance.
*/
public abstract String toString();
diff --git a/luni/src/main/java/java/security/cert/X509CRLSelector.java b/luni/src/main/java/java/security/cert/X509CRLSelector.java
index d79b557..aaa13d8 100644
--- a/luni/src/main/java/java/security/cert/X509CRLSelector.java
+++ b/luni/src/main/java/java/security/cert/X509CRLSelector.java
@@ -123,7 +123,7 @@
X500Principal.CANONICAL));
} else {
throw new IOException(
- Messages.getString("security.62"));
+ Messages.getString("security.62"));
}
}
}
@@ -139,7 +139,7 @@
*/
public void addIssuer(X500Principal issuer) {
if (issuer == null) {
- throw new NullPointerException(Messages.getString("security.61"));
+ throw new NullPointerException(Messages.getString("security.61"));
}
if (issuerNames == null) {
issuerNames = new ArrayList<String>();
@@ -178,7 +178,7 @@
}
if (iss_name == null) {
- iss_name = "";
+ iss_name = "";
}
String name = new Name(iss_name).getName(X500Principal.CANONICAL);
@@ -200,7 +200,7 @@
*/
public void addIssuerName(byte[] iss_name) throws IOException {
if (iss_name == null) {
- throw new NullPointerException(Messages.getString("security.63"));
+ throw new NullPointerException(Messages.getString("security.63"));
}
if (issuerNames == null) {
issuerNames = new ArrayList<String>();
@@ -365,29 +365,29 @@
*/
public String toString() {
StringBuilder result = new StringBuilder();
- result.append("X509CRLSelector:\n[");
+ result.append("X509CRLSelector:\n[");
if (issuerNames != null) {
- result.append("\n IssuerNames:\n [");
+ result.append("\n IssuerNames:\n [");
int size = issuerNames.size();
for (int i=0; i<size; i++) {
- result.append("\n "
+ result.append("\n "
+ issuerNames.get(i));
}
- result.append("\n ]");
+ result.append("\n ]");
}
if (minCRL != null) {
- result.append("\n minCRL: " + minCRL);
+ result.append("\n minCRL: " + minCRL);
}
if (maxCRL != null) {
- result.append("\n maxCRL: " + maxCRL);
+ result.append("\n maxCRL: " + maxCRL);
}
if (dateAndTime != -1) {
- result.append("\n dateAndTime: " + (new Date(dateAndTime)));
+ result.append("\n dateAndTime: " + (new Date(dateAndTime)));
}
if (certificateChecking != null) {
- result.append("\n certificateChecking: " + certificateChecking);
+ result.append("\n certificateChecking: " + certificateChecking);
}
- result.append("\n]");
+ result.append("\n]");
return result.toString();
}
@@ -416,7 +416,7 @@
try {
// As specified in rfc 3280 (http://www.ietf.org/rfc/rfc3280.txt)
// CRL Number Extension's OID is 2.5.29.20 .
- byte[] bytes = crlist.getExtensionValue("2.5.29.20");
+ byte[] bytes = crlist.getExtensionValue("2.5.29.20");
bytes = (byte[]) ASN1OctetString.getInstance().decode(bytes);
BigInteger crlNumber = new BigInteger((byte[])
ASN1Integer.getInstance().decode(bytes));
@@ -459,7 +459,7 @@
}
} catch (CloneNotSupportedException e) {
result = null;
- }
+ }
return result;
}
}
diff --git a/luni/src/main/java/java/security/cert/X509CertSelector.java b/luni/src/main/java/java/security/cert/X509CertSelector.java
index cbf2d57..74df392 100644
--- a/luni/src/main/java/java/security/cert/X509CertSelector.java
+++ b/luni/src/main/java/java/security/cert/X509CertSelector.java
@@ -461,17 +461,17 @@
int comp = Integer.parseInt(oid.substring(beg, end));
beg = end + 1;
if ((comp < 0) || (comp > 2)) {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
end = oid.indexOf('.', beg);
comp = Integer.parseInt(oid.substring(beg, end));
if ((comp < 0) || (comp > 39)) {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
} catch (IndexOutOfBoundsException e) {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
} catch (NumberFormatException e) {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
}
@@ -534,7 +534,7 @@
}
subjectPublicKey = new byte[key.length];
System.arraycopy(key, 0, subjectPublicKey, 0, key.length);
- subjectPublicKeyImpl =
+ subjectPublicKeyImpl =
((SubjectPublicKeyInfo) SubjectPublicKeyInfo.ASN1.decode(key))
.getPublicKey();
}
@@ -679,7 +679,7 @@
} else if (value instanceof byte[]) {
addSubjectAlternativeName(tag, (byte[]) value);
} else {
- throw new IOException(Messages.getString("security.57"));
+ throw new IOException(Messages.getString("security.57"));
}
}
}
@@ -842,7 +842,7 @@
*/
public void setBasicConstraints(int pathLen) {
if (pathLen < -2) {
- throw new IllegalArgumentException(Messages.getString("security.58"));
+ throw new IllegalArgumentException(Messages.getString("security.58"));
}
this.pathLen = pathLen;
}
@@ -937,7 +937,7 @@
} else if (value instanceof byte[]) {
addPathToName(tag, (byte[]) value);
} else {
- throw new IOException(Messages.getString("security.57"));
+ throw new IOException(Messages.getString("security.57"));
}
}
}
@@ -1018,101 +1018,101 @@
// (http://www.ietf.org/rfc/rfc3280.txt).
StringBuilder result = new StringBuilder();
- result.append("X509CertSelector: \n[");
+ result.append("X509CertSelector: \n[");
if (this.certificateEquals != null) {
- result.append("\n certificateEquals: " + certificateEquals);
+ result.append("\n certificateEquals: " + certificateEquals);
}
if (this.serialNumber != null) {
//FIXME: needs DRL's BigInteger.toString implementation
//result.append("\n serialNumber: " + serialNumber);
}
if (this.issuer != null) {
- result.append("\n issuer: " + issuer);
+ result.append("\n issuer: " + issuer);
}
if (this.subject != null) {
- result.append("\n subject: " + subject);
+ result.append("\n subject: " + subject);
}
if (this.subjectKeyIdentifier != null) {
- result.append("\n subjectKeyIdentifier: "
+ result.append("\n subjectKeyIdentifier: "
+ getBytesAsString(subjectKeyIdentifier));
}
if (this.authorityKeyIdentifier != null) {
- result.append("\n authorityKeyIdentifier: "
+ result.append("\n authorityKeyIdentifier: "
+ getBytesAsString(authorityKeyIdentifier));
}
if (this.certificateValid != null) {
- result.append("\n certificateValid: " + certificateValid);
+ result.append("\n certificateValid: " + certificateValid);
}
if (this.subjectPublicKeyAlgID != null) {
- result.append("\n subjectPublicKeyAlgID: "
+ result.append("\n subjectPublicKeyAlgID: "
+ subjectPublicKeyAlgID);
}
if (this.privateKeyValid != null) {
- result.append("\n privateKeyValid: " + privateKeyValid);
+ result.append("\n privateKeyValid: " + privateKeyValid);
}
if (this.subjectPublicKey != null) {
- result.append("\n subjectPublicKey: "
+ result.append("\n subjectPublicKey: "
+ getBytesAsString(subjectPublicKey));
}
if (this.keyUsage != null) {
- result.append("\n keyUsage: \n [");
+ result.append("\n keyUsage: \n [");
String[] kuNames = new String[] {
- "digitalSignature", "nonRepudiation", "keyEncipherment",
- "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign",
- "encipherOnly", "decipherOnly"
+ "digitalSignature", "nonRepudiation", "keyEncipherment",
+ "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign",
+ "encipherOnly", "decipherOnly"
};
for (int i=0; i<9; i++) {
if (keyUsage[i]) {
- result.append("\n " + kuNames[i]);
+ result.append("\n " + kuNames[i]);
}
}
- result.append("\n ]");
+ result.append("\n ]");
}
if (this.extendedKeyUsage != null) {
- result.append("\n extendedKeyUsage: "
+ result.append("\n extendedKeyUsage: "
+ extendedKeyUsage.toString());
}
- result.append("\n matchAllNames: " + matchAllNames);
- result.append("\n pathLen: " + pathLen);
+ result.append("\n matchAllNames: " + matchAllNames);
+ result.append("\n pathLen: " + pathLen);
if (this.subjectAltNames != null) {
- result.append("\n subjectAltNames: \n [");
+ result.append("\n subjectAltNames: \n [");
for (int i=0; i<9; i++) {
List names = this.subjectAltNames[i];
if (names != null) {
int size = names.size();
for (int j=0; j<size; j++) {
- result.append("\n "
+ result.append("\n "
+ ((GeneralName)names.get(j)).toString());
}
}
}
- result.append("\n ]");
+ result.append("\n ]");
}
if (this.nameConstraints != null) {
}
if (this.policies != null) {
- result.append("\n policies: " + policies.toString());
+ result.append("\n policies: " + policies.toString());
}
if (this.pathToNames != null) {
- result.append("\n pathToNames: \n [");
+ result.append("\n pathToNames: \n [");
int size = pathToNames.size();
for (int i = 0; i < size; i++) {
- result.append("\n "
+ result.append("\n "
+ ((GeneralName)pathToNames.get(i)).toString());
}
}
- result.append("\n]");
+ result.append("\n]");
return result.toString();
}
private String getBytesAsString(byte[] data) {
- String result = "";
+ String result = "";
for (int i=0; i<data.length; i++) {
String tail = Integer.toHexString(0x00ff & data[i]);
if (tail.length() == 1) {
- tail = "0" + tail;
+ tail = "0" + tail;
}
- result += tail + " ";
+ result += tail + " ";
}
return result;
}
@@ -1162,14 +1162,14 @@
}
if ((subjectKeyIdentifier != null) &&
!Arrays.equals(subjectKeyIdentifier,
- // Here and later all of the extension OIDs
+ // Here and later all of the extension OIDs
// are taken from rfc 3280 (http://www.ietf.org/rfc/rfc3280.txt)
- getExtensionValue(cert, "2.5.29.14"))) {
+ getExtensionValue(cert, "2.5.29.14"))) {
return false;
}
if ((authorityKeyIdentifier != null) &&
!Arrays.equals(authorityKeyIdentifier,
- getExtensionValue(cert, "2.5.29.35"))) {
+ getExtensionValue(cert, "2.5.29.35"))) {
return false;
}
if (certificateValid != null) {
@@ -1183,11 +1183,11 @@
}
if (privateKeyValid != null) {
try {
- byte[] bytes = getExtensionValue(cert, "2.5.29.16");
+ byte[] bytes = getExtensionValue(cert, "2.5.29.16");
if (bytes == null) {
return false;
}
- PrivateKeyUsagePeriod pkup = (PrivateKeyUsagePeriod)
+ PrivateKeyUsagePeriod pkup = (PrivateKeyUsagePeriod)
PrivateKeyUsagePeriod.ASN1.decode(bytes);
Date notBefore = pkup.getNotBefore();
Date notAfter = pkup.getNotAfter();
@@ -1209,7 +1209,7 @@
if (subjectPublicKeyAlgID != null) {
try {
byte[] encoding = cert.getPublicKey().getEncoded();
- AlgorithmIdentifier ai = ((SubjectPublicKeyInfo)
+ AlgorithmIdentifier ai = ((SubjectPublicKeyInfo)
SubjectPublicKeyInfo.ASN1.decode(encoding))
.getAlgorithmIdentifier();
if (!subjectPublicKeyAlgID.equals(ai.getAlgorithm())) {
@@ -1272,7 +1272,7 @@
if (subjectAltNames != null) {
PASSED:
try {
- byte[] bytes = getExtensionValue(cert, "2.5.29.17");
+ byte[] bytes = getExtensionValue(cert, "2.5.29.17");
if (bytes == null) {
return false;
}
@@ -1325,7 +1325,7 @@
}
}
if (policies != null) {
- byte[] bytes = getExtensionValue(cert, "2.5.29.32");
+ byte[] bytes = getExtensionValue(cert, "2.5.29.32");
if (bytes == null) {
return false;
}
@@ -1336,7 +1336,7 @@
}
PASSED:
try {
- List policyInformations = ((CertificatePolicies)
+ List policyInformations = ((CertificatePolicies)
CertificatePolicies.ASN1.decode(bytes))
.getPolicyInformations();
Iterator it = policyInformations.iterator();
@@ -1353,7 +1353,7 @@
}
}
if (pathToNames != null) {
- byte[] bytes = getExtensionValue(cert, "2.5.29.30");
+ byte[] bytes = getExtensionValue(cert, "2.5.29.30");
if (bytes != null) {
NameConstraints nameConstraints;
try {
diff --git a/luni/src/main/java/java/security/cert/X509Certificate.java b/luni/src/main/java/java/security/cert/X509Certificate.java
index 6540a81..b8ba0cf 100644
--- a/luni/src/main/java/java/security/cert/X509Certificate.java
+++ b/luni/src/main/java/java/security/cert/X509Certificate.java
@@ -35,13 +35,13 @@
* certificates.
* <p>
* The basic X.509 v3 format described in ASN.1:
- *
+ *
* <pre>
* Certificate ::= SEQUENCE {
* tbsCertificate TBSCertificate,
* signatureAlgorithm AlgorithmIdentifier,
* signature BIT STRING }
- *
+ *
* TBSCertificate ::= SEQUENCE {
* version [0] EXPLICIT Version DEFAULT v1,
* serialNumber CertificateSerialNumber,
@@ -74,26 +74,26 @@
* Creates a new {@code X509Certificate}.
*/
protected X509Certificate() {
- super("X.509");
+ super("X.509");
}
/**
* Checks whether the certificate is currently valid.
* <p>
* The validity defined in ASN.1:
- *
+ *
* <pre>
* validity Validity
- *
- * Validity ::= SEQUENCE {
- * notBefore CertificateValidityDate,
+ *
+ * Validity ::= SEQUENCE {
+ * notBefore CertificateValidityDate,
* notAfter CertificateValidityDate }
- *
- * CertificateValidityDate ::= CHOICE {
- * utcTime UTCTime,
+ *
+ * CertificateValidityDate ::= CHOICE {
+ * utcTime UTCTime,
* generalTime GeneralizedTime }
* </pre>
- *
+ *
* @throws CertificateExpiredException
* if the certificate has expired.
* @throws CertificateNotYetValidException
@@ -104,7 +104,7 @@
/**
* Checks whether the certificate is valid at the specified date.
- *
+ *
* @param date
* the date to check the validity against.
* @throws CertificateExpiredException
@@ -120,11 +120,11 @@
* Returns the certificates {@code version} (version number).
* <p>
* The version defined is ASN.1:
- *
+ *
* <pre>
* Version ::= INTEGER { v1(0), v2(1), v3(2) }
* </pre>
- *
+ *
* @return the version number.
*/
public abstract int getVersion();
@@ -133,11 +133,11 @@
* Returns the {@code serialNumber} of the certificate.
* <p>
* The ASN.1 definition of {@code serialNumber}:
- *
+ *
* <pre>
* CertificateSerialNumber ::= INTEGER
* </pre>
- *
+ *
* @return the serial number.
*/
public abstract BigInteger getSerialNumber();
@@ -147,28 +147,28 @@
* implementation specific {@code Principal} object.
* <p>
* The ASN.1 definition of {@code issuer}:
- *
+ *
* <pre>
* issuer Name
- *
+ *
* Name ::= CHOICE {
* RDNSequence }
- *
+ *
* RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
- *
+ *
* RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
- *
+ *
* AttributeTypeAndValue ::= SEQUENCE {
* type AttributeType,
* value AttributeValue }
- *
+ *
* AttributeType ::= OBJECT IDENTIFIER
- *
+ *
* AttributeValue ::= ANY DEFINED BY AttributeType
* </pre>
- *
+ *
* <b>replaced by:</b> {@link #getIssuerX500Principal()}.
- *
+ *
* @return the {@code issuer} as an implementation specific {@code
* Principal}.
*/
@@ -177,7 +177,7 @@
/**
* Returns the {@code issuer} (issuer distinguished name) as an {@code
* X500Principal}.
- *
+ *
* @return the {@code issuer} (issuer distinguished name).
*/
public X500Principal getIssuerX500Principal() {
@@ -186,7 +186,7 @@
// TODO if there is no X.509 certificate provider installed
// should we try to access Harmony X509CertImpl via classForName?
CertificateFactory factory = CertificateFactory
- .getInstance("X.509");
+ .getInstance("X.509");
X509Certificate cert = (X509Certificate) factory
.generateCertificate(new ByteArrayInputStream(getEncoded()));
@@ -194,7 +194,7 @@
return cert.getIssuerX500Principal();
} catch (Exception e) {
- throw new RuntimeException(Messages.getString("security.59"), e);
+ throw new RuntimeException(Messages.getString("security.59"), e);
}
}
@@ -203,26 +203,26 @@
* implementation specific {@code Principal} object.
* <p>
* The ASN.1 definition of {@code subject}:
- *
+ *
* <pre>
* subject Name
- *
+ *
* Name ::= CHOICE {
* RDNSequence }
- *
+ *
* RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
- *
+ *
* RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
- *
+ *
* AttributeTypeAndValue ::= SEQUENCE {
* type AttributeType,
* value AttributeValue }
- *
+ *
* AttributeType ::= OBJECT IDENTIFIER
- *
+ *
* AttributeValue ::= ANY DEFINED BY AttributeType
* </pre>
- *
+ *
* <p>
* <b>replaced by:</b> {@link #getSubjectX500Principal()}.
*
@@ -233,7 +233,7 @@
/**
* Returns the {@code subject} (subject distinguished name) as an {@code
* X500Principal}.
- *
+ *
* @return the {@code subject} (subject distinguished name)
*/
public X500Principal getSubjectX500Principal() {
@@ -242,7 +242,7 @@
// TODO if there is no X.509 certificate provider installed
// should we try to access Harmony X509CertImpl via classForName?
CertificateFactory factory = CertificateFactory
- .getInstance("X.509");
+ .getInstance("X.509");
X509Certificate cert = (X509Certificate) factory
.generateCertificate(new ByteArrayInputStream(getEncoded()));
@@ -250,14 +250,14 @@
return cert.getSubjectX500Principal();
} catch (Exception e) {
- throw new RuntimeException(Messages.getString("security.5A"), e);
+ throw new RuntimeException(Messages.getString("security.5A"), e);
}
}
/**
* Returns the {@code notBefore} date from the validity period of the
* certificate.
- *
+ *
* @return the start of the validity period.
*/
public abstract Date getNotBefore();
@@ -265,7 +265,7 @@
/**
* Returns the {@code notAfter} date of the validity period of the
* certificate.
- *
+ *
* @return the end of the validity period.
*/
public abstract Date getNotAfter();
@@ -273,7 +273,7 @@
/**
* Returns the {@code tbsCertificate} information from this certificate in
* DER-encoded format.
- *
+ *
* @return the DER-encoded certificate information.
* @throws CertificateEncodingException
* if an error occurs in encoding
@@ -283,28 +283,28 @@
/**
* Returns the raw signature bits from the certificate.
- *
+ *
* @return the raw signature bits from the certificate.
*/
public abstract byte[] getSignature();
/**
* Returns the name of the algorithm for the certificate signature.
- *
+ *
* @return the signature algorithm name.
*/
public abstract String getSigAlgName();
/**
* Returns the OID of the signature algorithm from the certificate.
- *
+ *
* @return the OID of the signature algorithm.
*/
public abstract String getSigAlgOID();
/**
* Returns the parameters of the signature algorithm in DER-encoded format.
- *
+ *
* @return the parameters of the signature algorithm, or {@code null} if
* none are used.
*/
@@ -312,7 +312,7 @@
/**
* Returns the {@code issuerUniqueID} from the certificate.
- *
+ *
* @return the {@code issuerUniqueID} or {@code null} if there's none in the
* certificate.
*/
@@ -320,7 +320,7 @@
/**
* Returns the {@code subjectUniqueID} from the certificate.
- *
+ *
* @return the {@code subjectUniqueID} or null if there's none in the
* certificate.
*/
@@ -330,7 +330,7 @@
* Returns the {@code KeyUsage} extension as a {@code boolean} array.
* <p>
* The ASN.1 definition of {@code KeyUsage}:
- *
+ *
* <pre>
* KeyUsage ::= BIT STRING {
* digitalSignature (0),
@@ -342,9 +342,9 @@
* cRLSign (6),
* encipherOnly (7),
* decipherOnly (8) }
- *
+ *
* </pre>
- *
+ *
* @return the {@code KeyUsage} extension or {@code null} if there's none in
* the certificate.
*/
@@ -353,7 +353,7 @@
/**
* Returns a read-only list of OID strings representing the {@code
* ExtKeyUsageSyntax} field of the extended key usage extension.
- *
+ *
* @return the extended key usage extension, or {@code null} if there's none
* in the certificate.
* @throws CertificateParsingException
@@ -367,7 +367,7 @@
/**
* Returns the path length of the certificate constraints from the {@code
* BasicContraints} extension.
- *
+ *
* @return the path length of the certificate constraints if the extension
* is present or {@code -1} if the extension is not present. {@code
* Integer.MAX_VALUE} if there's not limit.
@@ -379,12 +379,12 @@
* {@code SubjectAltName} extension.
* <p>
* The ASN.1 definition of {@code SubjectAltName}:
- *
+ *
* <pre>
* SubjectAltName ::= GeneralNames
- *
+ *
* GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
- *
+ *
* GeneralName ::= CHOICE {
* otherName [0] AnotherName,
* rfc822Name [1] IA5String,
@@ -395,9 +395,9 @@
* uniformResourceIdentifier [6] IA5String,
* iPAddress [7] OCTET STRING,
* registeredID [8] OBJECT IDENTIFIER }
- *
+ *
* </pre>
- *
+ *
* @return the subject alternative names or {@code null} if there are none
* in the certificate.
* @throws CertificateParsingException
@@ -413,12 +413,12 @@
* IssuerAltName} extension.
* <p>
* The ASN.1 definition of {@code IssuerAltName}:
- *
+ *
* <pre>
* IssuerAltName ::= GeneralNames
- *
+ *
* GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
- *
+ *
* GeneralName ::= CHOICE {
* otherName [0] AnotherName,
* rfc822Name [1] IA5String,
@@ -429,9 +429,9 @@
* uniformResourceIdentifier [6] IA5String,
* iPAddress [7] OCTET STRING,
* registeredID [8] OBJECT IDENTIFIER }
- *
+ *
* </pre>
- *
+ *
* @return the issuer alternative names of {@code null} if there are none in
* the certificate.
* @throws CertificateParsingException
diff --git a/luni/src/main/java/java/security/cert/X509Extension.java b/luni/src/main/java/java/security/cert/X509Extension.java
index 1543f3d..e94a915 100644
--- a/luni/src/main/java/java/security/cert/X509Extension.java
+++ b/luni/src/main/java/java/security/cert/X509Extension.java
@@ -27,7 +27,7 @@
/**
* Returns the set of OIDs of the extension(s) marked as CRITICAL, that this
* implementation manages.
- *
+ *
* @return the set of extension OIDs marked as CRITIAL, an empty set if none
* are marked as CRITICAL, or {@code null} if no extensions are
* present.
@@ -37,7 +37,7 @@
/**
* Returns the extension value as DER-encoded OCTET string for the specified
* OID.
- *
+ *
* @param oid
* the object identifier to get the extension value for.
* @return the extension value as DER-encoded OCTET string, or {@code null}
@@ -48,7 +48,7 @@
/**
* Returns the set of OIDs of the extension(s) marked as NON-CRITICAL, that
* this implementation manages.
- *
+ *
* @return the set of extension OIDs marked as NON-CRITIAL, an empty set if
* none are marked as NON-.CRITICAL, or {@code null} if no
* extensions are present.
@@ -58,7 +58,7 @@
/**
* Returns whether this instance has an extension marked as CRITICAL that it
* cannot support.
- *
+ *
* @return {@code true} if an unsupported CRITICAL extension is present,
* {@code false} otherwise.
*/
diff --git a/luni/src/main/java/java/security/interfaces/DSAKey.java b/luni/src/main/java/java/security/interfaces/DSAKey.java
index ac9aade..340ef0b 100644
--- a/luni/src/main/java/java/security/interfaces/DSAKey.java
+++ b/luni/src/main/java/java/security/interfaces/DSAKey.java
@@ -26,7 +26,7 @@
/**
* Returns the DSA key parameters.
- *
+ *
* @return the DSA key parameters.
*/
public DSAParams getParams();
diff --git a/luni/src/main/java/java/security/interfaces/DSAKeyPairGenerator.java b/luni/src/main/java/java/security/interfaces/DSAKeyPairGenerator.java
index b7b5480..8e2f732 100644
--- a/luni/src/main/java/java/security/interfaces/DSAKeyPairGenerator.java
+++ b/luni/src/main/java/java/security/interfaces/DSAKeyPairGenerator.java
@@ -28,7 +28,7 @@
/**
* Initializes this generator with the prime ({@code p}), subprime ({@code
* q}), and base ({@code g}) values from the specified parameters.
- *
+ *
* @param params
* the parameter values.
* @param random
@@ -50,7 +50,7 @@
* it will use the pre-calculated values for the specified modulus
* length. Default parameters are available for modulus lengths of 512 and 1024
* bits.
- *
+ *
* @param modlen
* the length of the modulus in bits.
* @param genParams
diff --git a/luni/src/main/java/java/security/interfaces/DSAParams.java b/luni/src/main/java/java/security/interfaces/DSAParams.java
index 62f2d00..ed1fcb5 100644
--- a/luni/src/main/java/java/security/interfaces/DSAParams.java
+++ b/luni/src/main/java/java/security/interfaces/DSAParams.java
@@ -20,27 +20,27 @@
import java.math.BigInteger;
/**
- * The interface for Digital Signature Algorithm (DSA) specific parameters.
+ * The interface for Digital Signature Algorithm (DSA) specific parameters.
*/
public interface DSAParams {
/**
* Returns the base ({@code g}) value.
- *
+ *
* @return the base ({@code g}) value.
*/
public BigInteger getG();
/**
* Returns the prime ({@code p}) value.
- *
+ *
* @return the prime ({@code p}) value.
*/
public BigInteger getP();
/**
* Returns the subprime ({@code q} value.
- *
+ *
* @return the subprime ({@code q} value.
*/
public BigInteger getQ();
diff --git a/luni/src/main/java/java/security/interfaces/DSAPrivateKey.java b/luni/src/main/java/java/security/interfaces/DSAPrivateKey.java
index 6419440..f7c5697 100644
--- a/luni/src/main/java/java/security/interfaces/DSAPrivateKey.java
+++ b/luni/src/main/java/java/security/interfaces/DSAPrivateKey.java
@@ -32,7 +32,7 @@
/**
* Returns the private key value {@code x}.
- *
+ *
* @return the private key value {@code x}.
*/
public BigInteger getX();
diff --git a/luni/src/main/java/java/security/interfaces/DSAPublicKey.java b/luni/src/main/java/java/security/interfaces/DSAPublicKey.java
index 9642bf1..f8f9dce 100644
--- a/luni/src/main/java/java/security/interfaces/DSAPublicKey.java
+++ b/luni/src/main/java/java/security/interfaces/DSAPublicKey.java
@@ -21,7 +21,7 @@
import java.security.PublicKey;
/**
- * The interface for a Digital Signature Algorithm (DSA) public key.
+ * The interface for a Digital Signature Algorithm (DSA) public key.
*/
public interface DSAPublicKey extends DSAKey, PublicKey {
@@ -32,7 +32,7 @@
/**
* Returns the public key value {@code y}.
- *
+ *
* @return the public key value {@code y}.
*/
public BigInteger getY();
diff --git a/luni/src/main/java/java/security/interfaces/ECKey.java b/luni/src/main/java/java/security/interfaces/ECKey.java
index 5469392..c1e7ac3 100644
--- a/luni/src/main/java/java/security/interfaces/ECKey.java
+++ b/luni/src/main/java/java/security/interfaces/ECKey.java
@@ -26,7 +26,7 @@
/**
* Returns the EC key parameters.
- *
+ *
* @return the EC key parameters.
*/
public ECParameterSpec getParams();
diff --git a/luni/src/main/java/java/security/interfaces/ECPrivateKey.java b/luni/src/main/java/java/security/interfaces/ECPrivateKey.java
index 254d2a6..e40dfea 100644
--- a/luni/src/main/java/java/security/interfaces/ECPrivateKey.java
+++ b/luni/src/main/java/java/security/interfaces/ECPrivateKey.java
@@ -32,7 +32,7 @@
/**
* Returns the private value {@code S}.
- *
+ *
* @return the private value {@code S}.
*/
public BigInteger getS();
diff --git a/luni/src/main/java/java/security/interfaces/ECPublicKey.java b/luni/src/main/java/java/security/interfaces/ECPublicKey.java
index 8ad97fc..c6a1db7 100644
--- a/luni/src/main/java/java/security/interfaces/ECPublicKey.java
+++ b/luni/src/main/java/java/security/interfaces/ECPublicKey.java
@@ -32,7 +32,7 @@
/**
* Returns the public point {@code W} on an elliptic curve (EC).
- *
+ *
* @return the public point {@code W} on an elliptic curve (EC).
*/
public ECPoint getW();
diff --git a/luni/src/main/java/java/security/interfaces/RSAKey.java b/luni/src/main/java/java/security/interfaces/RSAKey.java
index 2c9e6c1..9d1ca01 100644
--- a/luni/src/main/java/java/security/interfaces/RSAKey.java
+++ b/luni/src/main/java/java/security/interfaces/RSAKey.java
@@ -26,7 +26,7 @@
/**
* Returns the modulus.
- *
+ *
* @return the modulus.
*/
public BigInteger getModulus();
diff --git a/luni/src/main/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java b/luni/src/main/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
index d8aa1bf..3b8885e 100644
--- a/luni/src/main/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
+++ b/luni/src/main/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
@@ -34,14 +34,14 @@
/**
* Returns the CRT coefficient, {@code q^-1 mod p}.
- *
+ *
* @return the CRT coefficient.
*/
public BigInteger getCrtCoefficient();
/**
* Returns the information for the additional primes.
- *
+ *
* @return the information for the additional primes, or {@code null} if
* there are only the two primes ({@code p, q}),
*/
@@ -49,35 +49,35 @@
/**
* Returns the prime factor {@code p} of {@code n}.
- *
+ *
* @return the prime factor {@code p} of {@code n}.
*/
public BigInteger getPrimeP();
/**
* Returns the prime factor {@code q} of {@code n}.
- *
+ *
* @return the prime factor {@code q} of {@code n}.
*/
public BigInteger getPrimeQ();
/**
* Returns the CRT exponent of the prime {@code p}.
- *
+ *
* @return the CRT exponent of the prime {@code p}.
*/
public BigInteger getPrimeExponentP();
/**
* Returns the CRT exponent of the prime {@code q}.
- *
+ *
* @return the CRT exponent of the prime {@code q}.
*/
public BigInteger getPrimeExponentQ();
/**
* Returns the public exponent {@code e}.
- *
+ *
* @return the public exponent {@code e}.
*/
public BigInteger getPublicExponent();
diff --git a/luni/src/main/java/java/security/interfaces/RSAPrivateCrtKey.java b/luni/src/main/java/java/security/interfaces/RSAPrivateCrtKey.java
index a670491..ce4d0aa 100644
--- a/luni/src/main/java/java/security/interfaces/RSAPrivateCrtKey.java
+++ b/luni/src/main/java/java/security/interfaces/RSAPrivateCrtKey.java
@@ -31,42 +31,42 @@
/**
* Returns the CRT coefficient, {@code q^-1 mod p}.
- *
+ *
* @return the CRT coefficient.
*/
public BigInteger getCrtCoefficient();
/**
* Returns the prime factor {@code p} of {@code n}.
- *
+ *
* @return the prime factor {@code p} of {@code n}.
*/
public BigInteger getPrimeP();
/**
* Returns the prime factor {@code q} of {@code n}.
- *
+ *
* @return the prime factor {@code q} of {@code n}.
*/
public BigInteger getPrimeQ();
/**
* Returns the CRT exponent of the primet {@code p}.
- *
+ *
* @return the CRT exponent of the prime {@code p}.
*/
public BigInteger getPrimeExponentP();
/**
* Returns the CRT exponent of the prime {@code q}.
- *
+ *
* @return the CRT exponent of the prime {@code q}.
*/
public BigInteger getPrimeExponentQ();
/**
* Returns the public exponent {@code e}.
- *
+ *
* @return the public exponent {@code e}.
*/
public BigInteger getPublicExponent();
diff --git a/luni/src/main/java/java/security/interfaces/RSAPrivateKey.java b/luni/src/main/java/java/security/interfaces/RSAPrivateKey.java
index 0da15e9..bc08544 100644
--- a/luni/src/main/java/java/security/interfaces/RSAPrivateKey.java
+++ b/luni/src/main/java/java/security/interfaces/RSAPrivateKey.java
@@ -32,7 +32,7 @@
/**
* Returns the private exponent {@code d}.
- *
+ *
* @return the private exponent {@code d}.
*/
public BigInteger getPrivateExponent();
diff --git a/luni/src/main/java/java/security/interfaces/RSAPublicKey.java b/luni/src/main/java/java/security/interfaces/RSAPublicKey.java
index 379351f..4c80388 100644
--- a/luni/src/main/java/java/security/interfaces/RSAPublicKey.java
+++ b/luni/src/main/java/java/security/interfaces/RSAPublicKey.java
@@ -32,7 +32,7 @@
/**
* Returns the public exponent {@code e}.
- *
+ *
* @return the public exponent {@code e}.
*/
public BigInteger getPublicExponent();
diff --git a/luni/src/main/java/java/security/spec/DSAParameterSpec.java b/luni/src/main/java/java/security/spec/DSAParameterSpec.java
index e23a682..4484908 100644
--- a/luni/src/main/java/java/security/spec/DSAParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/DSAParameterSpec.java
@@ -21,7 +21,7 @@
import java.security.interfaces.DSAParams;
/**
- * The parameter specification used with the Digital Signature Algorithm (DSA).
+ * The parameter specification used with the Digital Signature Algorithm (DSA).
*/
public class DSAParameterSpec implements AlgorithmParameterSpec, DSAParams {
// Prime
@@ -34,7 +34,7 @@
/**
* Creates a new {@code DSAParameterSpec} with the specified prime {@code p},
* sub-prime {@code q} and the base {@code g}.
- *
+ *
* @param p
* the prime {@code p}.
* @param q
@@ -50,7 +50,7 @@
/**
* Returns the base {@code g}.
- *
+ *
* @return the base {@code g}.
*/
public BigInteger getG() {
@@ -59,7 +59,7 @@
/**
* Returns the prime {@code p}.
- *
+ *
* @return the prime {@code p}.
*/
public BigInteger getP() {
@@ -68,7 +68,7 @@
/**
* Returns the sub-prime {@code q}.
- *
+ *
* @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
diff --git a/luni/src/main/java/java/security/spec/DSAPrivateKeySpec.java b/luni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
index 6dc12c8..035b986 100644
--- a/luni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
+++ b/luni/src/main/java/java/security/spec/DSAPrivateKeySpec.java
@@ -35,7 +35,7 @@
/**
* Creates a new {@code DSAPrivateKeySpec} with the specified private key,
* prime, sub-prime and base.
- *
+ *
* @param x
* the private key {@code x}.
* @param p
@@ -55,7 +55,7 @@
/**
* Returns the base {@code g}.
- *
+ *
* @return the base {@code g}.
*/
public BigInteger getG() {
@@ -64,7 +64,7 @@
/**
* Returns the prime {@code p}.
- *
+ *
* @return the prime {@code p}.
*/
public BigInteger getP() {
@@ -73,7 +73,7 @@
/**
* Returns the sub-prime {@code q}.
- *
+ *
* @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
@@ -82,7 +82,7 @@
/**
* Returns the private key {@code x}.
- *
+ *
* @return the private key {@code x}.
*/
public BigInteger getX() {
diff --git a/luni/src/main/java/java/security/spec/DSAPublicKeySpec.java b/luni/src/main/java/java/security/spec/DSAPublicKeySpec.java
index af90919..0ee10a2 100644
--- a/luni/src/main/java/java/security/spec/DSAPublicKeySpec.java
+++ b/luni/src/main/java/java/security/spec/DSAPublicKeySpec.java
@@ -35,7 +35,7 @@
/**
* Creates a new {@code DSAPublicKeySpec} with the specified public key,
* prime, sub-prime and base.
- *
+ *
* @param y
* the public key value {@code y}.
* @param p
@@ -55,7 +55,7 @@
/**
* Returns the base {@code g}.
- *
+ *
* @return the base {@code g}.
*/
public BigInteger getG() {
@@ -64,7 +64,7 @@
/**
* Returns the prime {@code p}.
- *
+ *
* @return the prime {@code p}.
*/
public BigInteger getP() {
@@ -73,7 +73,7 @@
/**
* Returns the sub-prime {@code q}.
- *
+ *
* @return the sub-prime {@code q}.
*/
public BigInteger getQ() {
@@ -82,7 +82,7 @@
/**
* Returns the public key value {@code y}.
- *
+ *
* @return the public key value {@code y}.
*/
public BigInteger getY() {
diff --git a/luni/src/main/java/java/security/spec/ECField.java b/luni/src/main/java/java/security/spec/ECField.java
index b4c6be2..35eb6e7 100644
--- a/luni/src/main/java/java/security/spec/ECField.java
+++ b/luni/src/main/java/java/security/spec/ECField.java
@@ -18,13 +18,13 @@
package java.security.spec;
/**
- * The base interface for a Finite Field of an Elliptic Curve.
+ * The base interface for a Finite Field of an Elliptic Curve.
*/
public interface ECField {
/**
* Returns the size of the field (in bits).
- *
+ *
* @return the size of the field (in bits).
*/
int getFieldSize();
diff --git a/luni/src/main/java/java/security/spec/ECFieldF2m.java b/luni/src/main/java/java/security/spec/ECFieldF2m.java
index 525828e..1f53265 100644
--- a/luni/src/main/java/java/security/spec/ECFieldF2m.java
+++ b/luni/src/main/java/java/security/spec/ECFieldF2m.java
@@ -45,7 +45,7 @@
/**
* Creates a new {@code ECFieldF2m} with {@code 2^m} elements with a normal
* basis.
- *
+ *
* @param m
* the exponent {@code m} for the number of elements.
* @throws IllegalArgumentException
@@ -54,7 +54,7 @@
public ECFieldF2m(int m) {
this.m = m;
if (this.m <= 0) {
- throw new IllegalArgumentException(Messages.getString("security.75"));
+ throw new IllegalArgumentException(Messages.getString("security.75"));
}
this.rp = null;
this.ks = null;
@@ -79,11 +79,11 @@
public ECFieldF2m(int m, BigInteger rp) {
this.m = m;
if (this.m <= 0) {
- throw new IllegalArgumentException(Messages.getString("security.75"));
+ throw new IllegalArgumentException(Messages.getString("security.75"));
}
this.rp = rp;
if (this.rp == null) {
- throw new NullPointerException(Messages.getString("security.76"));
+ throw new NullPointerException(Messages.getString("security.76"));
}
// the leftmost bit must be (m+1)-th one,
// set bits count must be 3 or 5,
@@ -92,7 +92,7 @@
if ((this.rp.bitLength() != (m+1)) ||
(rp_bc != TPB_LEN && rp_bc != PPB_LEN) ||
(!this.rp.testBit(0) || !this.rp.testBit(m)) ) {
- throw new IllegalArgumentException(Messages.getString("security.77"));
+ throw new IllegalArgumentException(Messages.getString("security.77"));
}
// setup ks using rp:
@@ -112,12 +112,12 @@
* <p>
* The reduction polynomial must be either <i>trinomial</i> or
* <i>pentanomial</i>.
- *
+ *
* @param m
* the exponent {@code m} for the number of elements.
* @param ks
* the base of the reduction polynomial with coefficients
- * given in descending order.
+ * given in descending order.
* @throws IllegalArgumentException
* if {@code m <= zero} or the reduction polynomial is not
* valid.
@@ -125,7 +125,7 @@
public ECFieldF2m(int m, int[] ks) {
this.m = m;
if (this.m <= 0) {
- throw new IllegalArgumentException(Messages.getString("security.75"));
+ throw new IllegalArgumentException(Messages.getString("security.75"));
}
// Defensively copies array parameter
// to prevent subsequent modification.
@@ -136,7 +136,7 @@
// no need to check for null already
if (this.ks.length != TPB_MID_LEN && this.ks.length != PPB_MID_LEN) {
// must be either trinomial or pentanomial basis
- throw new IllegalArgumentException(Messages.getString("security.78"));
+ throw new IllegalArgumentException(Messages.getString("security.78"));
}
// trinomial basis:
// check that m > k >= 1, where k is ks[0]
@@ -155,7 +155,7 @@
break;
}
if (checkFailed || prev < 1) {
- throw new IllegalArgumentException(Messages.getString("security.79"));
+ throw new IllegalArgumentException(Messages.getString("security.79"));
}
// Setup rp using ks:
@@ -170,7 +170,7 @@
/**
* Returns whether the specified object equals to this finite field.
- *
+ *
* @param obj
* the object to compare to this finite field.
* @return {@code true} if the specified object is equal to this finite field,
@@ -204,7 +204,7 @@
/**
* Returns the size of this finite field (in bits).
- *
+ *
* @return the size of this finite field (in bits).
*/
public int getFieldSize() {
@@ -214,7 +214,7 @@
/**
* Returns the exponent {@code m} for this finite field, with {@code 2^m} as
* the number of elements.
- *
+ *
* @return the exponent {@code m} for this finite field
*/
public int getM() {
@@ -224,7 +224,7 @@
/**
* Returns a copy of the integer array containing the order of the middle
* term(s) of the reduction polynomial for a polynomial basis.
- *
+ *
* @return a copy of the integer array containing the order of the middle
* term(s) of the reduction polynomial for a polynomial basis or
* {@code null} for a normal basis.
@@ -246,7 +246,7 @@
* Returns the base of the reduction polynomial with the n-th bit
* corresponding to the n-th coefficient of the reduction polynomial for a
* polynomial basis.
- *
+ *
* @return the base of the reduction polynomial with the n-th bit
* corresponding to the n-th coefficient of the reduction polynomial
* for a polynomial basis or {@code null} for a normal basis.
@@ -257,7 +257,7 @@
/**
* Returns the hashcode value for this finite field.
- *
+ *
* @return the hashcode value for this finite field.
*/
public int hashCode() {
diff --git a/luni/src/main/java/java/security/spec/ECFieldFp.java b/luni/src/main/java/java/security/spec/ECFieldFp.java
index 917808e..dacb888 100644
--- a/luni/src/main/java/java/security/spec/ECFieldFp.java
+++ b/luni/src/main/java/java/security/spec/ECFieldFp.java
@@ -32,7 +32,7 @@
/**
* Creates a new prime finite field of an elliptic curve with the specified
* prime {@code p}.
- *
+ *
* @param p
* the prime value {@code p}.
* @throws IllegalArgumentException
@@ -42,16 +42,16 @@
this.p = p;
if (this.p == null) {
- throw new NullPointerException(Messages.getString("security.83", "p"));
+ throw new NullPointerException(Messages.getString("security.83", "p"));
}
if (this.p.signum() != 1) {
- throw new IllegalArgumentException(Messages.getString("security.86", "p"));
+ throw new IllegalArgumentException(Messages.getString("security.86", "p"));
}
}
/**
* Returns the size of the finite field (in bits).
- *
+ *
* @return the size of the finite field (in bits).
*/
public int getFieldSize() {
@@ -60,7 +60,7 @@
/**
* Returns the prime value {@code p} for this finite field.
- *
+ *
* @return the prime value {@code p} for this finite field.
*/
public BigInteger getP() {
@@ -69,7 +69,7 @@
/**
* Returns whether the specified object is equal to this finite field.
- *
+ *
* @param obj
* the object to compare to this finite field.
* @return {@code true} if the specified object is equal to this finite field,
@@ -88,7 +88,7 @@
/**
* Returns the hashcode value for this finite field.
- *
+ *
* @return the hashcode value for this finite field.
*/
public int hashCode() {
diff --git a/luni/src/main/java/java/security/spec/ECGenParameterSpec.java b/luni/src/main/java/java/security/spec/ECGenParameterSpec.java
index 86585a3..32f5b3a 100644
--- a/luni/src/main/java/java/security/spec/ECGenParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/ECGenParameterSpec.java
@@ -20,7 +20,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The parameter specification used to generate elliptic curve domain parameters.
+ * The parameter specification used to generate elliptic curve domain parameters.
*/
public class ECGenParameterSpec implements AlgorithmParameterSpec {
// Standard (or predefined) name for EC domain
@@ -30,21 +30,21 @@
/**
* Creates a new {@code ECGenParameterSpec} with the specified standard or
* predefined name of the to-be-generated domain parameter.
- *
+ *
* @param name
* the name of the elliptic curve domain parameter.
*/
public ECGenParameterSpec(String name) {
this.name = name;
if (this.name == null) {
- throw new NullPointerException(Messages.getString("security.83", "name"));
+ throw new NullPointerException(Messages.getString("security.83", "name"));
}
}
/**
* Returns the name (standard or predefined) of the to-be-generated elliptic
* curve domain parameter.
- *
+ *
* @return the name
*/
public String getName() {
diff --git a/luni/src/main/java/java/security/spec/ECParameterSpec.java b/luni/src/main/java/java/security/spec/ECParameterSpec.java
index b2e79a2..3e24283 100644
--- a/luni/src/main/java/java/security/spec/ECParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/ECParameterSpec.java
@@ -22,7 +22,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The parameter specification used with Elliptic Curve Cryptography (ECC).
+ * The parameter specification used with Elliptic Curve Cryptography (ECC).
*/
public class ECParameterSpec implements AlgorithmParameterSpec {
// Elliptic curve for which this is parameter
@@ -38,7 +38,7 @@
* Creates a new {@code ECParameterSpec} with the specified elliptic curve,
* the base point, the order of the generator (or base point) and the
* co-factor.
- *
+ *
* @param curve
* the elliptic curve.
* @param generator
@@ -58,28 +58,28 @@
this.cofactor = cofactor;
// throw NullPointerException if curve, generator or order is null
if (this.curve == null) {
- throw new NullPointerException(Messages.getString("security.83", "curve"));
+ throw new NullPointerException(Messages.getString("security.83", "curve"));
}
if (this.generator == null) {
- throw new NullPointerException(Messages.getString("security.83", "generator"));
+ throw new NullPointerException(Messages.getString("security.83", "generator"));
}
if (this.order == null) {
- throw new NullPointerException(Messages.getString("security.83", "order"));
+ throw new NullPointerException(Messages.getString("security.83", "order"));
}
// throw IllegalArgumentException if order or cofactor is not positive
if (!(this.order.compareTo(BigInteger.ZERO) > 0)) {
throw new
- IllegalArgumentException(Messages.getString("security.86", "order"));
+ IllegalArgumentException(Messages.getString("security.86", "order"));
}
if (!(this.cofactor > 0)) {
throw new
- IllegalArgumentException(Messages.getString("security.86", "cofactor"));
+ IllegalArgumentException(Messages.getString("security.86", "cofactor"));
}
}
/**
* Returns the {@code cofactor}.
- *
+ *
* @return the {@code cofactor}.
*/
public int getCofactor() {
@@ -88,7 +88,7 @@
/**
* Returns the elliptic curve.
- *
+ *
* @return the elliptic curve.
*/
public EllipticCurve getCurve() {
@@ -97,7 +97,7 @@
/**
* Returns the generator (or base point).
- *
+ *
* @return the generator (or base point).
*/
public ECPoint getGenerator() {
@@ -106,7 +106,7 @@
/**
* Returns the order of the generator.
- *
+ *
* @return the order of the generator.
*/
public BigInteger getOrder() {
diff --git a/luni/src/main/java/java/security/spec/ECPoint.java b/luni/src/main/java/java/security/spec/ECPoint.java
index 3bc263b..64f3909 100644
--- a/luni/src/main/java/java/security/spec/ECPoint.java
+++ b/luni/src/main/java/java/security/spec/ECPoint.java
@@ -22,7 +22,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * A Point on an Elliptic Curve in barycentric (or affine) coordinates.
+ * A Point on an Elliptic Curve in barycentric (or affine) coordinates.
*/
public class ECPoint {
@@ -43,7 +43,7 @@
/**
* Creates a new point at the specified coordinates.
- *
+ *
* @param affineX
* the x-coordinate.
* @param affineY
@@ -52,17 +52,17 @@
public ECPoint(BigInteger affineX, BigInteger affineY) {
this.affineX = affineX;
if (this.affineX == null) {
- throw new NullPointerException(Messages.getString("security.83", "X"));
+ throw new NullPointerException(Messages.getString("security.83", "X"));
}
this.affineY = affineY;
if (this.affineY == null) {
- throw new NullPointerException(Messages.getString("security.83", "Y"));
+ throw new NullPointerException(Messages.getString("security.83", "Y"));
}
}
/**
* Returns the x-coordinate.
- *
+ *
* @return the x-coordinate, or {@code null} for the infinite point.
*/
public BigInteger getAffineX() {
@@ -71,7 +71,7 @@
/**
* Returns the y-coordinate.
- *
+ *
* @return the y-coordinate, or {@code null} fot the infinite point.
*/
public BigInteger getAffineY() {
@@ -81,7 +81,7 @@
/**
* Returns whether the specified object and this elliptic curve point are
* equal.
- *
+ *
* @param other
* the object to compare.
* @return {@code true} if the specified object and this elliptic curve
@@ -106,7 +106,7 @@
/**
* Returns the hashcode of this elliptic curve point.
- *
+ *
* @return the hashcode of this elliptic curve point.
*/
public int hashCode() {
diff --git a/luni/src/main/java/java/security/spec/ECPrivateKeySpec.java b/luni/src/main/java/java/security/spec/ECPrivateKeySpec.java
index b72d5a4..4080ed2 100644
--- a/luni/src/main/java/java/security/spec/ECPrivateKeySpec.java
+++ b/luni/src/main/java/java/security/spec/ECPrivateKeySpec.java
@@ -22,7 +22,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The parameters specifying an Elliptic Curve (EC) private key.
+ * The parameters specifying an Elliptic Curve (EC) private key.
*/
public class ECPrivateKeySpec implements KeySpec {
// Private value associated with this key
@@ -33,7 +33,7 @@
/**
* Creates a new {@code ECPrivateKeySpec} with the specified private value
* {@code S} and parameter specification.
- *
+ *
* @param s
* the private value {@code S}.
* @param params
@@ -44,16 +44,16 @@
this.params = params;
// throw NullPointerException if s or params is null
if (this.s == null) {
- throw new NullPointerException(Messages.getString("security.83", "s"));
+ throw new NullPointerException(Messages.getString("security.83", "s"));
}
if (this.params == null) {
- throw new NullPointerException(Messages.getString("security.83", "params"));
+ throw new NullPointerException(Messages.getString("security.83", "params"));
}
}
/**
* Returns the domain parameter specification.
- *
+ *
* @return the domain parameter specification.
*/
public ECParameterSpec getParams() {
@@ -62,7 +62,7 @@
/**
* Returns the private value {@code S}.
- *
+ *
* @return the private value {@code S}.
*/
public BigInteger getS() {
diff --git a/luni/src/main/java/java/security/spec/ECPublicKeySpec.java b/luni/src/main/java/java/security/spec/ECPublicKeySpec.java
index 45c51bb..c3ab418 100644
--- a/luni/src/main/java/java/security/spec/ECPublicKeySpec.java
+++ b/luni/src/main/java/java/security/spec/ECPublicKeySpec.java
@@ -20,7 +20,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The parameters specifying an Elliptic Curve (EC) public key.
+ * The parameters specifying an Elliptic Curve (EC) public key.
*/
public class ECPublicKeySpec implements KeySpec {
// The public point
@@ -31,7 +31,7 @@
/**
* Creates a new {@code ECPublicKey} with the specified public elliptic
* curve point and parameter specification.
- *
+ *
* @param w
* the public elliptic curve point {@code W}.
* @param params
@@ -44,21 +44,21 @@
this.params = params;
// throw NullPointerException if w or params is null
if (this.w == null) {
- throw new NullPointerException(Messages.getString("security.83", "w"));
+ throw new NullPointerException(Messages.getString("security.83", "w"));
}
if (this.params == null) {
- throw new NullPointerException(Messages.getString("security.83", "params"));
+ throw new NullPointerException(Messages.getString("security.83", "params"));
}
// throw IllegalArgumentException if w is point at infinity
if (this.w.equals(ECPoint.POINT_INFINITY)) {
throw new IllegalArgumentException(
- Messages.getString("security.84"));
+ Messages.getString("security.84"));
}
}
/**
* Returns the domain parameter specification.
- *
+ *
* @return the domain parameter specification.
*/
public ECParameterSpec getParams() {
@@ -67,7 +67,7 @@
/**
* Returns the public elliptic curve point {@code W}.
- *
+ *
* @return the public elliptic curve point {@code W}.
*/
public ECPoint getW() {
diff --git a/luni/src/main/java/java/security/spec/EllipticCurve.java b/luni/src/main/java/java/security/spec/EllipticCurve.java
index ff719f5..112b2b7 100644
--- a/luni/src/main/java/java/security/spec/EllipticCurve.java
+++ b/luni/src/main/java/java/security/spec/EllipticCurve.java
@@ -46,7 +46,7 @@
/**
* Creates a new {@code EllipticCurve} with the specified field,
* coefficients and seed.
- *
+ *
* @param field
* the finite field of this elliptic curve.
* @param a
@@ -61,15 +61,15 @@
public EllipticCurve(ECField field, BigInteger a, BigInteger b, byte[] seed) {
this.field = field;
if (this.field == null) {
- throw new NullPointerException(Messages.getString("security.7A"));
+ throw new NullPointerException(Messages.getString("security.7A"));
}
this.a = a;
if (this.a == null) {
- throw new NullPointerException(Messages.getString("security.7B"));
+ throw new NullPointerException(Messages.getString("security.7B"));
}
this.b = b;
if (this.b == null) {
- throw new NullPointerException(Messages.getString("security.7C"));
+ throw new NullPointerException(Messages.getString("security.7C"));
}
// make defensive copy
if (seed == null) {
@@ -84,18 +84,18 @@
if (this.field instanceof ECFieldFp) {
BigInteger p = ((ECFieldFp) this.field).getP();
if (this.a.signum() < 0 || this.a.compareTo(p) >= 0) {
- throw new IllegalArgumentException(Messages.getString("security.7D"));
+ throw new IllegalArgumentException(Messages.getString("security.7D"));
}
if (this.b.signum() < 0 || this.b.compareTo(p) >= 0) {
- throw new IllegalArgumentException(Messages.getString("security.7E"));
+ throw new IllegalArgumentException(Messages.getString("security.7E"));
}
} else if (this.field instanceof ECFieldF2m) {
int fieldSizeInBits = this.field.getFieldSize();
if (!(this.a.bitLength() <= fieldSizeInBits)) {
- throw new IllegalArgumentException(Messages.getString("security.7D"));
+ throw new IllegalArgumentException(Messages.getString("security.7D"));
}
if (!(this.b.bitLength() <= fieldSizeInBits)) {
- throw new IllegalArgumentException(Messages.getString("security.7E"));
+ throw new IllegalArgumentException(Messages.getString("security.7E"));
}
}
}
@@ -103,7 +103,7 @@
/**
* Creates a new {@code EllipticCurve} with the specified field and
* coefficients.
- *
+ *
* @param field
* the finite field of this elliptic curve.
* @param a
@@ -119,7 +119,7 @@
/**
* Returns the coefficient {@code a} of this elliptic curve.
- *
+ *
* @return the coefficient {@code a} of this elliptic curve.
*/
public BigInteger getA() {
@@ -128,7 +128,7 @@
/**
* Returns the coefficient {@code b} of this elliptic curve.
- *
+ *
* @return the coefficient {@code b} of this elliptic curve.
*/
public BigInteger getB() {
@@ -137,7 +137,7 @@
/**
* Returns the finite field of this elliptic curve.
- *
+ *
* @return the finite field of this elliptic curve.
*/
public ECField getField() {
@@ -146,7 +146,7 @@
/**
* Returns a copy of the seed that was used to generate this elliptic curve.
- *
+ *
* @return a copy of the seed that was used to generate this elliptic curve,
* or {@code null} if none specified.
*/
@@ -163,7 +163,7 @@
/**
* Returns whether the specified object equals to this elliptic curve.
- *
+ *
* @param other
* the object to compare.
* @return {@code true} if the specified object is equal to this elliptic
@@ -184,7 +184,7 @@
/**
* Returns the hashcode of this elliptic curve.
- *
+ *
* @return the hashcode of this elliptic curve.
*/
public int hashCode() {
diff --git a/luni/src/main/java/java/security/spec/EncodedKeySpec.java b/luni/src/main/java/java/security/spec/EncodedKeySpec.java
index d34794c..539c60b 100644
--- a/luni/src/main/java/java/security/spec/EncodedKeySpec.java
+++ b/luni/src/main/java/java/security/spec/EncodedKeySpec.java
@@ -27,7 +27,7 @@
/**
* Creates a new {@code EncodedKeySpec} with the specified encoded key bytes.
- *
+ *
* @param encodedKey
* the encoded key bytes.
*/
@@ -41,7 +41,7 @@
/**
* Returns the encoded key bytes.
- *
+ *
* @return the encoded key bytes.
*/
public byte[] getEncoded() {
@@ -55,7 +55,7 @@
/**
* Returns the name of the encoding format of this encoded key
* specification.
- *
+ *
* @return the name of the encoding format of this encoded key
* specification.
*/
diff --git a/luni/src/main/java/java/security/spec/InvalidKeySpecException.java b/luni/src/main/java/java/security/spec/InvalidKeySpecException.java
index 4ae5877..e5728f5 100644
--- a/luni/src/main/java/java/security/spec/InvalidKeySpecException.java
+++ b/luni/src/main/java/java/security/spec/InvalidKeySpecException.java
@@ -32,7 +32,7 @@
/**
* Creates a new {@code InvalidKeySpecException} with the specified message.
- *
+ *
* @param msg
* the detail message of this exception.
*/
@@ -49,7 +49,7 @@
/**
* Creates a new {@code InvalidKeySpecException} with the specified message
* and cause.
- *
+ *
* @param message
* the detail message of this exception.
* @param cause
@@ -61,7 +61,7 @@
/**
* Creates a new {@code InvalidKeySpecException} with the specified cause.
- *
+ *
* @param cause
* the cause of this exception.
*/
diff --git a/luni/src/main/java/java/security/spec/InvalidParameterSpecException.java b/luni/src/main/java/java/security/spec/InvalidParameterSpecException.java
index e308dd8..b3a8294 100644
--- a/luni/src/main/java/java/security/spec/InvalidParameterSpecException.java
+++ b/luni/src/main/java/java/security/spec/InvalidParameterSpecException.java
@@ -33,7 +33,7 @@
/**
* Creates a new {@code InvalidParameterSpecException} with the specified
* message.
- *
+ *
* @param msg
* the detail message for this exception.
*/
diff --git a/luni/src/main/java/java/security/spec/MGF1ParameterSpec.java b/luni/src/main/java/java/security/spec/MGF1ParameterSpec.java
index 54dd399..f550191 100644
--- a/luni/src/main/java/java/security/spec/MGF1ParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/MGF1ParameterSpec.java
@@ -34,28 +34,28 @@
* digest.
*/
public static final MGF1ParameterSpec SHA1 =
- new MGF1ParameterSpec("SHA-1");
+ new MGF1ParameterSpec("SHA-1");
/**
* The predefined MGF1 parameter specification with an "SHA-256" message
* digest.
*/
public static final MGF1ParameterSpec SHA256 =
- new MGF1ParameterSpec("SHA-256");
+ new MGF1ParameterSpec("SHA-256");
/**
* The predefined MGF1 parameter specification with an "SHA-384" message
* digest.
*/
public static final MGF1ParameterSpec SHA384 =
- new MGF1ParameterSpec("SHA-384");
+ new MGF1ParameterSpec("SHA-384");
/**
* The predefined MGF1 parameter specification with an "SHA-512" message
* digest.
*/
public static final MGF1ParameterSpec SHA512 =
- new MGF1ParameterSpec("SHA-512");
+ new MGF1ParameterSpec("SHA-512");
// Message digest algorithm name
private final String mdName;
@@ -63,20 +63,20 @@
/**
* Creates a new {@code MGF1ParameterSpec} with the specified message digest
* algorithm name.
- *
+ *
* @param mdName
* the name of the message digest algorithm.
*/
public MGF1ParameterSpec(String mdName) {
this.mdName = mdName;
if (this.mdName == null) {
- throw new NullPointerException(Messages.getString("security.80"));
+ throw new NullPointerException(Messages.getString("security.80"));
}
}
/**
* Returns the name of the message digest algorithm.
- *
+ *
* @return the name of the message digest algorithm.
*/
public String getDigestAlgorithm() {
diff --git a/luni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java b/luni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
index 81287a2..b0d6718 100644
--- a/luni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
+++ b/luni/src/main/java/java/security/spec/PKCS8EncodedKeySpec.java
@@ -19,14 +19,14 @@
/**
* The key specification for an encoded private key in ASN.1 format as defined
- * in the PKCS#8 standard.
+ * in the PKCS#8 standard.
*/
-public class PKCS8EncodedKeySpec extends EncodedKeySpec {
+public class PKCS8EncodedKeySpec extends EncodedKeySpec {
/**
* Creates a new {@code PKCS8EncodedKeySpec} with the specified encoded key
* bytes.
- *
+ *
* @param encodedKey
* the encoded key bytes.
*/
@@ -37,7 +37,7 @@
/**
* Returns a copy of the encoded key bytes.
- *
+ *
* @return a copy of the encoded key bytes.
*/
public byte[] getEncoded() {
@@ -48,10 +48,10 @@
/**
* Returns the name of the encoding format of this encoded key
* specification.
- *
+ *
* @return the string "PKCS#8".
*/
public final String getFormat() {
- return "PKCS#8";
+ return "PKCS#8";
}
}
diff --git a/luni/src/main/java/java/security/spec/PSSParameterSpec.java b/luni/src/main/java/java/security/spec/PSSParameterSpec.java
index 1bf67ee..296ade0 100644
--- a/luni/src/main/java/java/security/spec/PSSParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/PSSParameterSpec.java
@@ -26,7 +26,7 @@
* href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
* standard.
*/
-public class PSSParameterSpec implements AlgorithmParameterSpec {
+public class PSSParameterSpec implements AlgorithmParameterSpec {
/**
* The default parameter specification. It specifies the following parameters:
@@ -52,9 +52,9 @@
private final int saltLen;
/**
- * Creates a new {@code PSSParameterSpec} with the specified salt length
+ * Creates a new {@code PSSParameterSpec} with the specified salt length
* and the default values.
- *
+ *
* @param saltLen
* the salt length (in bits).
* @throws IllegalArgumentException
@@ -62,11 +62,11 @@
*/
public PSSParameterSpec(int saltLen) {
if (saltLen < 0) {
- throw new IllegalArgumentException(Messages.getString("security.7F"));
+ throw new IllegalArgumentException(Messages.getString("security.7F"));
}
this.saltLen = saltLen;
- this.mdName = "SHA-1";
- this.mgfName = "MGF1";
+ this.mdName = "SHA-1";
+ this.mgfName = "MGF1";
this.mgfSpec = MGF1ParameterSpec.SHA1;
this.trailerField = 1;
}
@@ -75,7 +75,7 @@
* Creates a new {@code PSSParameterSpec} with the specified message digest
* name, mask generation function name, mask generation function parameters,
* salt length, and trailer field value.
- *
+ *
* @param mdName
* the name of the message digest algorithm.
* @param mgfName
@@ -93,16 +93,16 @@
AlgorithmParameterSpec mgfSpec, int saltLen, int trailerField) {
if (mdName == null) {
- throw new NullPointerException(Messages.getString("security.80"));
+ throw new NullPointerException(Messages.getString("security.80"));
}
if (mgfName == null) {
- throw new NullPointerException(Messages.getString("security.81"));
+ throw new NullPointerException(Messages.getString("security.81"));
}
if (saltLen < 0) {
- throw new IllegalArgumentException(Messages.getString("security.7F"));
+ throw new IllegalArgumentException(Messages.getString("security.7F"));
}
if (trailerField < 0) {
- throw new IllegalArgumentException(Messages.getString("security.82"));
+ throw new IllegalArgumentException(Messages.getString("security.82"));
}
this.mdName = mdName;
this.mgfName = mgfName;
@@ -113,7 +113,7 @@
/**
* Returns the length of the salt (in bits).
- *
+ *
* @return the length of the salt (in bits).
*/
public int getSaltLength() {
@@ -122,7 +122,7 @@
/**
* Returns the name of the message digest algorithm.
- *
+ *
* @return the name of the message digest algorithm.
*/
public String getDigestAlgorithm() {
@@ -131,7 +131,7 @@
/**
* Returns the name of the mask generation function algorithm.
- *
+ *
* @return the name of the mask generation function algorithm.
*/
public String getMGFAlgorithm() {
@@ -140,7 +140,7 @@
/**
* Returns the parameter for the mask generation function algorithm.
- *
+ *
* @return the parameter for the mask generation function algorithm, or
* {@code null} if none specified.
*/
@@ -150,7 +150,7 @@
/**
* Returns the trailer field value.
- *
+ *
* @return the trailer field value.
*/
public int getTrailerField() {
diff --git a/luni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java b/luni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
index 2377c75..a900225 100644
--- a/luni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
+++ b/luni/src/main/java/java/security/spec/RSAKeyGenParameterSpec.java
@@ -20,9 +20,9 @@
import java.math.BigInteger;
/**
- * The parameter specification for generating an RSA key pair.
+ * The parameter specification for generating an RSA key pair.
*/
-public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec {
+public class RSAKeyGenParameterSpec implements AlgorithmParameterSpec {
/**
* The value of the public exponent {@code F0} = 3.
@@ -42,7 +42,7 @@
/**
* Creates a new {@code RSAKeyGenParameterSpec} with the specified key size
* and public exponent.
- *
+ *
* @param keysize
* the size of the modulus (number of bits).
* @param publicExponent
@@ -55,7 +55,7 @@
/**
* Returns the size of the modulus (number of bits).
- *
+ *
* @return the size of the modulus (number of bits).
*/
public int getKeysize() {
@@ -64,7 +64,7 @@
/**
* Returns the value of the public exponent.
- *
+ *
* @return the value of the public exponent.
*/
public BigInteger getPublicExponent() {
diff --git a/luni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java b/luni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
index bb328af..4c58dac 100644
--- a/luni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
+++ b/luni/src/main/java/java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
@@ -49,7 +49,7 @@
* Creates a new {@code RSAMultiPrimePrivateCrtKeySpec} with the specified
* modulus, public exponent, private exponent, prime factors, prime
* exponents, crt coefficient, and additional primes.
- *
+ *
* @param modulus
* the modulus {@code n}.
* @param publicExponent
@@ -87,34 +87,34 @@
// Perform checks specified
if (modulus == null) {
- throw new NullPointerException(Messages.getString("security.83", "modulus"));
+ throw new NullPointerException(Messages.getString("security.83", "modulus"));
}
if (privateExponent == null) {
- throw new NullPointerException(Messages.getString("security.83", "privateExponent"));
+ throw new NullPointerException(Messages.getString("security.83", "privateExponent"));
}
if (publicExponent == null) {
- throw new NullPointerException(Messages.getString("security.83", "publicExponent"));
+ throw new NullPointerException(Messages.getString("security.83", "publicExponent"));
}
if (primeP == null) {
- throw new NullPointerException(Messages.getString("security.83", "primeP"));
+ throw new NullPointerException(Messages.getString("security.83", "primeP"));
}
if (primeQ == null) {
- throw new NullPointerException(Messages.getString("security.83", "primeQ"));
+ throw new NullPointerException(Messages.getString("security.83", "primeQ"));
}
if (primeExponentP == null) {
- throw new NullPointerException(Messages.getString("security.83", "primeExponentP"));
+ throw new NullPointerException(Messages.getString("security.83", "primeExponentP"));
}
if (primeExponentQ == null) {
- throw new NullPointerException(Messages.getString("security.83", "primeExponentQ"));
+ throw new NullPointerException(Messages.getString("security.83", "primeExponentQ"));
}
if (crtCoefficient == null) {
- throw new NullPointerException(Messages.getString("security.83", "crtCoefficient"));
+ throw new NullPointerException(Messages.getString("security.83", "crtCoefficient"));
}
if (otherPrimeInfo != null) {
if (otherPrimeInfo.length == 0) {
throw new IllegalArgumentException(
- Messages.getString("security.85"));
+ Messages.getString("security.85"));
}
// Clone array to prevent subsequent modification
this.otherPrimeInfo = new RSAOtherPrimeInfo[otherPrimeInfo.length];
@@ -133,7 +133,7 @@
/**
* Returns the CRT coefficient, {@code q^-1 mod p}.
- *
+ *
* @return the CRT coefficient, {@code q^-1 mod p}.
*/
public BigInteger getCrtCoefficient() {
@@ -142,7 +142,7 @@
/**
* Returns the information for the additional primes.
- *
+ *
* @return the information for the additional primes, or {@code null} if
* there are only the two primes ({@code p, q}).
*/
@@ -160,7 +160,7 @@
/**
* Returns the exponent of the prime {@code p}.
- *
+ *
* @return the exponent of the prime {@code p}.
*/
public BigInteger getPrimeExponentP() {
@@ -169,7 +169,7 @@
/**
* Returns the exponent of the prime {@code q}.
- *
+ *
* @return the exponent of the prime {@code q}.
*/
public BigInteger getPrimeExponentQ() {
@@ -178,7 +178,7 @@
/**
* Returns the prime factor {@code p}.
- *
+ *
* @return the prime factor {@code p}.
*/
public BigInteger getPrimeP() {
@@ -187,7 +187,7 @@
/**
* Returns the prime factor {@code q}.
- *
+ *
* @return the prime factor {@code q}.
*/
public BigInteger getPrimeQ() {
@@ -196,7 +196,7 @@
/**
* Returns the public exponent {@code e}.
- *
+ *
* @return the public exponent {@code e}.
*/
public BigInteger getPublicExponent() {
diff --git a/luni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java b/luni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
index 0920a34..7d800eb 100644
--- a/luni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
+++ b/luni/src/main/java/java/security/spec/RSAOtherPrimeInfo.java
@@ -40,7 +40,7 @@
/**
* Creates a new {@code RSAOtherPrimeInfo} with the specified prime,
* exponent, and CRT coefficient.
- *
+ *
* @param prime
* the prime factor.
* @param primeExponent
@@ -51,13 +51,13 @@
public RSAOtherPrimeInfo(BigInteger prime,
BigInteger primeExponent, BigInteger crtCoefficient) {
if (prime == null) {
- throw new NullPointerException(Messages.getString("security.83", "prime"));
+ throw new NullPointerException(Messages.getString("security.83", "prime"));
}
if (primeExponent == null) {
- throw new NullPointerException(Messages.getString("security.83", "primeExponent"));
+ throw new NullPointerException(Messages.getString("security.83", "primeExponent"));
}
if (crtCoefficient == null) {
- throw new NullPointerException(Messages.getString("security.83", "crtCoefficient"));
+ throw new NullPointerException(Messages.getString("security.83", "crtCoefficient"));
}
this.prime = prime;
this.primeExponent = primeExponent;
@@ -66,7 +66,7 @@
/**
* Returns the CRT coefficient.
- *
+ *
* @return the CRT coefficient.
*/
public final BigInteger getCrtCoefficient() {
@@ -75,7 +75,7 @@
/**
* Returns the prime factor.
- *
+ *
* @return the prime factor.
*/
public final BigInteger getPrime() {
@@ -84,7 +84,7 @@
/**
* Returns the exponent.
- *
+ *
* @return the exponent.
*/
public final BigInteger getExponent() {
diff --git a/luni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java b/luni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
index e786e9e..e4f26c0 100644
--- a/luni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
+++ b/luni/src/main/java/java/security/spec/RSAPrivateCrtKeySpec.java
@@ -27,7 +27,7 @@
* href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
* standard.
*/
-public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec {
+public class RSAPrivateCrtKeySpec extends RSAPrivateKeySpec {
// Public Exponent
private final BigInteger publicExponent;
// Prime P
@@ -45,7 +45,7 @@
* Creates a new {@code RSAMultiPrimePrivateCrtKeySpec} with the specified
* modulus, public exponent, private exponent, prime factors, prime
* exponents, crt coefficient, and additional primes.
- *
+ *
* @param modulus
* the modulus {@code n}.
* @param publicExponent
@@ -84,7 +84,7 @@
/**
* Returns the CRT coefficient, {@code q^-1 mod p}.
- *
+ *
* @return the CRT coefficient, {@code q^-1 mod p}.
*/
public BigInteger getCrtCoefficient() {
@@ -93,7 +93,7 @@
/**
* Returns the exponent of the prime {@code p}.
- *
+ *
* @return the exponent of the prime {@code p}.
*/
public BigInteger getPrimeExponentP() {
@@ -102,7 +102,7 @@
/**
* Returns the exponent of the prime {@code q}.
- *
+ *
* @return the exponent of the prime {@code q}.
*/
public BigInteger getPrimeExponentQ() {
@@ -111,7 +111,7 @@
/**
* Returns the prime factor {@code p}.
- *
+ *
* @return the prime factor {@code p}.
*/
public BigInteger getPrimeP() {
@@ -120,7 +120,7 @@
/**
* Returns the prime factor {@code q}.
- *
+ *
* @return the prime factor {@code q}.
*/
public BigInteger getPrimeQ() {
@@ -129,7 +129,7 @@
/**
* Returns the public exponent {@code e}.
- *
+ *
* @return the public exponent {@code e}.
*/
public BigInteger getPublicExponent() {
diff --git a/luni/src/main/java/java/security/spec/RSAPrivateKeySpec.java b/luni/src/main/java/java/security/spec/RSAPrivateKeySpec.java
index c94420e..b667048 100644
--- a/luni/src/main/java/java/security/spec/RSAPrivateKeySpec.java
+++ b/luni/src/main/java/java/security/spec/RSAPrivateKeySpec.java
@@ -26,7 +26,7 @@
* href="http://www.rsa.com/rsalabs/pubs/PKCS/html/pkcs-1.html">PKCS #1 v2.1</a>
* standard
*/
-public class RSAPrivateKeySpec implements KeySpec {
+public class RSAPrivateKeySpec implements KeySpec {
// Modulus
private final BigInteger modulus;
// Private Exponent
@@ -35,7 +35,7 @@
/**
* Creates a new {@code RSAPrivateKeySpec} with the specified modulus and
* private exponent.
- *
+ *
* @param modulus
* the modulus {@code n}.
* @param privateExponent
@@ -48,7 +48,7 @@
/**
* Returns the modulus {@code n}.
- *
+ *
* @return the modulus {@code n}.
*/
public BigInteger getModulus() {
@@ -57,7 +57,7 @@
/**
* Returns the private exponent {@code e}.
- *
+ *
* @return the private exponent {@code e}.
*/
public BigInteger getPrivateExponent() {
diff --git a/luni/src/main/java/java/security/spec/RSAPublicKeySpec.java b/luni/src/main/java/java/security/spec/RSAPublicKeySpec.java
index fe6de07..e24ca5c 100644
--- a/luni/src/main/java/java/security/spec/RSAPublicKeySpec.java
+++ b/luni/src/main/java/java/security/spec/RSAPublicKeySpec.java
@@ -35,7 +35,7 @@
/**
* Creates a new {@code RSAPublicKeySpec} with the specified modulus and
* public exponent.
- *
+ *
* @param modulus
* the modulus {@code n}.
* @param publicExponent
@@ -48,7 +48,7 @@
/**
* Returns the modulus {@code n}.
- *
+ *
* @return the modulus {@code n}.
*/
public BigInteger getModulus() {
@@ -57,7 +57,7 @@
/**
* Returns the public exponent {@code d}.
- *
+ *
* @return the public exponent {@code d}.
*/
public BigInteger getPublicExponent() {
diff --git a/luni/src/main/java/java/security/spec/X509EncodedKeySpec.java b/luni/src/main/java/java/security/spec/X509EncodedKeySpec.java
index fee1792..9b48e1e 100644
--- a/luni/src/main/java/java/security/spec/X509EncodedKeySpec.java
+++ b/luni/src/main/java/java/security/spec/X509EncodedKeySpec.java
@@ -25,7 +25,7 @@
/**
* Creates a new {@code X509EncodedKeySpec} with the specified encoded key
* bytes.
- *
+ *
* @param encodedKey
* the encoded key bytes.
*/
@@ -36,7 +36,7 @@
/**
* Returns the encoded key bytes.
- *
+ *
* @return the encoded key bytes.
*/
public byte[] getEncoded() {
@@ -47,10 +47,10 @@
/**
* Returns the name of the encoding format of this encoded key
* specification.
- *
+ *
* @return the string "X.509".
*/
public final String getFormat() {
- return "X.509";
+ return "X.509";
}
}
diff --git a/luni/src/main/java/java/sql/Array.java b/luni/src/main/java/java/sql/Array.java
index fc9debe..83a385f 100644
--- a/luni/src/main/java/java/sql/Array.java
+++ b/luni/src/main/java/java/sql/Array.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
/**
* Retrieves the contents of the SQL {@code ARRAY} value as a Java array
* object.
- *
+ *
* @return A Java array containing the elements of this Array
* @throws SQLException
* if there is a database error.
@@ -38,7 +38,7 @@
* Returns part of the SQL {@code ARRAY} associated with this array,
* starting at a particular {@code index} and comprising up to {@code count}
* successive elements of the SQL array.
- *
+ *
* @param index
* the start position in the array where the values are
* retrieved.
@@ -54,14 +54,14 @@
* Returns part of the SQL {@code ARRAY} associated with this array,
* starting at a particular {@code index} and comprising up to {@code count}
* successive elements of the SQL array.
- *
+ *
* @param index
* the start position in the array where the values are
* retrieved.
* @param count
* the number of elements to retrieve.
* @param map
- * the map defining the correspondence between SQL type names
+ * the map defining the correspondence between SQL type names
* and Java types.
* @return A Java array containing the desired set of elements from this Array
* @throws SQLException
@@ -72,9 +72,9 @@
/**
* Returns the data from the underlying SQL {@code ARRAY} as a Java array.
- *
+ *
* @param map
- * the map defining the correspondence between SQL type names
+ * the map defining the correspondence between SQL type names
* and Java types.
* @return A Java array containing the elements of this array
* @throws SQLException
@@ -83,9 +83,9 @@
public Object getArray(Map<String, Class<?>> map) throws SQLException;
/**
- * Returns the JDBC type of the entries in this array's underlying
+ * Returns the JDBC type of the entries in this array's underlying
* SQL array.
- *
+ *
* @return An integer constant from the {@code java.sql.Types} class
* @throws SQLException
* if there is a database error.
@@ -93,9 +93,9 @@
public int getBaseType() throws SQLException;
/**
- * Returns the SQL type name of the entries in this array's underlying
+ * Returns the SQL type name of the entries in this array's underlying
* SQL array.
- *
+ *
* @return The database specific name or a fully-qualified SQL type name.
* @throws SQLException
* if there is a database error.
@@ -105,7 +105,7 @@
/**
* Returns a ResultSet object which holds the entries of the SQL {@code
* ARRAY} associated with this array.
- *
+ *
* @return the elements of the array as a {@code ResultSet}.
* @throws SQLException
* if there is a database error.
@@ -114,9 +114,9 @@
/**
* Returns a {@code ResultSet} object that holds the entries of a subarray,
- * beginning at a particular index and comprising up to {@code count}
+ * beginning at a particular index and comprising up to {@code count}
* successive entries.
- *
+ *
* @param index
* the start position in the array where the values are
* retrieved.
@@ -130,16 +130,16 @@
/**
* Returns a {@code ResultSet} object that holds the entries of a subarray,
- * beginning at a particular index and comprising up to {@code count}
+ * beginning at a particular index and comprising up to {@code count}
* successive entries.
- *
+ *
* @param index
* the start position in the array where the values are
* retrieved.
* @param count
* the number of elements to retrieve.
* @param map
- * the map defining the correspondence between SQL type names
+ * the map defining the correspondence between SQL type names
* and Java types.
* @return the {@code ResultSet} the array's custom type values. if a
* database error has occurred.
@@ -152,9 +152,9 @@
/**
* Returns a {@code ResultSet} object which holds the entries of the SQL
* {@code ARRAY} associated with this array.
- *
+ *
* @param map
- * the map defining the correspondence between SQL type names
+ * the map defining the correspondence between SQL type names
* and Java types.
* @return the array as a {@code ResultSet}.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/BatchUpdateException.java b/luni/src/main/java/java/sql/BatchUpdateException.java
index 0a616db..b7b386d 100644
--- a/luni/src/main/java/java/sql/BatchUpdateException.java
+++ b/luni/src/main/java/java/sql/BatchUpdateException.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,7 +57,7 @@
* Creates a {@code BatchUpdateException} with the {@code updateCounts} set
* to the supplied value. All other fields are set to their
* default values.
- *
+ *
* @param updateCounts
* the array of {@code updateCounts} giving the number of
* successful updates (or another status code) for each command
@@ -72,7 +72,7 @@
* Creates a {@code BatchUpdateException} with the {@code updateCounts} and
* {@code reason} set to the supplied values. All other fields are set to their
* default values.
- *
+ *
* @param reason
* the message providing information about the source of this
* exception.
@@ -90,7 +90,7 @@
* Creates a {@code BatchUpdateException} with the {@code reason}, {@code
* SQLState} and {@code updateCounts} set to the supplied values. All other
* fields are set to their default values.
- *
+ *
* @param reason
* the message providing information about the source of this
* exception.
@@ -110,7 +110,7 @@
/**
* Creates a {@code BatchUpdateException} for the case where all relevant
* information is provided.
- *
+ *
* @param reason
* the message providing information about the source of this
* exception.
@@ -130,7 +130,7 @@
}
/**
- * Gets the <i>update count</i> array giving status information for every
+ * Gets the <i>update count</i> array giving status information for every
* command that was attempted in the batch.
* <p>
* If a batch update command fails and a {@code BatchUpdateException} is
@@ -140,16 +140,16 @@
* the batch, not only those that executed successfully. In this case, the
* array element for any command which encountered a problem is set to
* {@code Statement.EXECUTE_FAILED}.
- *
+ *
* @return an array that contains the successful update counts, before this
* exception was thrown. Alternatively, if the driver continues to
* process commands following an error, for each successive command
- * there is a corresponding element in the array giving one of the
+ * there is a corresponding element in the array giving one of the
* following status values:
* <ol>
* <li>the number of successful updates</li> <li>{@code
* Statement.SUCCESS_NO_INFO} indicating that the command completed
- * successfully, but the amount of altered rows is unknown.</li>
+ * successfully, but the amount of altered rows is unknown.</li>
* <li>{@code Statement.EXECUTE_FAILED} indicating that the command
* was unsuccessful.</li>
* </ol>
diff --git a/luni/src/main/java/java/sql/Blob.java b/luni/src/main/java/java/sql/Blob.java
index 0074b98..4102973a 100644
--- a/luni/src/main/java/java/sql/Blob.java
+++ b/luni/src/main/java/java/sql/Blob.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
/**
* Retrieves this {@code Blob} object as a binary stream.
- *
+ *
* @return a binary {@code InputStream} giving access to the {@code Blob}
* data.
* @throws SQLException
@@ -44,7 +44,7 @@
/**
* Gets a portion of the value of this {@code Blob} as an array of bytes.
- *
+ *
* @param pos
* the position of the first byte in the {@code Blob} to get,
* where the first byte in the {@code Blob} has position 1.
@@ -59,7 +59,7 @@
/**
* Gets the number of bytes in this {@code Blob} object.
- *
+ *
* @return a {@code long} value with the length of the {@code Blob} in
* bytes.
* @throws SQLException
@@ -70,7 +70,7 @@
/**
* Search for the position in this {@code Blob} at which a specified pattern
* begins, starting at a specified position within the {@code Blob}.
- *
+ *
* @param pattern
* a {@code Blob} containing the pattern of data to search for in
* this {@code Blob}.
@@ -88,7 +88,7 @@
/**
* Search for the position in this {@code Blob} at which the specified
* pattern begins, starting at a specified position within the {@code Blob}.
- *
+ *
* @param pattern
* a byte array containing the pattern of data to search for in
* this {@code Blob}.
@@ -105,7 +105,7 @@
/**
* Gets a stream that can be used to write binary data to this {@code Blob}.
- *
+ *
* @param pos
* the position within this {@code Blob} at which to start
* writing, where the first position in the {@code Blob} is
@@ -120,7 +120,7 @@
/**
* Writes a specified array of bytes to this {@code Blob} object, starting
* at a specified position. Returns the number of bytes written.
- *
+ *
* @param pos
* the position within this {@code Blob} at which to start
* writing, where the first position in the {@code Blob} is
@@ -137,7 +137,7 @@
/**
* Writes a portion of a specified byte array to this {@code Blob}. Returns
* the number of bytes written.
- *
+ *
* @param pos
* the position within this {@code Blob} at which to start
* writing, where the first position in the {@code Blob} is
@@ -160,7 +160,7 @@
/**
* Truncate the value of this {@code Blob} object to a specified length in
* bytes.
- *
+ *
* @param len
* the length of data in bytes after which this {@code Blob}
* is to be truncated.
diff --git a/luni/src/main/java/java/sql/CallableStatement.java b/luni/src/main/java/java/sql/CallableStatement.java
index be5463b..a7c3400 100644
--- a/luni/src/main/java/java/sql/CallableStatement.java
+++ b/luni/src/main/java/java/sql/CallableStatement.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@
/**
* Gets the value of a specified JDBC {@code ARRAY} parameter as a
* {@code java.sql.Array}.
- *
+ *
* @param parameterIndex
* the parameter index, where the first parameter has
* index 1.
@@ -72,7 +72,7 @@
/**
* Gets the value of a specified JDBC {@code ARRAY} parameter as a {@code
* java.sql.Array}.
- *
+ *
* @param parameterName
* the desired parameter's name.
* @return a {@code java.sql.Array} containing the parameter's value.
@@ -84,12 +84,12 @@
/**
* Returns a new {@link BigDecimal} representation of the JDBC {@code
* NUMERIC} parameter specified by the input index.
- *
+ *
* @param parameterIndex
* the parameter number index where the first parameter has index
* 1.
- * @return a {@code java.math.BigDecimal} representing the value of the
- * specified parameter. The value {@code null} is returned if
+ * @return a {@code java.math.BigDecimal} representing the value of the
+ * specified parameter. The value {@code null} is returned if
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -100,14 +100,14 @@
* Returns a new {@link BigDecimal} representation of the JDBC {@code
* NUMERIC} parameter specified by the input index. The number of digits
* after the decimal point is specified by {@code scale}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
* @param scale
* the number of digits after the decimal point to get.
- * @return a {@code java.math.BigDecimal} representing the value of the
- * specified parameter. The value {@code null} is returned if
+ * @return a {@code java.math.BigDecimal} representing the value of the
+ * specified parameter. The value {@code null} is returned if
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -121,11 +121,11 @@
/**
* Returns a new {@link BigDecimal} representation of the JDBC {@code
* NUMERIC} parameter specified by the input name.
- *
+ *
* @param parameterName
* the desired parameter's name.
- * @return a {@code java.math.BigDecimal} representing the value of the
- * specified parameter. The value {@code null} is returned if
+ * @return a {@code java.math.BigDecimal} representing the value of the
+ * specified parameter. The value {@code null} is returned if
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -135,12 +135,12 @@
/**
* Gets the value of a specified JDBC {@code BLOB} parameter as a {@code
* java.sql.Blob}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return a {@code java.sql.Blob} representing the value of the
- * specified parameter. The value {@code null} is returned if
+ * @return a {@code java.sql.Blob} representing the value of the
+ * specified parameter. The value {@code null} is returned if
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -150,11 +150,11 @@
/**
* Gets the value of a specified JDBC {@code BLOB} parameter as a {@code
* java.sql.Blob}.
- *
+ *
* @param parameterName
* the desired parameter's name.
- * @return a {@code java.sql.Blob} representing the value of the
- * specified parameter. The value {@code null} is returned if
+ * @return a {@code java.sql.Blob} representing the value of the
+ * specified parameter. The value {@code null} is returned if
* the parameter in question is an SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -163,7 +163,7 @@
/**
* Gets the value of a specified JDBC {@code BIT} parameter as a boolean.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -177,7 +177,7 @@
/**
* Gets the value of a specified JDBC {@code BIT} parameter as a {@code
* boolean}.
- *
+ *
* @param parameterName
* the desired parameter's name.
* @return a {@code boolean} representation of the value of the parameter.
@@ -190,11 +190,11 @@
/**
* Gets the value of a specified JDBC {@code TINYINT} parameter as a {@code
* byte}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return a {@code byte} representation of the value of the parameter.
+ * @return a {@code byte} representation of the value of the parameter.
* {@code 0} is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -204,7 +204,7 @@
/**
* Gets the value of a specified JDBC {@code TINYINT} parameter as a Java
* {@code byte}.
- *
+ *
* @param parameterName
* the desired parameter's name.
* @return a {@code byte} representation of the value of the parameter.
@@ -217,7 +217,7 @@
/**
* Returns a byte array representation of the indexed JDBC {@code BINARY} or
* {@code VARBINARY} parameter.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -231,7 +231,7 @@
/**
* Returns a byte array representation of the named JDBC {@code BINARY} or
* {@code VARBINARY} parameter.
- *
+ *
* @param parameterName
* the name of the parameter.
* @return an array of bytes giving the value of the parameter. {@code null}
@@ -244,12 +244,12 @@
/**
* Gets the value of a specified JDBC {@code CLOB} parameter as a {@code
* java.sql.Clob}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return a {@code java.sql.Clob} representing the value of the
- * parameter. {@code null} is returned if the value is SQL
+ * @return a {@code java.sql.Clob} representing the value of the
+ * parameter. {@code null} is returned if the value is SQL
* {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -260,7 +260,7 @@
/**
* Gets the value of a specified JDBC {@code CLOB} parameter as a {@code
* java.sql.Clob}.
- *
+ *
* @param parameterName
* the name of the parameter.
* @return a {@code java.sql.Clob} with the value of the parameter. {@code
@@ -274,11 +274,11 @@
/**
* Gets the value of the specified JDBC {@code DATE} parameter as a {@code
* java.sql.Date}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the {@code java.sql.Date} representing the parameter's value.
+ * @return the {@code java.sql.Date} representing the parameter's value.
* {@code null} is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -310,7 +310,7 @@
/**
* Gets the value of the specified JDBC {@code DATE} parameter as a {@code
* java.sql.Date}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @return the {@code java.sql.Date} giving the parameter's value. {@code null}
@@ -344,11 +344,11 @@
/**
* Gets the value of the specified JDBC {@code DOUBLE} parameter as a
* {@code double}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the parameter's value as a {@code double}. {@code 0.0}
+ * @return the parameter's value as a {@code double}. {@code 0.0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -358,10 +358,10 @@
/**
* Gets the value of the specified JDBC {@code DOUBLE} parameter as a
* {@code double}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
- * @return the parameter's value as a {@code double}. {@code 0.0}
+ * @return the parameter's value as a {@code double}. {@code 0.0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -371,11 +371,11 @@
/**
* Gets the value of the specified JDBC {@code FLOAT} parameter as a {@code
* float}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the parameter's value as a {@code float}. {@code 0.0}
+ * @return the parameter's value as a {@code float}. {@code 0.0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -385,10 +385,10 @@
/**
* Gets the value of the specified JDBC {@code FLOAT} parameter as a Java
* {@code float}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
- * @return the parameter's value as a {@code float}. {@code 0.0}
+ * @return the parameter's value as a {@code float}. {@code 0.0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -398,11 +398,11 @@
/**
* Gets the value of the specified JDBC {@code INTEGER} parameter as an
* {@code int}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the {@code int} giving the parameter's value. {@code 0}
+ * @return the {@code int} giving the parameter's value. {@code 0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -412,10 +412,10 @@
/**
* Gets the value of the specified JDBC {@code INTEGER} parameter as an
* {@code int}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
- * @return the {@code int} giving the parameter's value. {@code 0}
+ * @return the {@code int} giving the parameter's value. {@code 0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -425,11 +425,11 @@
/**
* Gets the value of the specified JDBC {@code BIGINT} parameter as a
* {@code long}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the {@code long} giving the parameter's value. {@code 0}
+ * @return the {@code long} giving the parameter's value. {@code 0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -439,10 +439,10 @@
/**
* Gets the value of the specified JDBC {@code BIGINT} parameter as a
* {@code long}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
- * @return the {@code long} giving the parameter's value. {@code 0}
+ * @return the {@code long} giving the parameter's value. {@code 0}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -469,12 +469,12 @@
/**
* Gets the value of the specified parameter as an {@code Object}. The
* {@code Map} gives the correspondence between SQL types and Java classes.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
* @param map
- * the {@code Map} giving the correspondence between SQL
+ * the {@code Map} giving the correspondence between SQL
* types and Java classes.
* @return an Object holding the value of the parameter.
* @throws SQLException
@@ -487,9 +487,9 @@
* Gets the value of the specified parameter as an {@code Object}.
* <p>
* The object type returned is the JDBC type that was registered for
- * the parameter by an earlier call to {@link #registerOutParameter}.
- * If a parameter was registered as a {@code java.sql.Types.OTHER}
- * then it may hold abstract types that are particular to the
+ * the parameter by an earlier call to {@link #registerOutParameter}.
+ * If a parameter was registered as a {@code java.sql.Types.OTHER}
+ * then it may hold abstract types that are particular to the
* connected database.
*
* @param parameterName
@@ -502,10 +502,10 @@
public Object getObject(String parameterName) throws SQLException;
/**
- * Gets the value of a specified parameter as an {@code Object}. The
+ * Gets the value of a specified parameter as an {@code Object}. The
* actual return type is determined by the {@code Map} parameter which
* gives the correspondence between SQL types and Java classes.
- *
+ *
* @param parameterName
* the parameter name.
* @param map
@@ -520,11 +520,11 @@
/**
* Gets the value of a specified SQL {@code REF(<structured type>)}
* parameter as a {@code java.sql.Ref}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return a {@code java.sql.Ref} with the parameter value. {@code null}
+ * @return a {@code java.sql.Ref} with the parameter value. {@code null}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -534,7 +534,7 @@
/**
* Gets the value of a specified SQL {@code REF(<structured type>)}
* parameter as a {@code java.sql.Ref}.
- *
+ *
* @param parameterName
* the desired parameter's name.
* @return the parameter's value in the form of a {@code
@@ -549,11 +549,11 @@
/**
* Gets the value of a specified JDBC {@code SMALLINT} parameter as a
* {@code short}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the parameter's value as a {@code short}. 0 is returned
+ * @return the parameter's value as a {@code short}. 0 is returned
* if the parameter's value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -563,10 +563,10 @@
/**
* Gets the value of a specified JDBC {@code SMALLINT} parameter as a
* {@code short}.
- *
+ *
* @param parameterName
* the desired parameter's name.
- * @return the parameter's value as a {@code short}. 0 is returned
+ * @return the parameter's value as a {@code short}. 0 is returned
* if the parameter's value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -574,18 +574,18 @@
public short getShort(String parameterName) throws SQLException;
/**
- * Returns the indexed parameter's value as a {@code String}. The
- * parameter value must be one of the JDBC types {@code CHAR},
+ * Returns the indexed parameter's value as a {@code String}. The
+ * parameter value must be one of the JDBC types {@code CHAR},
* {@code VARCHAR} or {@code LONGVARCHAR}.
* <p>
- * The {@code String} corresponding to a {@code CHAR} of fixed length
- * will be of identical length to the value in the database inclusive
+ * The {@code String} corresponding to a {@code CHAR} of fixed length
+ * will be of identical length to the value in the database inclusive
* of padding characters.
*
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the parameter's value as a {@code String}. {@code null}
+ * @return the parameter's value as a {@code String}. {@code null}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -603,7 +603,7 @@
*
* @param parameterName
* the desired parameter's name.
- * @return the parameter's value as a {@code String}. {@code null}
+ * @return the parameter's value as a {@code String}. {@code null}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -613,11 +613,11 @@
/**
* Gets the value of a specified JDBC {@code TIME} parameter as a {@code
* java.sql.Time}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return the parameter's value as a {@code java.sql.Time}.
+ * @return the parameter's value as a {@code java.sql.Time}.
* {@code null} is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -627,16 +627,16 @@
/**
* Gets the value of a specified JDBC {@code TIME} parameter as a {@code
- * java.sql.Time}, using the supplied {@code Calendar} to construct the
- * time. The JDBC driver uses the calendar to handle specific timezones
+ * java.sql.Time}, using the supplied {@code Calendar} to construct the
+ * time. The JDBC driver uses the calendar to handle specific timezones
* and locales in order to determine {@code Time}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
* @param cal
* the calendar to use in constructing {@code Time}.
- * @return the parameter's value as a {@code java.sql.Time}.
+ * @return the parameter's value as a {@code java.sql.Time}.
* {@code null} is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -648,7 +648,7 @@
/**
* Gets the value of a specified JDBC {@code TIME} parameter as a {@code
* java.sql.Time}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @return a new {@code java.sql.Time} with the parameter's value. A {@code
@@ -661,10 +661,10 @@
/**
* Gets the value of a specified JDBC {@code TIME} parameter as a {@code
- * java.sql.Time}, using the supplied {@code Calendar} to construct
- * the time. The JDBC driver uses the calendar to handle specific
+ * java.sql.Time}, using the supplied {@code Calendar} to construct
+ * the time. The JDBC driver uses the calendar to handle specific
* timezones and locales when creating {@code Time}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @param cal
@@ -681,7 +681,7 @@
/**
* Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
* java.sql.Timestamp}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1
@@ -698,7 +698,7 @@
* Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
* java.sql.Timestamp}. The JDBC driver uses the supplied {@code Calendar}
* to handle specific timezones and locales when creating the result.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1
@@ -717,7 +717,7 @@
/**
* Returns the named parameter's {@code TIMESTAMP} value as a {@code
* java.sql.Timestamp}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @return the parameter's value as a {@code java.sql.Timestamp}. A
@@ -733,7 +733,7 @@
* Returns the indexed parameter's {@code TIMESTAMP} value as a {@code
* java.sql.Timestamp}. The JDBC driver uses the supplied {@code Calendar}
* to handle specific timezones and locales when creating the result.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @param cal
@@ -751,11 +751,11 @@
/**
* Gets the value of a specified JDBC {@code DATALINK} parameter as a
* {@code java.net.URL}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
- * @return a {@code URL} giving the parameter's value. {@code null}
+ * @return a {@code URL} giving the parameter's value. {@code null}
* is returned if the value is SQL {@code NULL}.
* @throws SQLException
* if a database error occurs.
@@ -766,7 +766,7 @@
/**
* Returns the named parameter's JDBC {@code DATALINK} value in a new Java
* {@code java.net.URL}.
- *
+ *
* @param parameterName
* the name of the desired parameter.
* @return a new {@code java.net.URL} encapsulating the parameter value. A
@@ -783,9 +783,9 @@
* parameters must have their type defined before a stored procedure is
* executed.
* <p>
- * The type supplied in the {@code sqlType} parameter fixes the
- * type that will be returned by the getter methods of
- * {@code CallableStatement}.
+ * The type supplied in the {@code sqlType} parameter fixes the
+ * type that will be returned by the getter methods of
+ * {@code CallableStatement}.
* If a database specific type is expected for a parameter, the Type {@code
* java.sql.Types.OTHER} should be used. Note that there is another variant
* of this method for User Defined Types or a {@code REF} type.
@@ -812,9 +812,9 @@
* and {@code DECIMAL}, where there is a need to specify the number of
* digits expected after the decimal point.
* <p>
- * The type supplied in the {@code sqlType} parameter fixes the
- * type that will be returned by the getter methods of
- * {@code CallableStatement}.
+ * The type supplied in the {@code sqlType} parameter fixes the
+ * type that will be returned by the getter methods of
+ * {@code CallableStatement}.
*
* @param parameterIndex
* the parameter number index, where the first parameter has
@@ -832,11 +832,11 @@
throws SQLException;
/**
- * Defines the Type of a specified {@code OUT} parameter. This variant
- * of the method is designed for use with parameters that are
- * <i>User Defined Types</i> (UDT) or a {@code REF} type, although it
+ * Defines the Type of a specified {@code OUT} parameter. This variant
+ * of the method is designed for use with parameters that are
+ * <i>User Defined Types</i> (UDT) or a {@code REF} type, although it
* can be used for any type.
- *
+ *
* @param paramIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -856,9 +856,9 @@
* Defines the Type of a specified {@code OUT} parameter. All OUT parameters
* must have their Type defined before a stored procedure is executed.
* <p>
- * The type supplied in the {@code sqlType} parameter fixes the
- * type that will be returned by the getter methods of
- * {@code CallableStatement}.
+ * The type supplied in the {@code sqlType} parameter fixes the
+ * type that will be returned by the getter methods of
+ * {@code CallableStatement}.
* If a database-specific type is expected for a parameter, the Type {@code
* java.sql.Types.OTHER} should be used. Note that there is another variant
* of this method for User Defined Types or a {@code REF} type.
@@ -884,9 +884,9 @@
* and {@code DECIMAL}, where there is a need to specify the number of
* digits expected after the decimal point.
* <p>
- * The type supplied in the {@code sqlType} parameter fixes the
- * type that will be returned by the getter methods of
- * {@code CallableStatement}.
+ * The type supplied in the {@code sqlType} parameter fixes the
+ * type that will be returned by the getter methods of
+ * {@code CallableStatement}.
*
* @param parameterName
* the parameter name.
@@ -906,7 +906,7 @@
* the method is designed for use with parameters that are <i>User Defined
* Types</i> (UDT) or a {@code REF} type, although it can be used for any
* type.
- *
+ *
* @param parameterName
* the parameter name
* @param sqlType
@@ -947,7 +947,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.math.BigDecimal} value.
- *
+ *
* @param parameterName
* the name of the parameter.
* @param theBigDecimal
@@ -982,7 +982,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code boolean}
* value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theBoolean
@@ -995,7 +995,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code byte} value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theByte
@@ -1009,7 +1009,7 @@
* Sets the value of a specified parameter to a supplied array of bytes. The
* array is mapped to {@code VARBINARY} or else {@code LONGVARBINARY} in the
* connected database.
- *
+ *
* @param parameterName
* the parameter name.
* @param theBytes
@@ -1023,7 +1023,7 @@
/**
* Sets the value of a specified parameter to the character content of a
* {@code Reader} object, with the specified length of character data.
- *
+ *
* @param parameterName
* the parameter name.
* @param reader
@@ -1039,7 +1039,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.sql.Date} value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theDate
@@ -1056,7 +1056,7 @@
* the SQL {@code DATE} in the database. In case that no calendar is
* supplied, the driver uses the default timezone of the Java virtual
* machine.
- *
+ *
* @param parameterName
* the parameter name.
* @param theDate
@@ -1075,7 +1075,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code double}
* value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theDouble
@@ -1089,7 +1089,7 @@
/**
* Sets the value of a specified parameter to to a supplied {@code float}
* value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theFloat
@@ -1102,7 +1102,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code int} value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theInt
@@ -1114,7 +1114,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code long} value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theLong
@@ -1128,7 +1128,7 @@
* Sets the value of a specified parameter to SQL {@code NULL}. Don't use
* this version of {@code setNull} for <i>User Defined Types</i> (UDT) or
* for {@code REF} type parameters.
- *
+ *
* @param parameterName
* the parameter name.
* @param sqlType
@@ -1173,7 +1173,7 @@
* If the object's class implements the interface {@code SQLData}, the JDBC
* driver calls {@code SQLData.writeSQL} to write it to the SQL data stream.
* If {@code theObject} implements any of the following interfaces then the
- * driver is in charge of mapping the value to the appropriate SQL type.
+ * driver is in charge of mapping the value to the appropriate SQL type.
* <ul><li>{@link Ref}</li>
* <li>{@link Struct}</li>
* <li>{@link Array}</li>
@@ -1198,8 +1198,8 @@
* targetSqlType} before it is sent to the database. If the object has a
* custom mapping (its class implements the interface {@code SQLData}), the
* JDBC driver calls the method {@code SQLData.writeSQL} to write it to the
- * SQL data stream. If {@code theObject} is an instance of one of the
- * following types
+ * SQL data stream. If {@code theObject} is an instance of one of the
+ * following types
* <ul>
* <li>{@link Ref}</li>
* <li>{@link Struct}</li>
@@ -1207,7 +1207,7 @@
* <li>{@link Clob}</li>
* <li>{@link Blob}</li>
* </ul>
- * then the driver is in charge of mapping the value to the appropriate
+ * then the driver is in charge of mapping the value to the appropriate
* SQL type and deliver it to the database.
*
* @param parameterName
@@ -1238,7 +1238,7 @@
* <li>{@link Clob}</li>
* <li>{@link Blob}</li>
* </ul>
- * then the driver is charge of mapping the value to the appropriate
+ * then the driver is charge of mapping the value to the appropriate
* SQL type.
*
* @param parameterName
@@ -1260,7 +1260,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code short}
* value.
- *
+ *
* @param parameterName
* the name of the parameter.
* @param theShort
@@ -1273,7 +1273,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code String}.
- *
+ *
* @param parameterName
* the name of the parameter.
* @param theString
@@ -1287,7 +1287,7 @@
/**
* Sets the value of the parameter named {@code parameterName} to the value
* of the supplied {@code java.sql.Time}.
- *
+ *
* @param parameterName
* the parameter name.
* @param theTime
@@ -1302,11 +1302,11 @@
* Sets the value of the parameter named {@code parameterName} to the value
* of the supplied {@code java.sql.Time} using the supplied calendar.
* <p>
- * The driver uses the supplied {@code Calendar} to create the SQL
- * {@code TIME} value, which allows it to use a custom timezone -
- * otherwise the driver uses the default timezone of the Java
+ * The driver uses the supplied {@code Calendar} to create the SQL
+ * {@code TIME} value, which allows it to use a custom timezone -
+ * otherwise the driver uses the default timezone of the Java
* virtual machine.
- *
+ *
* @param parameterName
* the parameter name.
* @param theTime
@@ -1323,7 +1323,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.sql.Timestamp} value.
- *
+ *
* @param parameterName
* the parameter name.
* @param theTimestamp
@@ -1360,7 +1360,7 @@
/**
* Sets the value of a specified parameter to the supplied {@code
* java.net.URL}.
- *
+ *
* @param parameterName
* the parameter name.
* @param theURL
@@ -1374,7 +1374,7 @@
/**
* Gets whether the value of the last {@code OUT} parameter read was SQL
* {@code NULL}.
- *
+ *
* @return true if the last parameter was SQL {@code NULL}, {@code false}
* otherwise.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/Clob.java b/luni/src/main/java/java/sql/Clob.java
index 73fe7fb..cd819e0 100644
--- a/luni/src/main/java/java/sql/Clob.java
+++ b/luni/src/main/java/java/sql/Clob.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,8 +36,8 @@
/**
* Gets the value of this {@code Clob} object as an ASCII stream.
- *
- * @return an ASCII {@code InputStream} giving access to the
+ *
+ * @return an ASCII {@code InputStream} giving access to the
* {@code Clob} data.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
@@ -46,7 +46,7 @@
/**
* Gets the data of this {@code Clob} object in a {@code java.io.Reader}.
- *
+ *
* @return a character stream Reader object giving access to the {@code
* Clob} data.
* @throws SQLException
@@ -56,7 +56,7 @@
/**
* Gets a copy of a specified substring in this {@code Clob}.
- *
+ *
* @param pos
* the index of the start of the substring in the {@code Clob}.
* @param length
@@ -69,7 +69,7 @@
/**
* Retrieves the number of characters in this {@code Clob} object.
- *
+ *
* @return a long value with the number of character in this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
@@ -79,7 +79,7 @@
/**
* Retrieves the character position at which a specified {@code Clob} object
* appears in this {@code Clob} object.
- *
+ *
* @param searchstr
* the specified {@code Clob} to search for.
* @param start
@@ -94,7 +94,7 @@
/**
* Retrieves the character position at which a specified substring appears
* in this {@code Clob} object.
- *
+ *
* @param searchstr
* the string to search for.
* @param start
@@ -110,7 +110,7 @@
/**
* Retrieves a stream which can be used to write Ascii characters to this
* {@code Clob} object, starting at specified position.
- *
+ *
* @param pos
* the position at which to start the writing.
* @return an OutputStream which can be used to write ASCII characters to
@@ -123,7 +123,7 @@
/**
* Retrieves a stream which can be used to write a stream of unicode
* characters to this {@code Clob} object, at a specified position.
- *
+ *
* @param pos
* the position at which to start the writing.
* @return a Writer which can be used to write unicode characters to this
@@ -136,7 +136,7 @@
/**
* Writes a given Java String to this {@code Clob} object at a specified
* position.
- *
+ *
* @param pos
* the position at which to start the writing.
* @param str
@@ -150,7 +150,7 @@
/**
* Writes {@code len} characters of a string, starting at a specified
* character offset, to this {@code Clob}.
- *
+ *
* @param pos
* the position at which to start the writing.
* @param str
@@ -168,9 +168,9 @@
/**
* Truncates this {@code Clob} after the specified number of characters.
- *
+ *
* @param len
- * the length in characters giving the place to
+ * the length in characters giving the place to
* truncate this {@code Clob}.
* @throws SQLException
* if an error occurs accessing the {@code Clob}.
diff --git a/luni/src/main/java/java/sql/Connection.java b/luni/src/main/java/java/sql/Connection.java
index 0704cca..fb95de5 100644
--- a/luni/src/main/java/java/sql/Connection.java
+++ b/luni/src/main/java/java/sql/Connection.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -85,7 +85,7 @@
* Discards all warnings that may have arisen for this connection.
* Subsequent calls to {@link #getWarnings()} will return {@code null}
* up until a new warning condition occurs.
- *
+ *
* @throws SQLException
* if there is a problem accessing the database.
*/
@@ -113,7 +113,7 @@
* {@code rollback} of the associated transaction. All locks in the database
* held by this connection are also relinquished. Calling this operation on
* connection objects in {@code auto-commit} mode leads to an error.
- *
+ *
* @throws SQLException
* if there is a problem accessing the database or if the target
* connection instance is in auto-commit mode.
@@ -127,7 +127,7 @@
* {@code ResultSets} generated by the returned statement will default to
* type {@code ResultSet.TYPE_FORWARD_ONLY} and concurrency level {@code
* ResultSet.CONCUR_READ_ONLY}.
- *
+ *
* @return a {@code Statement} object with default settings.
* @throws SQLException
* if there is a problem accessing the database.
@@ -139,7 +139,7 @@
* Returns a new instance of {@code Statement} whose associated {@code
* ResultSet}s have the characteristics specified in the type and
* concurrency arguments.
- *
+ *
* @param resultSetType
* one of the following type specifiers:
* <ul>
@@ -166,7 +166,7 @@
* Returns a new instance of {@code Statement} whose associated
* {@code ResultSet}s will have the characteristics specified in the
* type, concurrency and holdability arguments.
- *
+ *
* @param resultSetType
* one of the following type specifiers:
* <ul>
@@ -201,7 +201,7 @@
/**
* Returns a {@code boolean} indicating whether or not this connection is in
* the {@code auto-commit} operating mode.
- *
+ *
* @return {@code true} if {@code auto-commit} is on, otherwise {@code
* false}.
* @throws SQLException
@@ -211,7 +211,7 @@
/**
* Gets this {@code Connection} object's current catalog name.
- *
+ *
* @return the catalog name. {@code null} if there is no catalog
* name.
* @throws SQLException
@@ -222,7 +222,7 @@
/**
* Returns the holdability property that any {@code ResultSet} produced by
* this instance will have.
- *
+ *
* @return one of the following holdability mode specifiers:
* <ul>
* <li>{@link ResultSet#HOLD_CURSORS_OVER_COMMIT}</li> <li>
@@ -237,7 +237,7 @@
* Gets the metadata about the database referenced by this connection. The
* returned {@code DatabaseMetaData} describes the database topography,
* available stored procedures, SQL syntax and so on.
- *
+ *
* @return a {@code DatabaseMetaData} object containing the database
* description.
* @throws SQLException
@@ -247,7 +247,7 @@
/**
* Returns the transaction isolation level for this connection.
- *
+ *
* @return the transaction isolation value.
* @throws SQLException
* if there is a problem accessing the database.
@@ -262,7 +262,7 @@
/**
* Returns the type mapping associated with this {@code Connection} object.
* The type mapping must be set on the application level.
- *
+ *
* @return the Type Map as a {@code java.util.Map}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -293,7 +293,7 @@
* a consequence of a successful invocation of the {@link #close()} method
* or else if an error has occurred that prevents the connection from
* functioning normally.
- *
+ *
* @return {@code true} if closed, otherwise {@code false}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -303,7 +303,7 @@
/**
* Returns a {@code boolean} indicating whether or not this connection is
* currently in the {@code read-only} state.
- *
+ *
* @return {@code true} if in read-only state, otherwise {@code false}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -314,7 +314,7 @@
* Returns a string representation of the input SQL statement
* {@code sql} expressed in the underlying system's native SQL
* syntax.
- *
+ *
* @param sql
* the JDBC form of an SQL statement.
* @return the SQL statement in native database format.
@@ -326,7 +326,7 @@
/**
* Returns a new instance of {@code CallableStatement} that may be used for
* making stored procedure calls to the database.
- *
+ *
* @param sql
* the SQL statement that calls the stored function
* @return a new instance of {@code CallableStatement} representing the SQL
@@ -344,7 +344,7 @@
* making stored procedure calls to the database. {@code ResultSet}s emitted
* from this {@code CallableStatement} will satisfy the specified {@code
* resultSetType} and {@code resultSetConcurrency} values.
- *
+ *
* @param sql
* the SQL statement
* @param resultSetType
@@ -375,7 +375,7 @@
* making stored procedure calls to the database. {@code ResultSet}s created
* from this {@code CallableStatement} will have characteristics determined
* by the specified type, concurrency and holdability arguments.
- *
+ *
* @param sql
* the SQL statement
* @param resultSetType
@@ -422,7 +422,7 @@
* By default, {@code ResultSet}s from the returned object will be
* {@link ResultSet#TYPE_FORWARD_ONLY} type with a
* {@link ResultSet#CONCUR_READ_ONLY} mode of concurrency.
- *
+ *
* @param sql
* the SQL statement.
* @return the {@code PreparedStatement} containing the supplied SQL
@@ -504,7 +504,7 @@
* Creates a {@code PreparedStatement} that generates {@code ResultSet}s
* with the specified values of {@code resultSetType} and {@code
* resultSetConcurrency}.
- *
+ *
* @param sql
* the SQL statement. It can contain one or more {@code '?'}
* {@code IN} parameter placeholders.
@@ -534,7 +534,7 @@
/**
* Creates a {@code PreparedStatement} that generates {@code ResultSet}s
* with the specified type, concurrency and holdability
- *
+ *
* @param sql
* the SQL statement. It can contain one or more {@code '?' IN}
* parameter placeholders.
@@ -604,7 +604,7 @@
* Releases the specified {@code savepoint} from the present transaction. Once removed,
* the {@code Savepoint} is considered invalid and should not be referenced
* further.
- *
+ *
* @param savepoint
* the object targeted for removal.
* @throws SQLException
@@ -618,7 +618,7 @@
* Rolls back all updates made so far in this transaction and
* relinquishes all acquired database locks. It is an error to invoke this
* operation when in auto-commit mode.
- *
+ *
* @throws SQLException
* if there is a problem with the database or if the method is
* called while in auto-commit mode of operation.
@@ -628,7 +628,7 @@
/**
* Undoes all changes made after the supplied {@code Savepoint} object was
* set. This method should only be used when auto-commit mode is disabled.
- *
+ *
* @param savepoint
* the Savepoint to roll back to
* @throws SQLException
@@ -669,7 +669,7 @@
* Sets the catalog name for this connection. This is used to select a
* subspace of the database for future work. If the driver does not support
* catalog names, this method is ignored.
- *
+ *
* @param catalog
* the catalog name to use.
* @throws SQLException
@@ -679,7 +679,7 @@
/**
* Sets the holdability of the {@code ResultSet}s created by this Connection.
- *
+ *
* @param holdability
* one of the following holdability mode specifiers:
* <ul>
@@ -708,7 +708,7 @@
/**
* Creates an unnamed {@code Savepoint} in the current transaction.
- *
+ *
* @return a {@code Savepoint} object for this savepoint.
* @throws SQLException
* if there is a problem accessing the database.
@@ -717,7 +717,7 @@
/**
* Creates a named {@code Savepoint} in the current transaction.
- *
+ *
* @param name
* the name to use for the new {@code Savepoint}.
* @return a {@code Savepoint} object for this savepoint.
@@ -750,7 +750,7 @@
/**
* Sets the {@code TypeMap} for this connection. The input {@code map}
* should contain mappings between complex Java and SQL types.
- *
+ *
* @param map
* the new type map.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/DataTruncation.java b/luni/src/main/java/java/sql/DataTruncation.java
index af86e5d..da0252b 100644
--- a/luni/src/main/java/java/sql/DataTruncation.java
+++ b/luni/src/main/java/java/sql/DataTruncation.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,9 +39,9 @@
private int transferSize = 0;
- private static final String THE_REASON = "Data truncation";
+ private static final String THE_REASON = "Data truncation";
- private static final String THE_SQLSTATE = "01004";
+ private static final String THE_SQLSTATE = "01004";
private static final int THE_ERROR_CODE = 0;
@@ -50,7 +50,7 @@
* "Data truncation"}, the {@code ErrorCode} is set to the {@code
* SQLException} default value, and the other fields are set to the values
* supplied as arguments.
- *
+ *
* @param index
* the Index value of the column value or parameter that was
* truncated.
@@ -77,7 +77,7 @@
/**
* Gets the number of bytes of data that should have been read/written.
- *
+ *
* @return the number of bytes that should have been read or written. The
* value is set to {@code -1} if the size is unknown.
*/
@@ -87,7 +87,7 @@
/**
* Gets the index of the column or of the parameter that was truncated.
- *
+ *
* @return the index number of the column or of the parameter.
*/
public int getIndex() {
@@ -96,7 +96,7 @@
/**
* Gets whether the value truncated was a parameter value or a column value.
- *
+ *
* @return {@code true} if the value truncated was a parameter value,
* {@code false} if it was a column value.
*/
@@ -107,7 +107,7 @@
/**
* Gets whether the value was truncated on a read operation or a write
* operation
- *
+ *
* @return {@code true} if the value was truncated on a read operation,
* {@code false} otherwise.
*/
@@ -117,7 +117,7 @@
/**
* Gets the number of bytes of data that was actually read or written.
- *
+ *
* @return the number of bytes actually read/written. The value may be set
* to {@code -1} if the size is unknown.
*/
diff --git a/luni/src/main/java/java/sql/DatabaseMetaData.java b/luni/src/main/java/java/sql/DatabaseMetaData.java
index aca03c0..0dcd23f 100644
--- a/luni/src/main/java/java/sql/DatabaseMetaData.java
+++ b/luni/src/main/java/java/sql/DatabaseMetaData.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -298,7 +298,7 @@
/**
* Returns whether all procedures returned by {@link #getProcedures} can be
* called by the current user.
- *
+ *
* @return {@code true} if all procedures can be called by the current user,
* {@code false} otherwise.
* @throws SQLException
@@ -309,7 +309,7 @@
/**
* Returns whether all the tables returned by {@code getTables} can be used
* by the current user in a {@code SELECT} statement.
- *
+ *
* @return {@code true} if all the tables can be used,{@code false}
* otherwise.
* @throws SQLException
@@ -320,7 +320,7 @@
/**
* Returns whether a data definition statement in a transaction forces a {@code
* commit} of the transaction.
- *
+ *
* @return {@code true} if the statement forces a commit, {@code false}
* otherwise.
* @throws SQLException
@@ -331,7 +331,7 @@
/**
* Returns whether the database ignores data definition statements within a
* transaction.
- *
+ *
* @return {@code true} if the database ignores a data definition statement,
* {@code false} otherwise.
* @throws SQLException
@@ -342,7 +342,7 @@
/**
* Returns whether a visible row delete can be detected by calling
* {@link ResultSet#rowDeleted}.
- *
+ *
* @param type
* the type of the {@code ResultSet} involved: {@code
* ResultSet.TYPE_FORWARD_ONLY}, {@code
@@ -358,7 +358,7 @@
/**
* Returns whether the return value of {@code getMaxRowSize} includes the
* SQL data types {@code LONGVARCHAR} and {@code LONGVARBINARY}.
- *
+ *
* @return {@code true} if the return value includes {@code LONGVARBINARY}
* and {@code LONGVARCHAR}, otherwise {@code false}.
* @throws SQLException
@@ -367,12 +367,12 @@
public boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
/**
- * Returns a {@code ResultSet} describing a subset of the attributes of a
+ * Returns a {@code ResultSet} describing a subset of the attributes of a
* specified SQL User Defined Type (UDT) for a specified schema and catalog.
- * The subset is determined by restricting to those attributes whose
- * name matches the {@code attributeNamePattern} and whose type name
+ * The subset is determined by restricting to those attributes whose
+ * name matches the {@code attributeNamePattern} and whose type name
* matches the {@code typeNamePattern}. Each row of the {@code ResultSet}
- * describes one attribute, and the rows are ordered by the columns {@code TYPE_SCHEM},
+ * describes one attribute, and the rows are ordered by the columns {@code TYPE_SCHEM},
* {@code TYPE_NAME} and {@code ORDINAL_POSITION}. Inherited attributes
* are not included.
* <p>
@@ -417,14 +417,14 @@
* the count starts from 1, not 0)</li>
* <li>IS_NULLABLE - String - {@code "NO"} = the column does not allow {@code
* NULL}s, {@code "YES"} = the column allows {@code NULL}s, "" = status unknown</li>
- * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the catalog of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the catalog of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
- * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the schema of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the schema of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
- * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the name of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the name of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
* <li>{@code SOURCE_DATA_TYPE} - String - The source type for a user
* generated REF type or for a Distinct type. ({@code NULL} if {@code
@@ -464,7 +464,7 @@
* <ol>
* <li>{@code SCOPE} - short - the {@code SCOPE} of the result, as follows:
* <ul>
- * <li>{@code DatabaseMetaData.bestRowTemporary} - the result is very temporary,
+ * <li>{@code DatabaseMetaData.bestRowTemporary} - the result is very temporary,
* only valid while on the current row</li>
* <li>{@code DatabaseMetaData.bestRowTransaction} - the result is good for remainder of
* current transaction</li>
@@ -520,7 +520,7 @@
/**
* Returns the set of catalog names available in this database. The set is
* returned ordered by catalog name.
- *
+ *
* @return a {@code ResultSet} containing the catalog names, with each row
* containing one catalog name (as a {@code String}) in the
* single column named {@code TABLE_CAT}.
@@ -532,7 +532,7 @@
/**
* Returns the separator that this database uses between a catalog name and
* table name.
- *
+ *
* @return a String containing the separator.
* @throws SQLException
* if there is a database error.
@@ -541,7 +541,7 @@
/**
* Returns the term that the database vendor prefers term for "catalog".
- *
+ *
* @return a String with the vendor's term for "catalog".
* @throws SQLException
* if there is a database error.
@@ -606,7 +606,7 @@
* <li>{@code COLUMN_NAME} - String - the column name</li>
* <li>{@code DATA_TYPE} - int - the SQL type as specified in {@code
* java.sql.Types}</li>
- * <li>{@code TYPE_NAME} - String - the name of the data type, (database-dependent,
+ * <li>{@code TYPE_NAME} - String - the name of the data type, (database-dependent,
* UDT names are fully qualified)</li>
* <li>{@code COLUMN_SIZE} - int - the column size (the precision for numeric
* types, max characters for {@code char} and {@code date} types)</li>
@@ -632,14 +632,14 @@
* <li>{@code IS_NULLABLE} - String - {@code "NO"} = column does not allow
* NULLs, {@code "YES"} = column allows NULLs, "" = {@code NULL} status
* unknown</li>
- * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the catalog of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_CATALOG} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the catalog of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
- * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the schema of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_SCHEMA} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the schema of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
- * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
- * this gives the name of the table corresponding to the attribute's scope.
+ * <li>{@code SCOPE_TABLE} - String - if the {@code DATA_TYPE} is {@code REF},
+ * this gives the name of the table corresponding to the attribute's scope.
* NULL if the {@code DATA_TYPE} is not REF.</li>
* <li>{@code SOURCE_DATA_TYPE} - String - The source type for a user
* generated REF type or for a Distinct type. ({@code NULL} if {@code
@@ -673,7 +673,7 @@
/**
* Returns the database connection that created this metadata.
- *
+ *
* @return the connection to the database.
* @throws SQLException
* if there is a database error.
@@ -783,7 +783,7 @@
/**
* Returns the major version number of the database software.
- *
+ *
* @return the major version number of the database software.
* @throws SQLException
* a database error occurred.
@@ -792,7 +792,7 @@
/**
* Returns the minor version number of the database software.
- *
+ *
* @return the minor version number of the database software.
* @throws SQLException
* a database error occurred.
@@ -801,7 +801,7 @@
/**
* Returns the name of the database software.
- *
+ *
* @return a {@code String} with the name of the database software.
* @throws SQLException
* a database error occurred.
@@ -810,7 +810,7 @@
/**
* Returns the version number of this database software.
- *
+ *
* @return a {@code String} with the version number of the database
* software.
* @throws SQLException
@@ -820,7 +820,7 @@
/**
* Returns the default transaction isolation level for this database.
- *
+ *
* @return the default transaction isolation level. One of the following values:
* <ul>
* <li>{@code TRANSACTION_NONE}</li>
@@ -836,21 +836,21 @@
/**
* Returns the JDBC driver's major version number.
- *
+ *
* @return the driver's major version number.
*/
public int getDriverMajorVersion();
/**
* Returns the JDBC driver's minor version number.
- *
+ *
* @return the driver's minor version number.
*/
public int getDriverMinorVersion();
/**
* Returns the name of this JDBC driver.
- *
+ *
* @return a {@code String} containing the name of the JDBC driver
* @throws SQLException
* a database error occurred.
@@ -859,7 +859,7 @@
/**
* Returns the version number of this JDBC driver.
- *
+ *
* @return a {@code String} containing the complete version number of the
* JDBC driver.
* @throws SQLException
@@ -894,7 +894,7 @@
* <li>{@code UPDATE_RULE} - short - a value giving the rule for how to treat the foreign key when the corresponding primary
* key is updated:
* <ul>
- * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
+ * <li>{@code DatabaseMetaData.importedKeyNoAction} - don't allow the
* primary key to be updated if it is imported as a foreign key</li>
* <li>{@code DatabaseMetaData.importedKeyCascade} - change the imported key to
* match the primary key update</li>
@@ -959,7 +959,7 @@
* Returns a string of characters that may be used in unquoted identifier
* names. The characters {@code a-z}, {@code A-Z}, {@code 0-9} and {@code _}
* are always permitted.
- *
+ *
* @return a String containing all the additional permitted characters.
* @throws SQLException
* a database error occurred.
@@ -969,7 +969,7 @@
/**
* Returns the string used to quote SQL identifiers. Returns " " (space) if
* identifier quoting not supported.
- *
+ *
* @return the String used to quote SQL identifiers.
* @throws SQLException
* a database error occurred.
@@ -982,7 +982,7 @@
* imported by a table).
* <p>
* The list returned is a {@code ResultSet} with a row entry for each
- * primary key column, ordered by {@code PKTABLE_CAT}, {@code PKTABLE_SCHEM},
+ * primary key column, ordered by {@code PKTABLE_CAT}, {@code PKTABLE_SCHEM},
* {@code PKTABLE_NAME}, and {@code KEY_SEQ}, with the following format:
* <ol>
* <li>{@code PKTABLE_CAT} - String - primary key catalog name being
@@ -1138,7 +1138,7 @@
/**
* Returns this driver's major JDBC version number.
- *
+ *
* @return the major JDBC version number.
* @throws SQLException
* a database error occurred.
@@ -1147,7 +1147,7 @@
/**
* Returns the minor JDBC version number for this driver.
- *
+ *
* @return the Minor JDBC Version Number.
* @throws SQLException
* a database error occurred.
@@ -1157,7 +1157,7 @@
/**
* Get the maximum number of hex characters in an in-line binary literal for
* this database.
- *
+ *
* @return the maximum number of hex characters in an in-line binary
* literal. If the number is unlimited then the result is zero.
* @throws SQLException
@@ -1167,7 +1167,7 @@
/**
* Returns the maximum size of a catalog name in this database.
- *
+ *
* @return the maximum size in characters for a catalog name. If the limit
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1177,7 +1177,7 @@
/**
* Returns the maximum size for a character literal in this database.
- *
+ *
* @return the maximum size in characters for a character literal. If the
* limit is unknown, or the value is unlimited, then the result is
* zero.
@@ -1188,7 +1188,7 @@
/**
* Returns the maximum size for a Column name for this database.
- *
+ *
* @return the maximum number of characters for a Column name. If the limit
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1199,7 +1199,7 @@
/**
* Get the maximum number of columns in a {@code GROUP BY} clause for this
* database.
- *
+ *
* @return the maximum number of columns in a {@code GROUP BY} clause. If
* the limit is unknown, or the value is unlimited, then the result
* is zero.
@@ -1210,7 +1210,7 @@
/**
* Returns the maximum number of columns in an Index for this database.
- *
+ *
* @return the maximum number of columns in an Index. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1221,7 +1221,7 @@
/**
* Returns the maximum number of columns in an {@code ORDER BY} clause for
* this database.
- *
+ *
* @return the maximum number of columns in an {@code ORDER BY} clause. If
* the limit is unknown, or the value is unlimited, then the result
* is zero.
@@ -1233,7 +1233,7 @@
/**
* Returns the maximum number of columns in a {@code SELECT} list for this
* database.
- *
+ *
* @return the maximum number of columns in a {@code SELECT} list. If the
* limit is unknown, or the value is unlimited, then the result is
* zero.
@@ -1244,7 +1244,7 @@
/**
* Returns the maximum number of columns in a table for this database.
- *
+ *
* @return the maximum number of columns in a table. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1254,7 +1254,7 @@
/**
* Returns the database's maximum number of concurrent connections.
- *
+ *
* @return the maximum number of connections. If the limit is unknown, or
* the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1264,7 +1264,7 @@
/**
* Returns the maximum length of a cursor name for this database.
- *
+ *
* @return the maximum number of characters in a cursor name. If the limit
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1275,7 +1275,7 @@
/**
* Returns the maximum length in bytes for an Index for this database. This
* covers all the parts of a composite index.
- *
+ *
* @return the maximum length in bytes for an Index. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1286,7 +1286,7 @@
/**
* Returns the maximum number of characters for a procedure name in this
* database.
- *
+ *
* @return the maximum number of character for a procedure name. If the
* limit is unknown, or the value is unlimited, then the result is
* zero.
@@ -1298,7 +1298,7 @@
/**
* Returns the maximum number of bytes within a single row for this
* database.
- *
+ *
* @return the maximum number of bytes for a single row. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1309,7 +1309,7 @@
/**
* Returns the maximum number of characters in a schema name for this
* database.
- *
+ *
* @return the maximum number of characters in a schema name. If the limit
* is unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1320,7 +1320,7 @@
/**
* Returns the maximum number of characters in an SQL statement for this
* database.
- *
+ *
* @return the maximum number of characters in an SQL statement. If the
* limit is unknown, or the value is unlimited, then the result is
* zero.
@@ -1332,7 +1332,7 @@
/**
* Get the maximum number of simultaneously open active statements for this
* database.
- *
+ *
* @return the maximum number of open active statements. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1342,7 +1342,7 @@
/**
* Returns the maximum size for a table name in the database.
- *
+ *
* @return the maximum size in characters for a table name. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1353,7 +1353,7 @@
/**
* Returns the maximum number of tables permitted in a {@code SELECT}
* statement for the database.
- *
+ *
* @return the maximum number of tables permitted in a {@code SELECT}
* statement. If the limit is unknown, or the value is unlimited,
* then the result is zero.
@@ -1364,7 +1364,7 @@
/**
* Returns the maximum number of characters in a user name for the database.
- *
+ *
* @return the maximum number of characters in a user name. If the limit is
* unknown, or the value is unlimited, then the result is zero.
* @throws SQLException
@@ -1376,7 +1376,7 @@
* Returns a list of the math functions available with this database. These
* are used in the JDBC function escape clause and are the Open Group CLI
* math function names.
- *
+ *
* @return a String which contains the list of math functions as a comma
* separated list.
* @throws SQLException
@@ -1526,7 +1526,7 @@
* </ul>
* </li>
* </ol>
- *
+ *
* @param catalog
* a catalog name. {@code null} is used to imply no narrowing of
* the search by catalog name. Otherwise, the name must match a
@@ -1550,7 +1550,7 @@
/**
* Returns the database vendor's preferred name for "procedure".
- *
+ *
* @return a String with the vendor's preferred name for "procedure".
* @throws SQLException
* a database error occurred.
@@ -1559,7 +1559,7 @@
/**
* Returns the result set's default holdability.
- *
+ *
* @return one of {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code
* ResultSet.CLOSE_CURSORS_AT_COMMIT}.
* @throws SQLException
@@ -1575,7 +1575,7 @@
* <li>{@code TABLE_SCHEM} - String - the schema name</li> <li>{@code
* TABLE_CATALOG} - String - the catalog name (possibly {@code null}) </li>
* </ol>
- *
+ *
* @return a {@code ResultSet} with one row for each schema in the format
* defined above.
* @throws SQLException
@@ -1585,7 +1585,7 @@
/**
* Returns the database vendor's preferred term for "schema".
- *
+ *
* @return a String which is the vendor's preferred term for schema.
* @throws SQLException
* a database error occurred.
@@ -1598,7 +1598,7 @@
* characters in catalog search pattern strings. {@code '_'} is used to represent any single
* character while {@code '%'} is used for a sequence of zero or more
* characters.
- *
+ *
* @return a String used to escape the wildcard characters.
* @throws SQLException
* a database error occurred.
@@ -1608,7 +1608,7 @@
/**
* Returns a list of all the SQL keywords that are NOT also SQL92 keywords
* for the database.
- *
+ *
* @return a String containing the list of SQL keywords in a comma separated
* format.
* @throws SQLException
@@ -1620,7 +1620,7 @@
* States the type of {@code SQLState} value returned by {@code
* SQLException.getSQLState}. This can either be the X/Open (now known as
* Open Group) SQL CLI form or the SQL99 form.
- *
+ *
* @return an integer, which is either {@code
* DatabaseMetaData.sqlStateSQL99} or {@code
* DatabaseMetaData.sqlStateXOpen}.
@@ -1633,7 +1633,7 @@
* Returns a list of string functions available with the database. These
* functions are used in JDBC function escape clause and follow the Open
* Group CLI string function names definition.
- *
+ *
* @return a String containing the list of string functions in comma
* separated format.
* @throws SQLException
@@ -1727,7 +1727,7 @@
* Returns a list of system functions available with the database. These are
* names used in the JDBC function escape clause and are Open Group CLI
* function names.
- *
+ *
* @return a String containing the list of system functions in a comma
* separated format.
* @throws SQLException
@@ -1854,7 +1854,7 @@
/**
* Returns a list of time and date functions available for the database.
- *
+ *
* @return a string containing a comma separated list of the time and date
* functions.
* @throws SQLException
@@ -1913,7 +1913,7 @@
* <li>{@code SQL_DATETIME_SUB} - int - not used</li>
* <li>{@code NUM_PREC_RADIX} - int - number radix (typically 2 or 10)</li>
* </ol>
- *
+ *
* @return a {@code ResultSet} which is structured as described above.
* @throws SQLException
* a database error occurred.
@@ -1970,7 +1970,7 @@
/**
* Returns the URL for this database.
- *
+ *
* @return the URL for the database. {@code null} if it cannot be generated.
* @throws SQLException
* a database error occurred.
@@ -1979,7 +1979,7 @@
/**
* Determine the user name as known by the database.
- *
+ *
* @return the user name.
* @throws SQLException
* a database error occurred.
@@ -2037,7 +2037,7 @@
/**
* Determines whether a visible row insert can be detected by calling {@code
* ResultSet.rowInserted}.
- *
+ *
* @param type
* the {@code ResultSet} type. This may be one of {@code
* ResultSet.TYPE_SCROLL_SENSITIVE} or {@code
@@ -2054,7 +2054,7 @@
/**
* Determine whether a fully qualified table name is prefixed or suffixed to
* a fully qualified table name.
- *
+ *
* @return {@code true} if the catalog appears at the start of a fully
* qualified table name, {@code false} otherwise.
* @throws SQLException
@@ -2064,7 +2064,7 @@
/**
* Determines whether the database is in read-only mode.
- *
+ *
* @return {@code true} if the database is in read-only mode, {@code false}
* otherwise.
* @throws SQLException
@@ -2075,7 +2075,7 @@
/**
* Determines whether updates are made to a copy of, or directly on, Large Objects
* ({@code LOB}s).
- *
+ *
* @return {@code true} if updates are made to a copy of the Large Object,
* {@code false} otherwise.
* @throws SQLException
@@ -2086,7 +2086,7 @@
/**
* Determines whether the database handles concatenations between {@code NULL} and
* non-{@code NULL} values by producing a {@code NULL} output.
- *
+ *
* @return {@code true} if {@code NULL} to non-{@code NULL} concatenations
* produce a {@code NULL} result, {@code false} otherwise.
* @throws SQLException
@@ -2099,7 +2099,7 @@
* results regardless of requested sort order. This means that they will
* appear at the end of sorted lists whatever other non-{@code NULL} values
* may be present.
- *
+ *
* @return {@code true} if {@code NULL} values are sorted at the end,
* {@code false} otherwise.
* @throws SQLException
@@ -2111,7 +2111,7 @@
* Determines whether {@code NULL} values are always sorted at the start of the
* sorted list, irrespective of the sort order. This means that they appear
* at the start of sorted lists, whatever other values may be present.
- *
+ *
* @return {@code true} if {@code NULL} values are sorted at the start,
* {@code false} otherwise.
* @throws SQLException
@@ -2122,7 +2122,7 @@
/**
* Determines whether {@code NULL} values are sorted high - i.e. they are sorted
* as if they are higher than any other values.
- *
+ *
* @return {@code true} if {@code NULL} values are sorted high, {@code
* false} otherwise.
* @throws SQLException
@@ -2133,7 +2133,7 @@
/**
* Determines whether {@code NULL} values are sorted low - i.e. they are sorted as
* if they are lower than any other values.
- *
+ *
* @return {@code true} if {@code NULL} values are sorted low, {@code false}
* otherwise.
* @throws SQLException
@@ -2144,7 +2144,7 @@
/**
* Determines whether deletes made by others are visible, for a specified {@code
* ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}. It may be either {@code
* ResultSet.TYPE_FORWARD_ONLY} or {@code
@@ -2160,7 +2160,7 @@
/**
* Determines whether inserts made by others are visible, for a specified {@code
* ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}. May be {@code
* ResultSet.TYPE_FORWARD_ONLY}, or {@code
@@ -2176,7 +2176,7 @@
/**
* Determines whether updates made by others are visible, for a specified {@code
* ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}. May be {@code
* ResultSet.TYPE_FORWARD_ONLY}, or {@code
@@ -2192,7 +2192,7 @@
/**
* Determines whether a {@code ResultSet} can see its own deletes, for a
* specified {@code ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}: {@code
* ResultSet.TYPE_FORWARD_ONLY}, {@code
@@ -2208,7 +2208,7 @@
/**
* Determines whether a {@code ResultSet} can see its own inserts, for a
* specified {@code ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}: {@code
* ResultSet.TYPE_FORWARD_ONLY}, {@code
@@ -2224,7 +2224,7 @@
/**
* Determines whether a {@code ResultSet} can see its own updates, for a
* specified {@code ResultSet} type.
- *
+ *
* @param type
* the type of the {@code ResultSet}: {@code
* ResultSet.TYPE_FORWARD_ONLY}, {@code
@@ -2241,7 +2241,7 @@
* Determines whether the database treats SQL identifiers that are in mixed
* case (and unquoted) as case insensitive. If {@code true} then the
* database stores them in lower case.
- *
+ *
* @return {@code true} if unquoted SQL identifiers are stored in lower
* case, {@code false} otherwise.
* @throws SQLException
@@ -2252,7 +2252,7 @@
/**
* Determines whether the database considers mixed case quoted SQL
* identifiers as case insensitive and stores them in lower case.
- *
+ *
* @return {@code true} if quoted SQL identifiers are stored in lower case,
* {@code false} otherwise.
* @throws SQLException
@@ -2263,7 +2263,7 @@
/**
* Determines whether the database considers mixed case unquoted SQL
* identifiers as case insensitive and stores them in mixed case.
- *
+ *
* @return {@code true} if unquoted SQL identifiers as stored in mixed case,
* {@code false} otherwise.
* @throws SQLException
@@ -2275,7 +2275,7 @@
* Determines whether the database considers identifiers as case insensitive
* if they are mixed case quoted SQL. The database stores them in mixed
* case.
- *
+ *
* @return {@code true} if quoted SQL identifiers are stored in mixed case,
* {@code false} otherwise.
* @throws SQLException
@@ -2286,7 +2286,7 @@
/**
* Determines whether the database considers mixed case unquoted SQL
* identifiers as case insensitive and stores them in upper case.
- *
+ *
* @return {@code true} if unquoted SQL identifiers are stored in upper
* case, {@code false} otherwise.
* @throws SQLException
@@ -2297,7 +2297,7 @@
/**
* Determines whether the database considers mixed case quoted SQL
* identifiers as case insensitive and stores them in upper case.
- *
+ *
* @return {@code true} if quoted SQL identifiers are stored in upper case,
* {@code false} otherwise.
* @throws SQLException
@@ -2308,7 +2308,7 @@
/**
* Determines whether the database supports {@code ALTER TABLE} operation with
* {@code ADD COLUMN}.
- *
+ *
* @return {@code true} if {@code ALTER TABLE} with {@code ADD COLUMN} is
* supported, {@code false} otherwise.
* @throws SQLException
@@ -2319,7 +2319,7 @@
/**
* Determines whether the database supports {@code ALTER TABLE} operation with
* {@code DROP COLUMN}.
- *
+ *
* @return {@code true} if {@code ALTER TABLE} with {@code DROP COLUMN} is
* supported, {@code false} otherwise.
* @throws SQLException
@@ -2329,7 +2329,7 @@
/**
* Determines whether the database supports the ANSI92 entry level SQL grammar.
- *
+ *
* @return {@code true} if the ANSI92 entry level SQL grammar is supported,
* {@code false} otherwise.
* @throws SQLException
@@ -2339,7 +2339,7 @@
/**
* Determines whether the database supports the ANSI92 full SQL grammar.
- *
+ *
* @return {@code true} if the ANSI92 full SQL grammar is supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2349,7 +2349,7 @@
/**
* Determines whether the database supports the ANSI92 intermediate SQL Grammar.
- *
+ *
* @return {@code true} if the ANSI92 intermediate SQL grammar is supported,
* {@code false} otherwise.
* @throws SQLException
@@ -2359,7 +2359,7 @@
/**
* Determines whether the database supports batch updates.
- *
+ *
* @return {@code true} if batch updates are supported, {@code false}
* otherwise.
* @throws SQLException
@@ -2370,7 +2370,7 @@
/**
* Determines whether catalog names may be used in data manipulation
* statements.
- *
+ *
* @return {@code true} if catalog names can be used in data manipulation
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2380,7 +2380,7 @@
/**
* Determines whether catalog names can be used in index definition statements.
- *
+ *
* @return {@code true} if catalog names can be used in index definition
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2391,7 +2391,7 @@
/**
* Determines whether catalog names can be used in privilege definition
* statements.
- *
+ *
* @return {@code true} if catalog names can be used in privilege definition
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2401,7 +2401,7 @@
/**
* Determines whether catalog names can be used in procedure call statements.
- *
+ *
* @return {@code true} if catalog names can be used in procedure call
* statements.
* @throws SQLException
@@ -2411,7 +2411,7 @@
/**
* Determines whether catalog names may be used in table definition statements.
- *
+ *
* @return {@code true} if catalog names can be used in definition
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2435,7 +2435,7 @@
/**
* Determines whether the database supports the {@code CONVERT} operation between
* SQL types.
- *
+ *
* @return {@code true} if the {@code CONVERT} operation is supported,
* {@code false} otherwise.
* @throws SQLException
@@ -2446,7 +2446,7 @@
/**
* Determines whether the database supports {@code CONVERT} operation for two
* supplied SQL types.
- *
+ *
* @param fromType
* the Type to convert from, as defined by {@code java.sql.Types}
* @param toType
@@ -2461,7 +2461,7 @@
/**
* Determines whether the database supports the Core SQL Grammar for ODBC.
- *
+ *
* @return {@code true} if the Core SQL Grammar is supported, {@code false}
* otherwise.
* @throws SQLException
@@ -2471,7 +2471,7 @@
/**
* Determines whether the database supports correlated sub-queries.
- *
+ *
* @return {@code true} if the database does support correlated sub-queries
* and {@code false} otherwise.
* @throws SQLException
@@ -2482,7 +2482,7 @@
/**
* Determines whether the database allows both data definition and data
* manipulation statements inside a transaction.
- *
+ *
* @return {@code true} if both types of statement are permitted, {@code
* false} otherwise.
* @throws SQLException
@@ -2494,7 +2494,7 @@
/**
* Determines whether the database only allows data manipulation statements inside
* a transaction.
- *
+ *
* @return {@code true} if data manipulation statements are permitted only within a transaction,
* {@code false} otherwise.
* @throws SQLException
@@ -2506,7 +2506,7 @@
/**
* Determines whether table correlation names are required to be different from
* the names of the tables, when they are supported.
- *
+ *
* @return {@code true} if correlation names must be different from table
* names, {@code false} otherwise.
* @throws SQLException
@@ -2516,7 +2516,7 @@
/**
* Determines whether expressions in {@code ORDER BY} lists are supported.
- *
+ *
* @return {@code true} if expressions in {@code ORDER BY} lists are
* supported.
* @throws SQLException
@@ -2526,7 +2526,7 @@
/**
* Determines whether the Extended SQL Grammar for ODBC is supported.
- *
+ *
* @return {@code true} if the Extended SQL Grammar is supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2536,7 +2536,7 @@
/**
* Determines whether the database supports full nested outer joins.
- *
+ *
* @return {@code true} if full nested outer joins are supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2547,7 +2547,7 @@
/**
* Determines whether auto generated keys can be returned when a statement
* executes.
- *
+ *
* @return {@code true} if auto generated keys can be returned, {@code
* false} otherwise.
* @throws SQLException
@@ -2557,7 +2557,7 @@
/**
* Determines whether the database supports {@code GROUP BY} clauses.
- *
+ *
* @return {@code true} if the {@code GROUP BY} clause is supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2570,7 +2570,7 @@
* BY} clause not included in the {@code SELECT} statement as long as all of
* the columns in the {@code SELECT} statement are used in the {@code GROUP
* BY} clause.
- *
+ *
* @return {@code true} if {@code GROUP BY} clauses can use column names in
* this way, {@code false} otherwise.
* @throws SQLException
@@ -2581,7 +2581,7 @@
/**
* Determines whether the database supports using a column name in a {@code GROUP
* BY} clause that is not in the {@code SELECT} statement.
- *
+ *
* @return {@code true} if {@code GROUP BY} clause can use a column name not
* in the {@code SELECT} statement, {@code false} otherwise.
* @throws SQLException
@@ -2592,7 +2592,7 @@
/**
* Determines whether the database supports SQL Integrity Enhancement
* Facility.
- *
+ *
* @return {@code true} if the Integrity Enhancement Facility is supported,
* {@code false} otherwise.
* @throws SQLException
@@ -2602,7 +2602,7 @@
/**
* Determines whether the database supports a {@code LIKE} escape clause.
- *
+ *
* @return {@code true} if LIKE escape clause is supported, {@code false}
* otherwise.
* @throws SQLException
@@ -2613,7 +2613,7 @@
/**
* Determines whether the database provides limited support for outer join
* operations.
- *
+ *
* @return {@code true} if there is limited support for outer join
* operations, {@code false} otherwise. This will be {@code true} if
* {@code supportsFullOuterJoins} returns {@code true}.
@@ -2624,7 +2624,7 @@
/**
* Determines whether the database supports Minimum SQL Grammar for ODBC.
- *
+ *
* @return {@code true} if the Minimum SQL Grammar is supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2635,7 +2635,7 @@
/**
* Determines whether the database treats mixed case unquoted SQL identifiers as
* case sensitive storing them in mixed case.
- *
+ *
* @return {@code true} if unquoted SQL identifiers are stored in mixed
* case, {@code false} otherwise.
* @throws SQLException
@@ -2646,7 +2646,7 @@
/**
* Determines whether the database considers mixed case quoted SQL
* identifiers as case sensitive, storing them in mixed case.
- *
+ *
* @return {@code true} if quoted SQL identifiers are stored in mixed case,
* {@code false} otherwise.
* @throws SQLException
@@ -2657,7 +2657,7 @@
/**
* Determines whether it is possible for a single {@code CallableStatement} to
* return multiple {@code ResultSet}s simultaneously.
- *
+ *
* @return {@code true} if a single {@code CallableStatement} can return
* multiple {@code ResultSet}s simultaneously, {@code false}
* otherwise.
@@ -2669,7 +2669,7 @@
/**
* Determines whether retrieving multiple {@code ResultSet}s from a single
* call to the {@code execute} method is supported.
- *
+ *
* @return {@code true} if multiple {@code ResultSet}s can be retrieved,
* {@code false} otherwise.
* @throws SQLException
@@ -2680,7 +2680,7 @@
/**
* Determines whether multiple simultaneous transactions on
* different connections are supported.
- *
+ *
* @return {@code true} if multiple open transactions are supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2690,7 +2690,7 @@
/**
* Determines whether callable statements with named parameters is supported.
- *
+ *
* @return {@code true} if named parameters can be used with callable
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2700,7 +2700,7 @@
/**
* Determines whether columns in the database can be defined as non-nullable.
- *
+ *
* @return {@code true} if columns can be defined non-nullable, {@code
* false} otherwise.
* @throws SQLException
@@ -2711,7 +2711,7 @@
/**
* Determines whether keeping cursors open across commit operations is
* supported.
- *
+ *
* @return {@code true} if cursors can be kept open across commit
* operations, {@code false} if they might get closed.
* @throws SQLException
@@ -2722,7 +2722,7 @@
/**
* Determines whether the database can keep cursors open across rollback
* operations.
- *
+ *
* @return {@code true} if cursors can be kept open across rollback
* operations, {@code false} if they might get closed.
* @throws SQLException
@@ -2733,7 +2733,7 @@
/**
* Determines whether keeping statements open across commit operations is
* supported.
- *
+ *
* @return {@code true} if statements can be kept open, {@code false} if
* they might not.
* @throws SQLException
@@ -2744,7 +2744,7 @@
/**
* Determines whether keeping statements open across rollback operations is
* supported.
- *
+ *
* @return {@code true} if statements can be kept open, {@code false} if
* they might not.
* @throws SQLException
@@ -2755,7 +2755,7 @@
/**
* Determines whether using a column in an {@code ORDER BY} clause that is
* not in the {@code SELECT} statement is supported.
- *
+ *
* @return {@code true} if it is possible to {@code ORDER} using a column
* not in the {@code SELECT}, {@code false} otherwise.
* @throws SQLException
@@ -2765,7 +2765,7 @@
/**
* Determines whether outer join operations are supported.
- *
+ *
* @return {@code true} if outer join operations are supported, {@code
* false} otherwise.
* @throws SQLException
@@ -2775,7 +2775,7 @@
/**
* Determines whether positioned {@code DELETE} statements are supported.
- *
+ *
* @return {@code true} if the database supports positioned {@code DELETE}
* statements.
* @throws SQLException
@@ -2785,7 +2785,7 @@
/**
* Determines whether positioned {@code UPDATE} statements are supported.
- *
+ *
* @return {@code true} if the database supports positioned {@code UPDATE}
* statements, {@code false} otherwise.
* @throws SQLException
@@ -2796,7 +2796,7 @@
/**
* Determines whether there is support for a given concurrency style for the
* given {@code ResultSet}.
- *
+ *
* @param type
* the {@code ResultSet} type, as defined in {@code
* java.sql.ResultSet}:
@@ -2820,7 +2820,7 @@
/**
* Determines whether the supplied {@code ResultSet} holdability mode is
* supported.
- *
+ *
* @param holdability
* as specified in {@code java.sql.ResultSet}: {@code
* ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code
@@ -2835,7 +2835,7 @@
/**
* Determines whether the supplied {@code ResultSet} type is supported.
- *
+ *
* @param type
* the {@code ResultSet} type as defined in {@code
* java.sql.ResultSet}: {@code ResultSet.TYPE_FORWARD_ONLY},
@@ -2850,7 +2850,7 @@
/**
* Determines whether savepoints for transactions are supported.
- *
+ *
* @return {@code true} if savepoints are supported, {@code false}
* otherwise.
* @throws SQLException
@@ -2861,7 +2861,7 @@
/**
* Determines whether a schema name may be used in a data manipulation
* statement.
- *
+ *
* @return {@code true} if a schema name can be used in a data manipulation,
* otherwise {@code false}.
* @throws SQLException
@@ -2872,7 +2872,7 @@
/**
* Determines whether a schema name may be used in an index definition
* statement.
- *
+ *
* @return {@code true} if a schema name can be used in an index definition,
* otherwise {@code false}.
* @throws SQLException
@@ -2883,7 +2883,7 @@
/**
* Determines whether a database schema name can be used in a privilege
* definition statement.
- *
+ *
* @return {@code true} if a database schema name may be used in a privilege
* definition, otherwise {@code false}
* @throws SQLException
@@ -2893,7 +2893,7 @@
/**
* Determines whether a procedure call statement may be contain in a schema name.
- *
+ *
* @return {@code true} if a schema name can be used in a procedure call,
* otherwise {@code false}.
* @throws SQLException
@@ -2903,7 +2903,7 @@
/**
* Determines whether a schema name can be used in a table definition statement.
- *
+ *
* @return {@code true} if a schema name can be used in a table definition,
* otherwise {@code false}.
* @throws SQLException
@@ -2913,7 +2913,7 @@
/**
* Determines whether the {@code SELECT FOR UPDATE} statement is supported.
- *
+ *
* @return {@code true} if {@code SELECT FOR UPDATE} statements are
* supported, otherwise {@code false}.
* @throws SQLException
@@ -2923,7 +2923,7 @@
/**
* Determines whether statement pooling is supported.
- *
+ *
* @return {@code true} of the database does support statement pooling,
* otherwise {@code false}.
* @throws SQLException
@@ -2934,7 +2934,7 @@
/**
* Determines whether stored procedure calls using the stored procedure
* escape syntax is supported.
- *
+ *
* @return {@code true} if stored procedure calls using the stored procedure
* escape syntax are supported, otherwise {@code false}.
* @throws SQLException
@@ -2944,7 +2944,7 @@
/**
* Determines whether subqueries in comparison expressions are supported.
- *
+ *
* @return {@code true} if subqueries are supported in comparison
* expressions.
* @throws SQLException
@@ -2954,7 +2954,7 @@
/**
* Determines whether subqueries in {@code EXISTS} expressions are supported.
- *
+ *
* @return {@code true} if subqueries are supported in {@code EXISTS}
* expressions, otherwise {@code false}.
* @throws SQLException
@@ -2964,7 +2964,7 @@
/**
* Determines whether subqueries in {@code IN} statements are supported.
- *
+ *
* @return {@code true} if subqueries are supported in {@code IN} statements,
* otherwise {@code false}.
* @throws SQLException
@@ -2974,7 +2974,7 @@
/**
* Determines whether subqueries in quantified expressions are supported.
- *
+ *
* @return {@code true} if subqueries are supported, otherwise {@code false}.
* @throws SQLException
* a database error occurred.
@@ -2983,7 +2983,7 @@
/**
* Determines whether the database has table correlation names support.
- *
+ *
* @return {@code true} if table correlation names are supported, otherwise
* {@code false}.
* @throws SQLException
@@ -2993,7 +2993,7 @@
/**
* Determines whether a specified transaction isolation level is supported.
- *
+ *
* @param level
* the transaction isolation level, as specified in {@code
* java.sql.Connection}: {@code TRANSACTION_NONE}, {@code
@@ -3024,7 +3024,7 @@
/**
* Determines whether the {@code SQL UNION} operation is supported.
- *
+ *
* @return {@code true} of the database does support {@code UNION}, otherwise
* {@code false}.
* @throws SQLException
@@ -3034,7 +3034,7 @@
/**
* Determines whether the {@code SQL UNION ALL} operation is supported.
- *
+ *
* @return {@code true} if the database does support {@code UNION ALL},
* otherwise {@code false}.
* @throws SQLException
@@ -3045,7 +3045,7 @@
/**
* Determines whether the method {@code ResultSet.rowUpdated} can detect a visible
* row update for the specified {@code ResultSet} type.
- *
+ *
* @param type
* {@code ResultSet} type: {@code ResultSet.TYPE_FORWARD_ONLY},
* {@code ResultSet.TYPE_SCROLL_INSENSITIVE}, or {@code
@@ -3059,7 +3059,7 @@
/**
* Determines whether this database uses a file for each table.
- *
+ *
* @return {@code true} if the database uses one file for each table,
* otherwise {@code false}.
* @throws SQLException
@@ -3069,7 +3069,7 @@
/**
* Determines whether this database uses a local file to store tables.
- *
+ *
* @return {@code true} if the database stores tables in a local file,
* otherwise {@code false}.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/Date.java b/luni/src/main/java/java/sql/Date.java
index faf078e..407da32 100644
--- a/luni/src/main/java/java/sql/Date.java
+++ b/luni/src/main/java/java/sql/Date.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,7 +58,7 @@
/**
* Creates a date which corresponds to the day determined by the supplied
* milliseconds time value {@code theDate}.
- *
+ *
* @param theDate
* a time value in milliseconds since the epoch - January 1 1970
* 00:00:00 GMT. The time value (hours, minutes, seconds,
@@ -154,7 +154,7 @@
/**
* Sets this date to a date supplied as a milliseconds value. The date is
* set based on the supplied time value and rounded to zero GMT for that day.
- *
+ *
* @param theTime
* the time in milliseconds since the Epoch.
*/
@@ -169,7 +169,7 @@
/**
* Produces a string representation of the date in SQL format
- *
+ *
* @return a string representation of the date in SQL format - {@code
* "yyyy-mm-dd"}.
*/
@@ -186,23 +186,23 @@
return sb.toString();
}
- private static final String PADDING = "0000";
+ private static final String PADDING = "0000";
- /*
- * Private method to format the time
- */
- private void format(int date, int digits, StringBuilder sb) {
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
String str = String.valueOf(date);
if (digits - str.length() > 0) {
sb.append(PADDING.substring(0, digits - str.length()));
}
- sb.append(str);
+ sb.append(str);
}
/**
* Creates a {@code Date} from a string representation of a date in SQL
* format.
- *
+ *
* @param dateString
* the string representation of a date in SQL format - " {@code
* yyyy-mm-dd}".
diff --git a/luni/src/main/java/java/sql/Driver.java b/luni/src/main/java/java/sql/Driver.java
index 207aec5..41ca863 100644
--- a/luni/src/main/java/java/sql/Driver.java
+++ b/luni/src/main/java/java/sql/Driver.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
/**
* Returns whether the driver thinks that it can open a connection to the
* given URL.
- *
+ *
* @param url
* the URL to connect to.
* @return {@code true} if the driver thinks that is can open a connection
@@ -54,7 +54,7 @@
/**
* Attempts to make a database connection to a data source specified by a
* supplied URL.
- *
+ *
* @param url
* the URL to connect.
* @param info
@@ -71,14 +71,14 @@
/**
* Gets the driver's major version number.
- *
+ *
* @return the major version number of the driver - typically starts at 1.
*/
public int getMajorVersion();
/**
* Gets the driver's minor version number.
- *
+ *
* @return the minor version number of the driver - typically starts at 0.
*/
public int getMinorVersion();
@@ -97,11 +97,11 @@
* when displaying a dialog to an end-user as part of the
* database login process.
* @param info
- * a set of tag/value pairs giving data that a user may be
+ * a set of tag/value pairs giving data that a user may be
* prompted to provide in order to connect to the database.
* @return an array of {@code DriverPropertyInfo} records which provide
* details on which additional properties are required (in addition
- * to those supplied in the {@code info} parameter) in order to
+ * to those supplied in the {@code info} parameter) in order to
* connect to the database.
* @throws SQLException
* if a database error occurs.
diff --git a/luni/src/main/java/java/sql/DriverManager.java b/luni/src/main/java/java/sql/DriverManager.java
index 8d3adde..d670562 100644
--- a/luni/src/main/java/java/sql/DriverManager.java
+++ b/luni/src/main/java/java/sql/DriverManager.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -132,7 +132,7 @@
/**
* Attempts to establish a connection to the given database URL.
- *
+ *
* @param url
* a URL string representing the database target to connect with.
* @return a {@code Connection} to the database identified by the URL.
@@ -147,7 +147,7 @@
/**
* Attempts to establish a connection to the given database URL.
- *
+ *
* @param url
* a URL string representing the database target to connect with
* @param info
@@ -189,7 +189,7 @@
/**
* Attempts to establish a connection to the given database URL.
- *
+ *
* @param url
* a URL string representing the database target to connect with.
* @param user
@@ -216,7 +216,7 @@
/**
* Tries to find a driver that can interpret the supplied URL.
- *
+ *
* @param url
* the URL of a database.
* @return a {@code Driver} that matches the provided URL. {@code null} if
@@ -254,7 +254,7 @@
/**
* Returns an {@code Enumeration} that contains all of the loaded JDBC
* drivers that the current caller can access.
- *
+ *
* @return An {@code Enumeration} containing all the currently loaded JDBC
* {@code Drivers}.
*/
@@ -286,7 +286,7 @@
/**
* Returns the login timeout when connecting to a database in seconds.
- *
+ *
* @return the login timeout in seconds.
*/
public static int getLoginTimeout() {
@@ -307,7 +307,7 @@
/**
* Retrieves the log writer.
- *
+ *
* @return A {@code PrintWriter} object used as the log writer. {@code null}
* if no log writer is set.
*/
@@ -318,7 +318,7 @@
/**
* Prints a message to the current JDBC log stream. This is either the
* {@code PrintWriter} or (deprecated) the {@code PrintStream}, if set.
- *
+ *
* @param message
* the message to print to the JDBC log stream.
*/
@@ -359,7 +359,7 @@
/**
* Sets the login timeout when connecting to a database in seconds.
- *
+ *
* @param seconds
* seconds until timeout. 0 indicates wait forever.
*/
@@ -385,7 +385,7 @@
/**
* Sets the {@code PrintWriter} that is used by all loaded drivers, and also
* the {@code DriverManager}.
- *
+ *
* @param out
* the {@code PrintWriter} to be used.
*/
@@ -408,7 +408,7 @@
/**
* Determines whether the supplied object was loaded by the given {@code ClassLoader}.
- *
+ *
* @param theObject
* the object to check.
* @param theClassLoader
diff --git a/luni/src/main/java/java/sql/DriverPropertyInfo.java b/luni/src/main/java/java/sql/DriverPropertyInfo.java
index aa18585..9a62f07 100644
--- a/luni/src/main/java/java/sql/DriverPropertyInfo.java
+++ b/luni/src/main/java/java/sql/DriverPropertyInfo.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -57,7 +57,7 @@
/**
* Creates a {@code DriverPropertyInfo} instance with the supplied name and
* value. Other class members take their default values.
- *
+ *
* @param name
* The property name.
* @param value
diff --git a/luni/src/main/java/java/sql/ParameterMetaData.java b/luni/src/main/java/java/sql/ParameterMetaData.java
index 1e241c6..0faf2af 100644
--- a/luni/src/main/java/java/sql/ParameterMetaData.java
+++ b/luni/src/main/java/java/sql/ParameterMetaData.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@
/**
* Gets the fully-qualified name of the Java class which should be passed as
* a parameter to the method {@code PreparedStatement.setObject}.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -77,7 +77,7 @@
/**
* Gets the number of parameters in the {@code PreparedStatement} for which
* this {@code ParameterMetaData} contains information.
- *
+ *
* @return the number of parameters.
* @throws SQLException
* if a database error happens.
@@ -92,7 +92,7 @@
* <li>ParameterMetaData.parameterModeInOut</li>
* <li>ParameterMetaData.parameterModeUnknown</li>
* </ul>
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -104,7 +104,7 @@
/**
* Gets the SQL type of a specified parameter.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -117,7 +117,7 @@
/**
* Gets the database-specific type name of a specified parameter.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -131,7 +131,7 @@
/**
* Gets the number of decimal digits for a specified parameter.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -145,7 +145,7 @@
/**
* Gets the number of digits after the decimal point for a specified
* parameter.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -164,7 +164,7 @@
* <li>ParameterMetaData.parameterNullable</li>
* <li>ParameterMetaData.parameterNullableUnknown</li>
* </ul>
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
@@ -176,7 +176,7 @@
/**
* Gets whether values for the specified parameter can be signed numbers.
- *
+ *
* @param paramIndex
* the index number of the parameter, where the first parameter
* has index 1.
diff --git a/luni/src/main/java/java/sql/PreparedStatement.java b/luni/src/main/java/java/sql/PreparedStatement.java
index 1cd9668..6b0cae3 100644
--- a/luni/src/main/java/java/sql/PreparedStatement.java
+++ b/luni/src/main/java/java/sql/PreparedStatement.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
/**
* Add a set of parameters to the {@code PreparedStatement}'s command batch.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -60,10 +60,10 @@
* Executes the SQL statement in this {@code PreparedStatement}.
* <p>
* A {@code PreparedStatement} may return multiple results. The execute
- * method executes the {@code PreparedStatement} and returns a flag
- * indicating the kind of result produced by the action. The methods
- * {@code getResultSet} or {@code getUpdateCount} are used to retrieve
- * the first result, and the second and subsequent results are
+ * method executes the {@code PreparedStatement} and returns a flag
+ * indicating the kind of result produced by the action. The methods
+ * {@code getResultSet} or {@code getUpdateCount} are used to retrieve
+ * the first result, and the second and subsequent results are
* retrieved with {@code getMoreResults}.
*
* @return {@code true} if the result of the execution is a {@code
@@ -77,7 +77,7 @@
/**
* Executes the SQL query in the {@code PreparedStatement} and returns the
* {@code ResultSet} generated by the query.
- *
+ *
* @return the {@code ResultSet} generated by the query, never {@code null}.
* @throws SQLException
* if a database error happens or if the SQL statement does not
@@ -89,7 +89,7 @@
* Invokes the SQL command contained within the prepared statement. This
* must be {@code INSERT}, {@code UPDATE}, {@code DELETE}, or a command that
* returns nothing.
- *
+ *
* @return the number of affected rows for {@code INSERT}, {@code UPDATE} or {@code
* DELETE} statements, {@code 0} for statements that return nothing.
* @throws SQLException
@@ -117,7 +117,7 @@
/**
* Gets information about the parameters of the {@code PreparedStatement}.
- *
+ *
* @return a {@code ParameterMetaData} object which holds information about
* the number, type, and properties of the parameters of this {@code
* PreparedStatement}.
@@ -128,7 +128,7 @@
/**
* Sets the value of a specified parameter to the supplied {@code Array}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -169,7 +169,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.math.BigDecimal} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -207,7 +207,7 @@
/**
* Sets the value of a specified parameter to the given {@code Blob} object.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -223,7 +223,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code boolean}
* value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -238,7 +238,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code byte} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -254,7 +254,7 @@
* Sets the value of a specified parameter to a supplied array of bytes. The
* array is mapped to a {@code VARBINARY} or {@code LONGVARBINARY} in the
* database.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -290,7 +290,7 @@
/**
* Sets the value of a specified parameter to the given {@code Clob} object.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -305,7 +305,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.sql.Date} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -324,7 +324,7 @@
* to compute the SQL {@code DATE} in the database - without the supplied
* {@code Calendar}, the driver uses the default timezone of the Java
* virtual machine.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -345,7 +345,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code double}
* value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -361,7 +361,7 @@
/**
* Sets the value of a specified parameter to to a supplied {@code float}
* value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -375,7 +375,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code int} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -389,7 +389,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code long} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -405,7 +405,7 @@
* Sets the value of a specified parameter to SQL {@code NULL}. Don't use
* this version of {@code setNull} for <i>User Defined Types</i> (UDT) or
* for REF type parameters.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -527,7 +527,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* REF(<structured-type>)} value. This is stored as an SQL {@code REF}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -543,7 +543,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code short}
* value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -558,7 +558,7 @@
/**
* Sets the value of a specified parameter to a supplied string.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -574,7 +574,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.sql.Time} value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -595,7 +595,7 @@
* driver uses the default timezone of the Java virtual machine.
*
* @param parameterIndex
- * the parameter number index, where the first parameter has
+ * the parameter number index, where the first parameter has
* index 1.
* @param theTime
* a {@code java.sql.Time} value to which the parameter at
@@ -614,7 +614,7 @@
/**
* Sets the value of a specified parameter to a supplied java.sql.Timestamp
* value.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
@@ -655,7 +655,7 @@
/**
* Sets the value of a specified parameter to the characters from a supplied
* {@code InputStream}, with a specified number of bytes.
- *
+ *
* @deprecated Use {@link #setCharacterStream(int, Reader, int)}
* @param parameterIndex
* the parameter number index, where the first parameter has
@@ -675,7 +675,7 @@
/**
* Sets the value of a specified parameter to a supplied {@code
* java.net.URL}.
- *
+ *
* @param parameterIndex
* the parameter number index, where the first parameter has
* index 1.
diff --git a/luni/src/main/java/java/sql/Ref.java b/luni/src/main/java/java/sql/Ref.java
index cbc5454e..ca4ab8b 100644
--- a/luni/src/main/java/java/sql/Ref.java
+++ b/luni/src/main/java/java/sql/Ref.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,10 +23,10 @@
* This interface represents an SQL Ref - a data object containing a cursor
* or pointer to a result table.
* <p>
- * The data structure identified by an instance of Ref is held in the
+ * The data structure identified by an instance of Ref is held in the
* database, so the data is not necessarily read and converted
- * into a Java object until {@code getObject} is called. However, if
- * the database supports the {@code Ref} type, it is not typically
+ * into a Java object until {@code getObject} is called. However, if
+ * the database supports the {@code Ref} type, it is not typically
* necessary to get the underlying object before using it in a method call -
* the {@code Ref} object can be used in place of the data structure.
* <p>
@@ -38,7 +38,7 @@
/**
* Gets the fully-qualified SQL name of the SQL structured type that this
* {@code Ref} references.
- *
+ *
* @return the fully qualified name of the SQL structured type.
* @throws SQLException
* if there is a database error.
@@ -47,7 +47,7 @@
/**
* Gets the SQL structured type instance referenced by this {@code Ref}.
- *
+ *
* @return a Java object whose type is defined by the mapping for the SQL
* structured type.
* @throws SQLException
@@ -58,7 +58,7 @@
/**
* Returns the associated object and uses the relevant mapping to convert it
* to a Java type.
- *
+ *
* @param map
* the mapping for type conversion.
* @return a Java object whose type is defined by the mapping for the SQL
@@ -71,7 +71,7 @@
/**
* Sets the value of the structured type that this {@code Ref} references to
* a supplied object.
- *
+ *
* @param value
* the {@code Object} representing the new SQL structured type
* that this {@code Ref} references.
diff --git a/luni/src/main/java/java/sql/ResultSet.java b/luni/src/main/java/java/sql/ResultSet.java
index 8ecbe6c..0cbe76d 100644
--- a/luni/src/main/java/java/sql/ResultSet.java
+++ b/luni/src/main/java/java/sql/ResultSet.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -78,7 +78,7 @@
* followed by calling the {@code ResultSet.insertRow} method.
* <p>
* A {@code ResultSet} is closed if the statement which generated it closes, the
- * statement is executed again, or the same statement's next {@code ResultSet}
+ * statement is executed again, or the same statement's next {@code ResultSet}
* is retrieved (if the statement returned of multiple results).
*/
public interface ResultSet {
@@ -145,7 +145,7 @@
/**
* Moves the cursor to a specified row number in the {@code ResultSet}.
- *
+ *
* @param row
* the index of the row starting at index 1. Index {@code -1}
* returns the last row.
@@ -158,7 +158,7 @@
/**
* Moves the cursor to the end of the {@code ResultSet}, after the last row.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -167,7 +167,7 @@
/**
* Moves the cursor to the start of the {@code ResultSet}, before the first
* row.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -175,7 +175,7 @@
/**
* Cancels any updates made to the current row in the {@code ResultSet}.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -183,7 +183,7 @@
/**
* Clears all warnings related to this {@code ResultSet}.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -196,7 +196,7 @@
* garbage collection process. Note that the {@code close()} method might
* take some time to complete since it is dependent on the behavior of the
* connection to the database and the database itself.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -205,7 +205,7 @@
/**
* Deletes the current row from the {@code ResultSet} and from the
* underlying database.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -214,7 +214,7 @@
/**
* Gets the index number for a column in the {@code ResultSet} from the
* provided column name.
- *
+ *
* @param columnName
* the column name.
* @return the column's index in the {@code ResultSet} identified by column
@@ -226,7 +226,7 @@
/**
* Shifts the cursor position to the first row in the {@code ResultSet}.
- *
+ *
* @return {@code true} if the position is in a legitimate row, {@code
* false} if the {@code ResultSet} contains no rows.
* @throws SQLException
@@ -237,7 +237,7 @@
/**
* Gets the content of a column specified by column index in the current row
* of this {@code ResultSet} as a {@code java.sql.Array}.
- *
+ *
* @param columnIndex
* the index of the column to read
* @return a {@code java.sql.Array} with the data from the column.
@@ -249,7 +249,7 @@
/**
* Gets the value of a column specified by column name as a {@code
* java.sql.Array}.
- *
+ *
* @param colName
* the name of the column to read.
* @return a {@code java.sql.Array} with the data from the specified column.
@@ -261,7 +261,7 @@
/**
* Gets the value of a column specified by column index as an ASCII
* character stream.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return an {@code InputStream} with the data from the column.
@@ -273,7 +273,7 @@
/**
* Gets the value of a column specified by column name as an ASCII character
* stream.
- *
+ *
* @param columnName
* the name of the column to read
* @return an {@code InputStream} with the data from the column.
@@ -285,7 +285,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.math.BigDecimal}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code BigDecimal} with the value of the column.
@@ -297,7 +297,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.math.BigDecimal}.
- *
+ *
* @deprecated use {@link #getBigDecimal(int)} or
* {@link #getBigDecimal(String)}
* @param columnIndex
@@ -315,7 +315,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.math.BigDecimal}.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a BigDecimal with value of the column.
@@ -327,7 +327,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.math.BigDecimal}.
- *
+ *
* @deprecated use {@link #getBigDecimal(int)} or
* {@link #getBigDecimal(String)}
* @param columnName
@@ -380,7 +380,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Blob} object.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code java.sql.Blob} with the value of the column.
@@ -392,7 +392,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.sql.Blob} object.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code java.sql.Blob} with the value of the column.
@@ -404,7 +404,7 @@
/**
* Gets the value of a column specified by column index as a {@code boolean}
* .
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code boolean} value from the column. If the column is SQL
@@ -417,7 +417,7 @@
/**
* Gets the value of a column specified by column name, as a {@code boolean}
* .
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code boolean} value from the column. If the column is SQL
@@ -429,7 +429,7 @@
/**
* Gets the value of a column specified by column index as a {@code byte}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code byte} equal to the value of the column. 0 if the value
@@ -441,7 +441,7 @@
/**
* Gets the value of a column specified by column name as a {@code byte}.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code byte} equal to the value of the column. 0 if the value
@@ -453,7 +453,7 @@
/**
* Gets the value of a column specified by column index as a byte array.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a byte array containing the value of the column. {@code null} if
@@ -465,7 +465,7 @@
/**
* Gets the value of a column specified by column name as a byte array.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a byte array containing the value of the column. {@code null} if
@@ -478,7 +478,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.io.Reader} object.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code Reader} holding the value of the column. {@code null} if
@@ -492,7 +492,7 @@
/**
* Gets the value of a column specified by column name as a {@code
* java.io.Reader} object.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code Reader} holding the value of the column. {@code null} if
@@ -505,7 +505,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Clob}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code Clob} object representing the value in the column.
@@ -518,7 +518,7 @@
/**
* Gets the value of a column specified by column name as a {@code
* java.sql.Clob}.
- *
+ *
* @param colName
* the name of the column to read.
* @return a {@code Clob} object representing the value in the column.
@@ -530,7 +530,7 @@
/**
* Gets the concurrency mode of this {@code ResultSet}.
- *
+ *
* @return the concurrency mode - one of: {@code ResultSet.CONCUR_READ_ONLY}
* , {@code ResultSet.CONCUR_UPDATABLE}.
* @throws SQLException
@@ -540,7 +540,7 @@
/**
* Gets the name of the SQL cursor of this {@code ResultSet}.
- *
+ *
* @return the SQL cursor name.
* @throws SQLException
* if a database error happens.
@@ -550,7 +550,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Date}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code java.sql.Date} matching the column value. {@code null}
@@ -563,7 +563,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Date}. This method uses a supplied calendar to compute the Date.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @param cal
@@ -578,7 +578,7 @@
/**
* Gets the value of a column specified by column name as a {@code
* java.sql.Date}.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code java.sql.Date} matching the column value. {@code null}
@@ -591,7 +591,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.sql.Date} object.
- *
+ *
* @param columnName
* the name of the column to read.
* @param cal
@@ -606,7 +606,7 @@
/**
* Gets the value of a column specified by column index as a {@code double}
* value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code double} equal to the column value. {@code 0.0} if the
@@ -619,7 +619,7 @@
/**
* Gets the value of a column specified by column name as a {@code double}
* value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code double} equal to the column value. {@code 0.0} if the
@@ -632,7 +632,7 @@
/**
* Gets the direction in which rows are fetched for this {@code ResultSet}
* object.
- *
+ *
* @return the fetch direction. Will be one of:
* <ul>
* <li>ResultSet.FETCH_FORWARD</li><li>ResultSet.FETCH_REVERSE</li>
@@ -645,7 +645,7 @@
/**
* Gets the fetch size (in number of rows) for this {@code ResultSet}.
- *
+ *
* @return the fetch size as an int
* @throws SQLException
* if a database error happens.
@@ -655,7 +655,7 @@
/**
* Gets the value of a column specified by column index as a {@code float}
* value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code float} equal to the column value. {@code 0.0} if the
@@ -668,7 +668,7 @@
/**
* Gets the value of a column specified by column name as a {@code float}
* value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code float} equal to the column value. {@code 0.0} if the
@@ -681,7 +681,7 @@
/**
* Gets the value of a column specified by column index as an {@code int}
* value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return an {@code int} equal to the column value. {@code 0} if the
@@ -694,7 +694,7 @@
/**
* Gets the value of a column specified by column name, as an {@code int}
* value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return an {@code int} equal to the column value. {@code 0} if the
@@ -707,7 +707,7 @@
/**
* Gets the value of a column specified by column index as a {@code long}
* value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a {@code long} equal to the column value. {@code 0} if the
@@ -720,7 +720,7 @@
/**
* Gets the value of a column specified by column name, as a {@code long}
* value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a {@code long} equal to the column value. {@code 0} if the
@@ -733,7 +733,7 @@
/**
* Gets the metadata for this {@code ResultSet}. This defines the number,
* types and properties of the columns in the {@code ResultSet}.
- *
+ *
* @return a {@code ResultSetMetaData} object with information about this
* {@code ResultSet}.
* @throws SQLException
@@ -821,7 +821,7 @@
/**
* Gets the value of a column specified by column index as a Java {@code
* java.sql.Ref}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a Ref representing the value of the SQL REF in the column
@@ -833,7 +833,7 @@
/**
* Gets the value of a column specified by column name as a Java {@code
* java.sql.Ref}.
- *
+ *
* @param colName
* the name of the column to read.
* @return a Ref representing the value of the SQL {@code REF} in the column
@@ -845,7 +845,7 @@
/**
* Gets the number of the current row in the {@code ResultSet}. Row numbers
* start at 1 for the first row.
- *
+ *
* @return the index number of the current row. {@code 0} is returned if
* there is no current row.
* @throws SQLException
@@ -855,7 +855,7 @@
/**
* Gets the value of a column specified by column index as a short value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a short value equal to the value of the column. {@code 0} if
@@ -867,7 +867,7 @@
/**
* Gets the value of a column specified by column name, as a short value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a short value equal to the value of the column. {@code 0} if
@@ -882,7 +882,7 @@
* ResultSet} was not created by a statement (i.e. because it was returned
* from one of the {@link DatabaseMetaData} methods), {@code null} is
* returned.
- *
+ *
* @return the Statement which produced this {@code ResultSet}, or {@code
* null} if the {@code ResultSet} was not created by a Statement.
* @throws SQLException
@@ -892,7 +892,7 @@
/**
* Gets the value of a column specified by column index as a String.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return the String representing the value of the column, {@code null} if
@@ -904,7 +904,7 @@
/**
* Gets the value of a column specified by column name, as a String.
- *
+ *
* @param columnName
* the name of the column to read.
* @return the String representing the value of the column, {@code null} if
@@ -917,7 +917,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Time} value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a Time representing the column value, {@code null} if the column
@@ -929,9 +929,9 @@
/**
* Gets the value of a column specified by column index as a {@code
- * java.sql.Time} value. The supplied {@code Calendar} is used to
+ * java.sql.Time} value. The supplied {@code Calendar} is used to
* map the SQL {@code Time} value to a Java Time value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @param cal
@@ -946,7 +946,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.sql.Time} value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return the column value, {@code null} if the column value is SQL {@code
@@ -958,9 +958,9 @@
/**
* Gets the value of a column specified by column index, as a {@code
- * java.sql.Time} value. The supplied {@code Calendar} is used to
+ * java.sql.Time} value. The supplied {@code Calendar} is used to
* map the SQL {@code Time} value to a Java Time value.
- *
+ *
* @param columnName
* the name of the column to read.
* @param cal
@@ -975,7 +975,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.sql.Timestamp} value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a timestamp representing the column value, {@code null} if the
@@ -989,7 +989,7 @@
* Gets the value of a column specified by column index, as a {@code
* java.sql.Timestamp} value. The supplied Calendar is used when mapping
* the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @param cal
@@ -1005,7 +1005,7 @@
/**
* Gets the value of a column specified by column name, as a {@code
* java.sql.Timestamp} value.
- *
+ *
* @param columnName
* the name of the column to read.
* @return a timestamp representing the column value, {@code null} if the
@@ -1019,7 +1019,7 @@
* Gets the value of a column specified by column name, as a {@code
* java.sql.Timestamp} value. The supplied Calendar is used when mapping
* the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
- *
+ *
* @param columnName
* the name of the column to read.
* @param cal
@@ -1034,7 +1034,7 @@
/**
* Gets the type of the {@code ResultSet}.
- *
+ *
* @return The {@code ResultSet} type, one of:
* <ul>
* <li>{@code ResultSet.TYPE_FORWARD_ONLY}</li> <li>{@code
@@ -1049,7 +1049,7 @@
/**
* Gets the value of the column as an {@code InputStream} of unicode
* characters.
- *
+ *
* @deprecated Use {@link #getCharacterStream}.
* @param columnIndex
* the index of the column to read.
@@ -1064,7 +1064,7 @@
/**
* Gets the value of the column as an {@code InputStream} of Unicode
* characters.
- *
+ *
* @deprecated Use {@link #getCharacterStream}
* @param columnName
* the name of the column to read.
@@ -1079,7 +1079,7 @@
/**
* Gets the value of a column specified by column index as a {@code
* java.net.URL}.
- *
+ *
* @param columnIndex
* the index of the column to read.
* @return a URL. {@code null} if the column value is SQL {@code NULL}.
@@ -1091,7 +1091,7 @@
/**
* Gets the value of a column specified by column name as a {@code
* java.net.URL} object.
- *
+ *
* @param columnName
* the name of the column to read.
* @return the column vaule as a URL. {@code null} if the column value is SQL {@code NULL}.
@@ -1112,7 +1112,7 @@
* <p>
* An {@code SQLException} is generated if this method is called on a closed
* {@code ResultSet}.
- *
+ *
* @return an SQLWarning which is the first warning for this {@code
* ResultSet}. {@code null} if there are no warnings.
* @throws SQLException
@@ -1124,7 +1124,7 @@
* Insert the insert row into the {@code ResultSet} and into the underlying
* database. The cursor must be set to the Insert Row before this method is
* invoked.
- *
+ *
* @throws SQLException
* if a database error happens. Particular cases include the
* cursor not being on the Insert Row or if any columns in the
@@ -1135,7 +1135,7 @@
/**
* Gets if the cursor is after the last row of the {@code ResultSet}.
- *
+ *
* @return {@code true} if the cursor is after the last row in the {@code
* ResultSet}, {@code false} if the cursor is at any other position
* in the {@code ResultSet}.
@@ -1146,7 +1146,7 @@
/**
* Gets if the cursor is before the first row of the {@code ResultSet}.
- *
+ *
* @return {@code true} if the cursor is before the first row in the {@code
* ResultSet}, {@code false} if the cursor is at any other position
* in the {@code ResultSet}.
@@ -1157,7 +1157,7 @@
/**
* Gets if the cursor is on the first row of the {@code ResultSet}.
- *
+ *
* @return {@code true} if the cursor is on the first row in the {@code
* ResultSet}, {@code false} if the cursor is at any other position
* in the {@code ResultSet}.
@@ -1168,7 +1168,7 @@
/**
* Gets if the cursor is on the last row of the {@code ResultSet}
- *
+ *
* @return {@code true} if the cursor is on the last row in the {@code
* ResultSet}, {@code false} if the cursor is at any other position
* in the {@code ResultSet}.
@@ -1179,7 +1179,7 @@
/**
* Shifts the cursor position to the last row of the {@code ResultSet}.
- *
+ *
* @return {@code true} if the new position is in a legitimate row, {@code
* false} if the {@code ResultSet} contains no rows.
* @throws SQLException
@@ -1188,10 +1188,10 @@
public boolean last() throws SQLException;
/**
- * Moves the cursor to the remembered position, namely the
+ * Moves the cursor to the remembered position, namely the
* row that was the current row before a call to {@code moveToInsertRow}.
* This only applies if the cursor is on the Insert Row.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -1202,7 +1202,7 @@
* remembered and the cursor is positioned at the Insert Row. The columns in
* the Insert Row should be filled in with the appropriate update methods,
* before calling {@code insertRow} to insert the new row into the database.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -1225,7 +1225,7 @@
/**
* Relocates the cursor position to the preceding row in this {@code
* ResultSet}.
- *
+ *
* @return {@code true} if the new position is in a legitimate row, {@code
* false} if the cursor is now before the first row.
* @throws SQLException
@@ -1251,7 +1251,7 @@
* Moves the cursor position up or down by a specified number of rows. If
* the new position is beyond the start row (or end row), the cursor position is
* set before the first row (or, respectively, after the last row).
- *
+ *
* @param rows
* a number of rows to move the cursor - may be positive or
* negative
@@ -1265,7 +1265,7 @@
/**
* Indicates whether a row has been deleted. This method depends on whether
* the JDBC driver and database can detect deletions.
- *
+ *
* @return {@code true} if a row has been deleted and if deletions are
* detected, {@code false} otherwise.
* @throws SQLException
@@ -1277,7 +1277,7 @@
* Indicates whether the current row has had an insertion operation. This
* method depends on whether the JDBC driver and database can detect
* insertions.
- *
+ *
* @return {@code true} if a row has been inserted and if insertions are
* detected, {@code false} otherwise.
* @throws SQLException
@@ -1288,7 +1288,7 @@
/**
* Indicates whether the current row has been updated. This method depends
* on whether the JDBC driver and database can detect updates.
- *
+ *
* @return {@code true} if the current row has been updated and if updates
* can be detected, {@code false} otherwise.
* @throws SQLException
@@ -1300,7 +1300,7 @@
* Indicates which direction (forward/reverse) will be used to process the
* rows of this {@code ResultSet} object. This is treated as a hint by the
* JDBC driver.
- *
+ *
* @param direction
* can be {@code ResultSet.FETCH_FORWARD}, {@code
* ResultSet.FETCH_REVERSE}, or {@code ResultSet.FETCH_UNKNOWN}
@@ -1313,7 +1313,7 @@
* Indicates the number of rows to fetch from the database when extra rows
* are required for this {@code ResultSet}. This used as a hint to the JDBC
* driver.
- *
+ *
* @param rows
* the number of rows to fetch. {@code 0} implies that the JDBC
* driver can make its own decision about the fetch size. The
@@ -1328,7 +1328,7 @@
/**
* Updates a column specified by a column index with a {@code
* java.sql.Array} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1341,7 +1341,7 @@
/**
* Updates a column specified by a column name with a {@code java.sql.Array}
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1353,7 +1353,7 @@
/**
* Updates a column specified by a column index with an ASCII stream value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1368,7 +1368,7 @@
/**
* Updates a column specified by a column name with an Ascii stream value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1384,7 +1384,7 @@
/**
* Updates a column specified by a column index with a {@code
* java.sql.BigDecimal} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1398,7 +1398,7 @@
/**
* Updates a column specified by a column name with a {@code
* java.sql.BigDecimal} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1411,7 +1411,7 @@
/**
* Updates a column specified by a column index with a binary stream value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1426,7 +1426,7 @@
/**
* Updates a column specified by a column name with a binary stream value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1442,7 +1442,7 @@
/**
* Updates a column specified by a column index with a {@code java.sql.Blob}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1455,7 +1455,7 @@
/**
* Updates a column specified by a column name with a {@code java.sql.Blob}
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1468,7 +1468,7 @@
/**
* Updates a column specified by a column index with a {@code boolean}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1480,7 +1480,7 @@
/**
* Updates a column specified by a column name with a {@code boolean} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1492,7 +1492,7 @@
/**
* Updates a column specified by a column index with a {@code byte} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1504,7 +1504,7 @@
/**
* Updates a column specified by a column name with a {@code byte} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1517,7 +1517,7 @@
/**
* Updates a column specified by a column index with a {@code byte} array
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1529,7 +1529,7 @@
/**
* Updates a column specified by a column name with a byte array value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1542,7 +1542,7 @@
/**
* Updates a column specified by a column index with a character stream
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1558,7 +1558,7 @@
/**
* Updates a column specified by a column name with a character stream
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param reader
@@ -1574,7 +1574,7 @@
/**
* Updates a column specified by a column index with a {@code java.sql.Clob}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1587,7 +1587,7 @@
/**
* Updates a column specified by a column name with a {@code java.sql.Clob}
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1600,7 +1600,7 @@
/**
* Updates a column specified by a column index with a {@code java.sql.Date}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1613,7 +1613,7 @@
/**
* Updates a column specified by a column name with a {@code java.sql.Date}
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1625,7 +1625,7 @@
/**
* Updates a column specified by a column index with a {@code double} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1637,7 +1637,7 @@
/**
* Updates a column specified by a column name with a {@code double} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1649,7 +1649,7 @@
/**
* Updates a column specified by a column index with a {@code float} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1661,7 +1661,7 @@
/**
* Updates a column specified by a column name with a {@code float} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1673,7 +1673,7 @@
/**
* Updates a column specified by a column index with an {@code int} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1685,7 +1685,7 @@
/**
* Updates a column specified by a column name with an {@code int} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1697,7 +1697,7 @@
/**
* Updates a column specified by a column index with a {@code long} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1709,7 +1709,7 @@
/**
* Updates a column specified by a column name with a {@code long} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1721,7 +1721,7 @@
/**
* Updates a column specified by a column index with a {@code null} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @throws SQLException
@@ -1731,7 +1731,7 @@
/**
* Updates a column specified by a column name with a {@code null} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @throws SQLException
@@ -1742,7 +1742,7 @@
/**
* Updates a column specified by a column index with an {@code Object}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1755,7 +1755,7 @@
/**
* Updates a column specified by a column index with an {@code Object}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1772,7 +1772,7 @@
/**
* Updates a column specified by a column name with an {@code Object} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1784,7 +1784,7 @@
/**
* Updates a column specified by a column name with an {@code Object} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1802,7 +1802,7 @@
/**
* Updates a column specified by a column index with a {@code java.sql.Ref}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1815,7 +1815,7 @@
/**
* Updates a column specified by a column name with a {@code java.sql.Ref}
* value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1828,7 +1828,7 @@
/**
* Updates the database with the new contents of the current row of this
* {@code ResultSet} object.
- *
+ *
* @throws SQLException
* if a database error happens.
*/
@@ -1836,7 +1836,7 @@
/**
* Updates a column specified by a column index with a {@code short} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1848,7 +1848,7 @@
/**
* Updates a column specified by a column name with a {@code short} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1860,7 +1860,7 @@
/**
* Updates a column specified by a column index with a {@code String} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1872,7 +1872,7 @@
/**
* Updates a column specified by a column name with a {@code String} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1884,7 +1884,7 @@
/**
* Updates a column specified by a column index with a {@code Time} value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1896,7 +1896,7 @@
/**
* Updates a column specified by a column name with a {@code Time} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1909,7 +1909,7 @@
/**
* Updates a column specified by a column index with a {@code Timestamp}
* value.
- *
+ *
* @param columnIndex
* the index of the column to update.
* @param x
@@ -1922,7 +1922,7 @@
/**
* Updates a column specified by column name with a {@code Timestamp} value.
- *
+ *
* @param columnName
* the name of the column to update.
* @param x
@@ -1936,7 +1936,7 @@
/**
* Determines whether the last column read from this {@code ResultSet}
* contained SQL {@code NULL}.
- *
+ *
* @return {@code {@code true} if the last column contained SQL {@code
* NULL}, {@code false} otherwise
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/ResultSetMetaData.java b/luni/src/main/java/java/sql/ResultSetMetaData.java
index 097093f..737d2f3 100644
--- a/luni/src/main/java/java/sql/ResultSetMetaData.java
+++ b/luni/src/main/java/java/sql/ResultSetMetaData.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
/**
* Returns the title of an indexed column's catalog.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the catalog title.
@@ -51,7 +51,7 @@
/**
* Returns the fully-qualified type of the class that is produced when
* invoking {@code ResultSet.getObject} to recover this column's value.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the fully-qualified class name.
@@ -63,7 +63,7 @@
/**
* Returns number of columns contained in the associated result set.
- *
+ *
* @return the column count.
* @throws SQLException
* if there is a database error.
@@ -73,7 +73,7 @@
/**
* Returns the indexed column's standard maximum width, expressed in number
* of characters.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the column's max width.
@@ -85,7 +85,7 @@
/**
* Returns a recommended title for the indexed column, to be used when the
* title needs to be displayed.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the column's title.
@@ -96,7 +96,7 @@
/**
* Returns the title of the indexed column.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the column title.
@@ -107,7 +107,7 @@
/**
* Returns the type of the indexed column as SQL type code.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the column type code.
@@ -119,7 +119,7 @@
/**
* Returns the type name of the indexed column.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the type name.
@@ -130,7 +130,7 @@
/**
* Returns the decimal precision of the indexed column.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the precision.
@@ -142,7 +142,7 @@
/**
* Returns the number of digits to the right of the decimal point of the
* indexed column.
- *
+ *
* @param column
* the column index, starting at 1.
* @return number of decimal places.
@@ -153,7 +153,7 @@
/**
* Returns the name of the indexed columns schema.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the name of the columns schema.
@@ -164,7 +164,7 @@
/**
* Returns the title of the indexed columns table.
- *
+ *
* @param column
* the column index, starting at 1.
* @return the table title.
@@ -176,7 +176,7 @@
/**
* Returns an indication of whether the indexed column is automatically
* incremented and is therefore read-only.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if it is automatically numbered, {@code false}
@@ -189,7 +189,7 @@
/**
* Returns an indication of whether the case of the indexed column is
* important.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if case matters, {@code false} otherwise.
@@ -200,7 +200,7 @@
/**
* Returns whether the indexed column contains a monetary amount.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if it is a monetary value, {@code false} otherwise.
@@ -212,7 +212,7 @@
/**
* Returns an indication of whether writing to the indexed column is
* guaranteed to be successful.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if the write is guaranteed, {@code false} otherwise.
@@ -223,7 +223,7 @@
/**
* Returns whether the indexed column is nullable.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if it is nullable, {@code false} otherwise.
@@ -235,7 +235,7 @@
/**
* Returns an indication of whether writing to the indexed column is
* guaranteed to be unsuccessful.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if the column is read-only, {@code false} otherwise.
@@ -246,7 +246,7 @@
/**
* Returns an indication of whether the indexed column is searchable.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if the indexed column is searchable, {@code false}
@@ -259,7 +259,7 @@
/**
* Returns an indication of whether the values contained in the indexed
* column are signed.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if they are signed, {@code false} otherwise.
@@ -271,7 +271,7 @@
/**
* Returns an indication of whether writing to the indexed column is
* possible.
- *
+ *
* @param column
* the column index, starting at 1.
* @return {@code true} if it is possible to write, {@code false} otherwise.
diff --git a/luni/src/main/java/java/sql/SQLData.java b/luni/src/main/java/java/sql/SQLData.java
index f7dba05..a22c07c 100644
--- a/luni/src/main/java/java/sql/SQLData.java
+++ b/luni/src/main/java/java/sql/SQLData.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@
* Gets the SQL name of the <i>User Defined Type</i> (UDT) that this object
* represents. This method, usually invoked by the JDBC driver, retrieves
* the name of the UDT instance associated with this {@code SQLData} object.
- *
+ *
* @return a string with UDT type name for this object mapping, passed to
* {@code readSQL} when the object was created.
* @throws SQLException
@@ -102,7 +102,7 @@
* Write a single data element for a distinct type. For a structured type,
* write a value for each attribute of the the SQL type.</li>
* </ul>
- *
+ *
* @param stream
* the {@code SQLOutput} stream to use to write out the data for
* the custom mapping.
diff --git a/luni/src/main/java/java/sql/SQLException.java b/luni/src/main/java/java/sql/SQLException.java
index 5022eb0..fc69d55 100644
--- a/luni/src/main/java/java/sql/SQLException.java
+++ b/luni/src/main/java/java/sql/SQLException.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
* <li>A chain to a next {@code Exception}, if relevant, which can give access
* to additional error information.</li>
* </ul>
- *
+ *
* @see DatabaseMetaData
*/
public class SQLException extends Exception implements Serializable {
@@ -64,7 +64,7 @@
* Creates an {@code SQLException} object. The reason string is set to the given
* reason string, the {@code SQLState} string is set to {@code null} and the error code is
* set to 0.
- *
+ *
* @param theReason
* the string to use as the Reason string
*/
@@ -76,7 +76,7 @@
* Creates an {@code SQLException} object. The reason string is set to the
* given reason string, the {@code SQLState} string is set to the given
* {@code SQLState} string and the error code is set to 0.
- *
+ *
* @param theReason
* the string to use as the reason string.
* @param theSQLState
@@ -91,7 +91,7 @@
* given reason string, the {@code SQLState} string is set to the given
* {@code SQLState} string and the error code is set to the given error code
* value.
- *
+ *
* @param theReason
* the string to use as the reason string.
* @param theSQLState
@@ -107,7 +107,7 @@
/**
* Returns the integer error code for this {@code SQLException}.
- *
+ *
* @return The integer error code for this {@code SQLException}. The meaning
* of the code is specific to the vendor of the database.
*/
@@ -118,7 +118,7 @@
/**
* Retrieves the {@code SQLException} chained to this {@code SQLException},
* if any.
- *
+ *
* @return The {@code SQLException} chained to this {@code SQLException}.
* {@code null} if there is no {@code SQLException} chained to this
* {@code SQLException}.
@@ -130,7 +130,7 @@
/**
* Retrieves the {@code SQLState} description string for this {@code
* SQLException} object.
- *
+ *
* @return The {@code SQLState} string for this {@code SQLException} object.
* This is an error description string which follows either the SQL
* 99 conventions or the X/OPEN {@code SQLstate} conventions. The
@@ -146,12 +146,12 @@
/**
* Adds the SQLException to the end of this {@code SQLException} chain.
- *
+ *
* @param ex
* the new {@code SQLException} to be added to the end of the
* chain.
*/
- public void setNextException(SQLException ex) {
+ public void setNextException(SQLException ex) {
if (next != null) {
next.setNextException(ex);
} else {
diff --git a/luni/src/main/java/java/sql/SQLInput.java b/luni/src/main/java/java/sql/SQLInput.java
index cd77a91..d1d0869 100644
--- a/luni/src/main/java/java/sql/SQLInput.java
+++ b/luni/src/main/java/java/sql/SQLInput.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,9 +47,9 @@
/**
* Returns the next attribute in the stream in the form of a {@code String}.
- *
+ *
* @return the next attribute. {@code null} if the value is SQL {@code NULL}.
- *
+ *
* @throws SQLException
* if there is a database error.
*/
@@ -58,7 +58,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code boolean}
* .
- *
+ *
* @return the next attribute as a {@code boolean}. {@code false} if the
* value is SQL {@code NULL}.
* @throws SQLException
@@ -68,7 +68,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code byte}.
- *
+ *
* @return the next attribute as a {@code byte}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -78,7 +78,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code short}.
- *
+ *
* @return the next attribute as a {@code short}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -88,7 +88,7 @@
/**
* Returns the next attribute in the stream in the form of an {@code int}.
- *
+ *
* @return the next attribute as an {@code int}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -98,7 +98,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code long}.
- *
+ *
* @return the next attribute as a {@code long}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -108,7 +108,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code float}.
- *
+ *
* @return the next attribute as a {@code float}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -118,7 +118,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code double}.
- *
+ *
* @return the next attribute as a {@code double}. 0 if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -129,7 +129,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.math.BigDecimal}.
- *
+ *
* @return the attribute as a {@code java.math.BigDecimal}. {@code null} if
* the read returns SQL {@code NULL}.
* @throws SQLException
@@ -140,7 +140,7 @@
/**
* Returns the next attribute in the stream in the form of a byte array.
- *
+ *
* @return the attribute as a byte array. {@code null} if the read returns
* SQL {@code NULL}.
* @throws SQLException
@@ -151,7 +151,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Date}.
- *
+ *
* @return the next attribute as a {@code java.sql.Date}. {@code null} if
* the value is SQL {@code NULL}.
* @throws SQLException
@@ -163,7 +163,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Time}.
- *
+ *
* @return the attribute as a {@code java.sql.Time}. {@code null} if the
* read returns SQL {@code NULL}.
* @throws SQLException
@@ -175,7 +175,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Timestamp}.
- *
+ *
* @return the attribute as a {@code java.sql.Timestamp}. {@code null} if
* the read returns SQL {@code NULL}.
* @throws SQLException
@@ -187,7 +187,7 @@
/**
* Returns the next attribute in the stream in the form of a Unicode
* character stream embodied as a {@code java.io.Reader}.
- *
+ *
* @return the next attribute as a {@code java.io.Reader}. {@code null} if
* the value is SQL {@code NULL}.
* @throws SQLException
@@ -199,7 +199,7 @@
/**
* Returns the next attribute in the stream in the form of an ASCII
* character stream embodied as a {@code java.io.InputStream}.
- *
+ *
* @return the next attribute as a {@code java.io.InputStream}. {@code null}
* if the value is SQL {@code NULL}.
* @throws SQLException
@@ -211,7 +211,7 @@
/**
* Returns the next attribute in the stream in the form of a stream of bytes
* embodied as a {@code java.io.InputStream}.
- *
+ *
* @return the next attribute as a {@code java.io.InputStream}. {@code null}
* if the value is SQL {@code NULL}.
* @throws SQLException
@@ -234,7 +234,7 @@
* type, the driver creates an object for the relevant type and invokes the
* method {@code SQLData.readSQL} on it, which reads supplementary data from
* the stream using whichever protocol is defined for that method.
- *
+ *
* @return the next attribute as an Object. {@code null} if the value is SQL
* {@code NULL}.
* @throws SQLException
@@ -245,7 +245,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Ref}.
- *
+ *
* @return the next attribute as a {@code java.sql.Ref}. {@code null} if the
* value is SQL {@code NULL}.
* @throws SQLException
@@ -257,7 +257,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Blob}.
- *
+ *
* @return the next attribute as a {@code java.sql.Blob}. {@code null} if
* the value is SQL {@code NULL}.
* @throws SQLException
@@ -268,7 +268,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Clob}.
- *
+ *
* @return the next attribute as a {@code java.sql.Clob}. {@code null} if
* the value is SQL {@code NULL}.
* @throws SQLException
@@ -280,7 +280,7 @@
/**
* Returns the next attribute in the stream in the form of a {@code
* java.sql.Array}.
- *
+ *
* @return the next attribute as an {@code Array}. {@code null} if the value
* is SQL {@code NULL}.
* @throws SQLException
@@ -291,7 +291,7 @@
/**
* Reports whether the last value read was SQL {@code NULL}.
- *
+ *
* @return {@code true} if the last value read was SQL {@code NULL}, {@code
* false} otherwise.
* @throws SQLException
@@ -302,7 +302,7 @@
/**
* Reads the next attribute in the stream (SQL DATALINK value) and returns
* it as a {@code java.net.URL} object.
- *
+ *
* @return the next attribute as a {@code java.net.URL}. {@code null} if the
* value is SQL {@code NULL}.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/SQLOutput.java b/luni/src/main/java/java/sql/SQLOutput.java
index 6710d4f..44415fc 100644
--- a/luni/src/main/java/java/sql/SQLOutput.java
+++ b/luni/src/main/java/java/sql/SQLOutput.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,7 +42,7 @@
/**
* Write a {@code String} value into the output stream.
- *
+ *
* @param theString
* the {@code String} to write.
* @throws SQLException
@@ -52,7 +52,7 @@
/**
* Write a {@code boolean} value into the output stream.
- *
+ *
* @param theFlag
* the {@code boolean} value to write.
* @throws SQLException
@@ -62,7 +62,7 @@
/**
* Write a {@code byte} value into the output stream.
- *
+ *
* @param theByte
* the {@code byte} value to write.
* @throws SQLException
@@ -72,7 +72,7 @@
/**
* Write a {@code short} value into the output stream.
- *
+ *
* @param theShort
* the {@code short} value to write.
* @throws SQLException
@@ -82,7 +82,7 @@
/**
* Write an {@code int} value into the output stream.
- *
+ *
* @param theInt
* the {@code int} value to write.
* @throws SQLException
@@ -92,7 +92,7 @@
/**
* Write a {@code long} value into the output stream.
- *
+ *
* @param theLong
* the {@code long} value to write.
* @throws SQLException
@@ -102,7 +102,7 @@
/**
* Write a {@code float} value into the output stream.
- *
+ *
* @param theFloat
* the {@code float} value to write.
* @throws SQLException
@@ -112,7 +112,7 @@
/**
* Write a {@code double} value into the output stream.
- *
+ *
* @param theDouble
* the {@code double} value to write.
* @throws SQLException
@@ -122,7 +122,7 @@
/**
* Write a {@code java.math.BigDecimal} value into the output stream.
- *
+ *
* @param theBigDecimal
* the {@code BigDecimal} value to write.
* @throws SQLException
@@ -132,7 +132,7 @@
/**
* Write an array of bytes into the output stream.
- *
+ *
* @param theBytes
* the array of bytes to write.
* @throws SQLException
@@ -142,7 +142,7 @@
/**
* Write a {@code java.sql.Date} value into the output stream.
- *
+ *
* @param theDate
* the {@code Date} value to write.
* @throws SQLException
@@ -153,7 +153,7 @@
/**
* Write a {@code java.sql.Time} value into the output stream.
- *
+ *
* @param theTime
* the {@code Time} value to write.
* @throws SQLException
@@ -164,7 +164,7 @@
/**
* Write a {@code java.sql.Timestamp} value into the output stream.
- *
+ *
* @param theTimestamp
* the {@code Timestamp} value to write.
* @throws SQLException
@@ -175,7 +175,7 @@
/**
* Write a stream of unicode characters into the output stream.
- *
+ *
* @param theStream
* the stream of unicode characters to write, as a {@code
* java.io.Reader} object.
@@ -186,7 +186,7 @@
/**
* Write a stream of ASCII characters into the output stream.
- *
+ *
* @param theStream
* the stream of ASCII characters to write, as a {@code
* java.io.InputStream} object
@@ -197,7 +197,7 @@
/**
* Write a stream of uninterpreted bytes into the output stream.
- *
+ *
* @param theStream
* the stream of bytes to write, as a {@code java.io.InputStream}
* object
@@ -216,7 +216,7 @@
* SQLOutput writer methods for each attribute, in order. The order of the
* attributes is the order they are listed in the SQL definition of the User
* Defined Type.
- *
+ *
* @param theObject
* the {@code SQLData} object to write.
* @throws SQLException
@@ -227,7 +227,7 @@
/**
* Write an SQL {@code Ref} value into the output stream.
- *
+ *
* @param theRef
* the {@code java.sql.Ref} object to write.
* @throws SQLException
@@ -238,7 +238,7 @@
/**
* Write an SQL {@code Blob} value into the output stream.
- *
+ *
* @param theBlob
* the {@code java.sql.Blob} object to write.
* @throws SQLException
@@ -249,7 +249,7 @@
/**
* Write an SQL {@code Clob} value into the output stream.
- *
+ *
* @param theClob
* the {@code java.sql.Clob} object to write.
* @throws SQLException
@@ -260,7 +260,7 @@
/**
* Write an SQL {@code Struct} value into the output stream.
- *
+ *
* @param theStruct
* the {@code java.sql.Struct} object to write.
* @throws SQLException
@@ -271,7 +271,7 @@
/**
* Write an SQL {@code Array} value into the output stream.
- *
+ *
* @param theArray
* the {@code java.sql.Array} object to write.
* @throws SQLException
@@ -282,7 +282,7 @@
/**
* Write an SQL {@code DATALINK} value into the output stream.
- *
+ *
* @param theURL
* the datalink value as a {@code java.net.URL} to write.
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/SQLPermission.java b/luni/src/main/java/java/sql/SQLPermission.java
index 85dff72..c254929 100644
--- a/luni/src/main/java/java/sql/SQLPermission.java
+++ b/luni/src/main/java/java/sql/SQLPermission.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
* the {@code DriverManager.setLogStream} method. This is a potentially
* dangerous operation since the logging stream can contain sensitive
* information such as usernames and passwords.
- *
+ *
* @see DriverManager
*/
public final class SQLPermission extends BasicPermission implements Guard,
@@ -41,7 +41,7 @@
/**
* Creates a new {@code SQLPermission} object with the specified name.
- *
+ *
* @param name
* the name to use for this {@code SQLPermission}.
*/
@@ -51,7 +51,7 @@
/**
* Creates a new {@code SQLPermission} object with the specified name.
- *
+ *
* @param name
* is the name of the {@code SQLPermission}. Currently only
* {@code "setLog"} is allowed.
diff --git a/luni/src/main/java/java/sql/SQLWarning.java b/luni/src/main/java/java/sql/SQLWarning.java
index 9089984..4ed3f16 100644
--- a/luni/src/main/java/java/sql/SQLWarning.java
+++ b/luni/src/main/java/java/sql/SQLWarning.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
* Creates an {@code SQLWarning} object. The reason string is set to the
* given reason string, the {@code SQLState} string is set to {@code null}
* and the error code is set to 0.
- *
+ *
* @param theReason
* the reason why this warning is issued.
*/
@@ -51,7 +51,7 @@
* Creates an {@code SQLWarning} object. The reason string is set to the
* given reason string, the {@code SQLState} string is set to the given
* {@code SQLState} string and the error code is set to 0.
- *
+ *
* @param theReason
* the reason why this warning is issued.
* @param theSQLState
@@ -66,7 +66,7 @@
* given reason string, the {@code SQLState} string is set to the given
* {@code SQLState} string and the error code is set to the given error code
* value.
- *
+ *
* @param theReason
* the reason why this warning is issued.
* @param theSQLState
@@ -80,7 +80,7 @@
/**
* Gets the next {@code SQLWarning} chained to this {@code SQLWarning} object.
- *
+ *
* @return the {@code SQLWarning} chained to this {@code SQLWarning}.
* {@code null} if no {@code SQLWarning} is chained to this {@code
* SQLWarning}.
@@ -98,7 +98,7 @@
/**
* Chains a supplied {@code SQLWarning} to this {@code SQLWarning}.
- *
+ *
* @param w
* the {@code SQLWarning} linked to this {@code SQLWarning}.
*/
diff --git a/luni/src/main/java/java/sql/Savepoint.java b/luni/src/main/java/java/sql/Savepoint.java
index 0c65515..82574a1 100644
--- a/luni/src/main/java/java/sql/Savepoint.java
+++ b/luni/src/main/java/java/sql/Savepoint.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
/**
* Returns the constructed ID for this savepoint.
- *
+ *
* @return the ID for this savepoint.
* @throws SQLException
* if an error occurrs accessing the database.
@@ -36,7 +36,7 @@
/**
* Returns the name for this savepoint.
- *
+ *
* @return the name of this savepoint.
* @throws SQLException
* if an error occurrs accessing the database.
diff --git a/luni/src/main/java/java/sql/Statement.java b/luni/src/main/java/java/sql/Statement.java
index 6f2a1ed..4156601 100644
--- a/luni/src/main/java/java/sql/Statement.java
+++ b/luni/src/main/java/java/sql/Statement.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -97,7 +97,7 @@
* driver support aborting an SQL statement in flight. This method can be
* used by one thread to stop a statement that is executed on another
* thread.
- *
+ *
* @throws SQLException
* if an error occurs accessing the database.
*/
@@ -105,7 +105,7 @@
/**
* Clears the current list of SQL commands for this statement.
- *
+ *
* @throws SQLException
* if an error occurs accessing the database or the database
* does not support batch updates.
@@ -114,7 +114,7 @@
/**
* Clears all {@code SQLWarnings} from this statement.
- *
+ *
* @throws SQLException
* if an error occurs accessing the database.
*/
@@ -235,7 +235,7 @@
* driver continues processing, the array of results returned contains the
* same number of elements as there are commands in the batch, with a
* minimum of one of the elements having the {@code EXECUTE_FAILED} value.
- *
+ *
* @return an array of update counts, with one entry for each command in the
* batch. The elements are ordered according to the order in which
* the commands were added to the batch.
@@ -258,7 +258,7 @@
/**
* Executes a supplied SQL statement. Returns a single {@code ResultSet}.
- *
+ *
* @param sql
* an SQL statement to execute. Typically a {@code SELECT}
* statement
@@ -274,7 +274,7 @@
* Executes the supplied SQL statement. The statement may be an {@code
* INSERT}, {@code UPDATE} or {@code DELETE} statement or a statement which
* returns nothing.
- *
+ *
* @param sql
* an SQL statement to execute - an SQL {@code INSERT}, {@code
* UPDATE}, {@code DELETE} or a statement which returns nothing
@@ -289,7 +289,7 @@
/**
* Executes the supplied SQL statement. This method allows control of
* whether auto-generated Keys should be made available for retrieval.
- *
+ *
* @param sql
* an SQL statement to execute - an SQL {@code INSERT}, {@code
* UPDATE}, {@code DELETE} or a statement which does not return
@@ -311,7 +311,7 @@
/**
* Executes the supplied SQL statement. This method allows retrieval of auto
* generated keys specified by the supplied array of column indexes.
- *
+ *
* @param sql
* an SQL statement to execute - an SQL {@code INSERT}, {@code
* UPDATE}, {@code DELETE} or a statement which returns nothing
@@ -331,7 +331,7 @@
/**
* Executes the supplied SQL statement. This method allows retrieval of auto
* generated keys specified by the supplied array of column names.
- *
+ *
* @param sql
* an SQL statement to execute - an SQL {@code INSERT}, {@code
* UPDATE}, {@code DELETE} or a statement which returns nothing
@@ -350,7 +350,7 @@
/**
* Gets the {@code Connection} object which created this statement.
- *
+ *
* @return the {@code Connection} through which this statement is
* transmitted to the database.
* @throws SQLException
@@ -361,7 +361,7 @@
/**
* Gets the default direction for fetching rows for {@code ResultSet}s
* generated from this statement.
- *
+ *
* @return the default fetch direction, one of:
* <ul>
* <li>ResultSet.FETCH_FORWARD</li> <li>ResultSet.FETCH_REVERSE</li>
@@ -375,7 +375,7 @@
/**
* Gets the default number of rows for a fetch for the {@code ResultSet}
* objects returned from this statement.
- *
+ *
* @return the default fetch size for {@code ResultSet}s produced by this
* statement.
* @throws SQLException
@@ -385,7 +385,7 @@
/**
* Returns auto generated keys created by executing this statement.
- *
+ *
* @return a {@code ResultSet} containing the auto generated keys - empty if
* no keys are generated by this statement.
* @throws SQLException
@@ -400,7 +400,7 @@
* {@code LONGVARBINARY}, {@code CHAR}, {@code VARCHAR}, and {@code
* LONGVARCHAR} types. Any data exceeding the maximum size is abandoned
* without announcement.
- *
+ *
* @return the current size limit, where {@code 0} means that there is no
* limit.
* @throws SQLException
@@ -412,7 +412,7 @@
* Gets the maximum number of rows that a {@code ResultSet} can contain when
* produced from this statement. If the limit is exceeded, the excess rows
* are discarded silently.
- *
+ *
* @return the current row limit, where {@code 0} means that there is no
* limit.
* @throws SQLException
@@ -424,7 +424,7 @@
* Moves to this statement's next result. Returns {@code true} if it is a
* {@code ResultSet}. Any current {@code ResultSet} objects previously
* obtained with {@code getResultSet()} are closed implicitly.
- *
+ *
* @return {@code true} if the next result is a {@code ResultSet}, {@code
* false} if the next result is not a {@code ResultSet} or if there
* are no more results. Note that if there is no more data, this
@@ -440,7 +440,7 @@
* result is a {@code ResultSet}. Any current {@code ResultSet} objects
* previously obtained with {@code getResultSet()} are handled as indicated
* by a supplied Flag parameter.
- *
+ *
* @param current
* a flag indicating what to do with existing {@code ResultSet}s.
* This parameter must be one of {@code
@@ -461,7 +461,7 @@
* Gets the timeout value for the statement's execution time. The JDBC
* driver will wait up to this value for the execution to complete - after
* the limit is exceeded an SQL {@code Exception} is thrown.
- *
+ *
* @return the current query timeout value, where {@code 0} indicates that
* there is no current timeout.
* @throws SQLException
@@ -471,7 +471,7 @@
/**
* Gets the current result. Should only be called once per result.
- *
+ *
* @return the {@code ResultSet} for the current result. {@code null} if the
* result is an update count or if there are no more results.
* @throws SQLException
@@ -482,7 +482,7 @@
/**
* Gets the concurrency setting for {@code ResultSet} objects generated by
* this statement.
- *
+ *
* @return {@code ResultSet.CONCUR_READ_ONLY} or {@code
* ResultSet.CONCUR_UPDATABLE}.
* @throws SQLException
@@ -493,7 +493,7 @@
/**
* Gets the cursor hold setting for {@code ResultSet} objects generated by
* this statement.
- *
+ *
* @return {@code ResultSet.HOLD_CURSORS_OVER_COMMIT} or {@code
* ResultSet.CLOSE_CURSORS_AT_COMMIT}
* @throws SQLException
@@ -504,7 +504,7 @@
/**
* Gets the {@code ResultSet} type setting for {@code ResultSet}s derived
* from this statement.
- *
+ *
* @return {@code ResultSet.TYPE_FORWARD_ONLY} for a {@code ResultSet} where
* the cursor can only move forwards, {@code
* ResultSet.TYPE_SCROLL_INSENSITIVE} for a {@code ResultSet} which
@@ -519,7 +519,7 @@
/**
* Gets an update count for the current result if it is not a {@code
* ResultSet}.
- *
+ *
* @return the current result as an update count. {@code -1} if the current
* result is a {@code ResultSet} or if there are no more results.
* @throws SQLException
@@ -581,7 +581,7 @@
* Sets the fetch direction - a hint to the JDBC driver about the direction
* of processing of rows in {@code ResultSet}s created by this statement.
* The default fetch direction is {@code FETCH_FORWARD}.
- *
+ *
* @param direction
* which fetch direction to use. This parameter should be one of
* <ul>
@@ -599,7 +599,7 @@
* Sets the fetch size. This is a hint to the JDBC driver about how many
* rows should be fetched from the database when more are required by
* application processing.
- *
+ *
* @param rows
* the number of rows that should be fetched. {@code 0} tells the driver
* to ignore the hint. Should be less than {@code getMaxRows} for
@@ -616,7 +616,7 @@
* {@code VARBINARY}, {@code LONGVARBINARY}, {@code CHAR}, {@code VARCHAR},
* and {@code LONGVARCHAR} fields. Any data exceeding the maximum size is
* abandoned without announcement.
- *
+ *
* @param max
* the maximum field size in bytes. {@code 0} means "no limit".
* @throws SQLException
@@ -629,7 +629,7 @@
* Sets the maximum number of rows that any {@code ResultSet} can contain.
* If the number of rows exceeds this value, the additional rows are
* silently discarded.
- *
+ *
* @param max
* the maximum number of rows. {@code 0} means "no limit".
* @throws SQLException
@@ -642,7 +642,7 @@
* Sets the timeout, in seconds, for queries - how long the driver will
* allow for completion of a statement execution. If the timeout is
* exceeded, the query will throw an {@code SQLException}.
- *
+ *
* @param seconds
* timeout in seconds. 0 means no timeout ("wait forever")
* @throws SQLException
diff --git a/luni/src/main/java/java/sql/Struct.java b/luni/src/main/java/java/sql/Struct.java
index 4d94d49..af0d8d3 100644
--- a/luni/src/main/java/java/sql/Struct.java
+++ b/luni/src/main/java/java/sql/Struct.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
import java.util.Map;
/**
- * An interface which provides facilities for manipulating an SQL structured type
+ * An interface which provides facilities for manipulating an SQL structured type
* as a Java object. The {@code Struct} object has a value for each attribute of the SQL structured
* type.
*/
@@ -29,7 +29,7 @@
/**
* Gets the SQL Type name of the SQL structured type that this {@code
* Struct} represents.
- *
+ *
* @return the fully qualified name of SQL structured type.
* @throws SQLException
* if a database error occurs.
@@ -42,7 +42,7 @@
* customized type mappings. Where there is no entry in the type mapping
* which matches this structured type, the JDBC driver uses the standard
* mapping.
- *
+ *
* @return an {@code Object} array containing the ordered attributes.
* @throws SQLException
* if a database error occurs.
@@ -56,7 +56,7 @@
* case where there is no entry in the type mapping which matches this
* structured type, the JDBC driver uses the default mapping. The {@code
* Connection} type map is <i>never</i> utilized by this method.
- *
+ *
* @param theMap
* a Map describing how SQL Type names are mapped to classes.
* @return an Object array containing the ordered attributes,.
diff --git a/luni/src/main/java/java/sql/Time.java b/luni/src/main/java/java/sql/Time.java
index c2e55cf..bccce68 100644
--- a/luni/src/main/java/java/sql/Time.java
+++ b/luni/src/main/java/java/sql/Time.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
import java.util.Date;
/**
- * Java representation of an SQL {@code TIME} value. Provides utilities to
+ * Java representation of an SQL {@code TIME} value. Provides utilities to
* format and parse the time's representation as a String in JDBC escape format.
*/
public class Time extends Date {
@@ -56,7 +56,7 @@
/**
* Constructs a {@code Time} object using a supplied time specified in
* milliseconds.
- *
+ *
* @param theTime
* a {@code Time} specified in milliseconds since the
* <i>Epoch</i> (January 1st 1970, 00:00:00.000).
@@ -163,7 +163,7 @@
/**
* Sets the time for this {@code Time} object to the supplied milliseconds
* value.
- *
+ *
* @param time
* A time value expressed as milliseconds since the <i>Epoch</i>.
* Negative values are milliseconds before the Epoch. The Epoch
@@ -177,7 +177,7 @@
/**
* Formats the {@code Time} as a String in JDBC escape format: {@code
* hh:mm:ss}.
- *
+ *
* @return A String representing the {@code Time} value in JDBC escape
* format: {@code HH:mm:ss}
*/
@@ -194,17 +194,17 @@
return sb.toString();
}
- private static final String PADDING = "00";
+ private static final String PADDING = "00";
- /*
- * Private method to format the time
- */
- private void format(int date, int digits, StringBuilder sb) {
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
String str = String.valueOf(date);
if (digits - str.length() > 0) {
sb.append(PADDING.substring(0, digits - str.length()));
}
- sb.append(str);
+ sb.append(str);
}
/**
diff --git a/luni/src/main/java/java/sql/Timestamp.java b/luni/src/main/java/java/sql/Timestamp.java
index 9f5ef31..c2500c9 100644
--- a/luni/src/main/java/java/sql/Timestamp.java
+++ b/luni/src/main/java/java/sql/Timestamp.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -90,7 +90,7 @@
/**
* Returns a {@code Timestamp} object corresponding to the time represented
* by a supplied time value.
- *
+ *
* @param theTime
* a time value in the format of milliseconds since the Epoch
* (January 1 1970 00:00:00.000 GMT).
@@ -107,7 +107,7 @@
/**
* Returns {@code true} if this timestamp object is later than the supplied
* timestamp, otherwise returns {@code false}.
- *
+ *
* @param theTimestamp
* the timestamp to compare with this timestamp object.
* @return {@code true} if this {@code Timestamp} object is later than the
@@ -139,7 +139,7 @@
/**
* Returns {@code true} if this {@code Timestamp} object is earlier than the
* supplied timestamp, otherwise returns {@code false}.
- *
+ *
* @param theTimestamp
* the timestamp to compare with this {@code Timestamp} object.
* @return {@code true} if this {@code Timestamp} object is earlier than the
@@ -171,7 +171,7 @@
/**
* Compares this {@code Timestamp} object with a supplied {@code Timestamp}
* object.
- *
+ *
* @param theObject
* the timestamp to compare with this {@code Timestamp} object,
* passed as an {@code Object}.
@@ -199,7 +199,7 @@
/**
* Compares this {@code Timestamp} object with a supplied {@code Timestamp}
* object.
- *
+ *
* @param theTimestamp
* the timestamp to compare with this {@code Timestamp} object,
* passed in as a {@code Timestamp}.
@@ -231,7 +231,7 @@
/**
* Tests to see if this timestamp is equal to a supplied object.
- *
+ *
* @param theObject
* the object to which this timestamp is compared.
* @return {@code true} if this {@code Timestamp} object is equal to the
@@ -249,7 +249,7 @@
/**
* Tests to see if this timestamp is equal to a supplied timestamp.
- *
+ *
* @param theTimestamp
* the timestamp to compare with this {@code Timestamp} object,
* passed as an {@code Object}.
@@ -266,7 +266,7 @@
/**
* Gets this {@code Timestamp}'s nanosecond value
- *
+ *
* @return The timestamp's nanosecond value, an integer between 0 and
* 999,999,999.
*/
@@ -318,7 +318,7 @@
public void setTime(long theTime) {
setTimeImpl(theTime);
}
-
+
private void setTimeImpl(long theTime) {
/*
* Deal with the nanoseconds value. The supplied time is in milliseconds -
@@ -343,7 +343,7 @@
/**
* Returns the timestamp formatted as a String in the JDBC Timestamp Escape
* format, which is {@code "yyyy-mm-dd hh:mm:ss.nnnnnnnnn"}.
- *
+ *
* @return A string representing the instant defined by the {@code
* Timestamp}, in JDBC Timestamp escape format.
*/
@@ -378,22 +378,22 @@
private static final String PADDING = "000000000";
- /*
- * Private method to format the time
- */
- private void format(int date, int digits, StringBuilder sb) {
+ /*
+ * Private method to format the time
+ */
+ private void format(int date, int digits, StringBuilder sb) {
String str = String.valueOf(date);
if (digits - str.length() > 0) {
sb.append(PADDING.substring(0, digits - str.length()));
}
- sb.append(str);
+ sb.append(str);
}
/**
* Creates a {@code Timestamp} object with a time value equal to the time
* specified by a supplied String holding the time in JDBC timestamp escape
* format, which is {@code "yyyy-mm-dd hh:mm:ss.nnnnnnnnn}"
- *
+ *
* @param s
* the {@code String} containing a time in JDBC timestamp escape
* format.
@@ -501,7 +501,7 @@
return theTimestamp;
}
-
+
private static IllegalArgumentException badTimestampString(String s) {
throw new IllegalArgumentException("Timestamp format must be " +
"yyyy-mm-dd hh:mm:ss.fffffffff; was '" + s + "'");
diff --git a/luni/src/main/java/java/sql/Types.java b/luni/src/main/java/java/sql/Types.java
index fed8671..f1807ae 100644
--- a/luni/src/main/java/java/sql/Types.java
+++ b/luni/src/main/java/java/sql/Types.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/text/Annotation.java b/luni/src/main/java/java/text/Annotation.java
index 78c2bdd..60e95fa 100644
--- a/luni/src/main/java/java/text/Annotation.java
+++ b/luni/src/main/java/java/text/Annotation.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -64,6 +64,6 @@
*/
@Override
public String toString() {
- return getClass().getName() + "[value=" + value + ']';
+ return getClass().getName() + "[value=" + value + ']';
}
}
diff --git a/luni/src/main/java/java/text/AttributedCharacterIterator.java b/luni/src/main/java/java/text/AttributedCharacterIterator.java
index 968a589..b2533ec 100644
--- a/luni/src/main/java/java/text/AttributedCharacterIterator.java
+++ b/luni/src/main/java/java/text/AttributedCharacterIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/text/AttributedString.java b/luni/src/main/java/java/text/AttributedString.java
index 7295198..58839dd 100644
--- a/luni/src/main/java/java/text/AttributedString.java
+++ b/luni/src/main/java/java/text/AttributedString.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -90,7 +90,7 @@
/**
* Returns a new {@code AttributedIterator} with the same source string,
* begin, end, and current index as this attributed iterator.
- *
+ *
* @return a shallow copy of this attributed iterator.
* @see java.lang.Cloneable
*/
@@ -126,7 +126,7 @@
/**
* Returns the begin index in the source string.
- *
+ *
* @return the index of the first character to iterate.
*/
public int getBeginIndex() {
@@ -135,7 +135,7 @@
/**
* Returns the end index in the source String.
- *
+ *
* @return the index one past the last character to iterate.
*/
public int getEndIndex() {
@@ -144,7 +144,7 @@
/**
* Returns the current index in the source String.
- *
+ *
* @return the current index.
*/
public int getIndex() {
diff --git a/luni/src/main/java/java/text/Bidi.java b/luni/src/main/java/java/text/Bidi.java
index 92ca7ac..46a9d4a 100644
--- a/luni/src/main/java/java/text/Bidi.java
+++ b/luni/src/main/java/java/text/Bidi.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,12 +28,12 @@
* Provides the Unicode Bidirectional Algorithm. The algorithm is
* defined in the Unicode Standard Annex #9, version 13, also described in The
* Unicode Standard, Version 4.0 .
- *
+ *
* Use a {@code Bidi} object to get the information on the position reordering of a
* bidirectional text, such as Arabic or Hebrew. The natural display ordering of
* horizontal text in these languages is from right to left, while they order
* numbers from left to right.
- *
+ *
* If the text contains multiple runs, the information of each run can be
* obtained from the run index. The level of any particular run indicates the
* direction of the text as well as the nesting level. Left-to-right runs have
@@ -77,7 +77,7 @@
// }
// }
//
- // /*
+ // /*
// * Use an embedded ICU4J Bidi object to do all the work
// */
// private com.ibm.icu.text.Bidi icuBidi;
@@ -176,7 +176,7 @@
/**
* Creates a {@code Bidi} object.
- *
+ *
* @param text
* the char array of the paragraph text that is processed.
* @param textStart
@@ -229,7 +229,7 @@
if (paragraphLength < 0) {
throw new IllegalArgumentException("Negative paragraph length " + paragraphLength);
}
-
+
// BEGIN android-changed
long pBidi = createUBiDi(text, textStart, embeddings, embStart,
paragraphLength, flags);
@@ -240,7 +240,7 @@
/**
* Creates a {@code Bidi} object.
- *
+ *
* @param paragraph
* the string containing the paragraph text to perform the
* algorithm on.
@@ -354,7 +354,7 @@
/**
* Returns whether the base level is from left to right.
- *
+ *
* @return true if the base level is from left to right.
*/
public boolean baseIsLeftToRight() {
@@ -366,7 +366,7 @@
/**
* Creates a new {@code Bidi} object containing the information of one line
* from this object.
- *
+ *
* @param lineStart
* the start offset of the line.
* @param lineLimit
@@ -420,7 +420,7 @@
/**
* Returns the base level.
- *
+ *
* @return the base level.
*/
public int getBaseLevel() {
@@ -431,7 +431,7 @@
/**
* Returns the length of the text in the {@code Bidi} object.
- *
+ *
* @return the length.
*/
public int getLength() {
@@ -442,7 +442,7 @@
/**
* Returns the level of a specified character.
- *
+ *
* @param offset
* the offset of the character.
* @return the level.
@@ -459,7 +459,7 @@
/**
* Returns the number of runs in the bidirectional text.
- *
+ *
* @return the number of runs, at least 1.
*/
public int getRunCount() {
@@ -470,7 +470,7 @@
/**
* Returns the level of the specified run.
- *
+ *
* @param run
* the index of the run.
* @return the level of the run.
@@ -483,7 +483,7 @@
/**
* Returns the limit offset of the specified run.
- *
+ *
* @param run
* the index of the run.
* @return the limit offset of the run.
@@ -496,7 +496,7 @@
/**
* Returns the start offset of the specified run.
- *
+ *
* @param run
* the index of the run.
* @return the start offset of the run.
@@ -510,7 +510,7 @@
/**
* Indicates whether the text is from left to right, that is, both the base
* direction and the text direction is from left to right.
- *
+ *
* @return {@code true} if the text is from left to right; {@code false}
* otherwise.
*/
@@ -522,7 +522,7 @@
/**
* Indicates whether the text direction is mixed.
- *
+ *
* @return {@code true} if the text direction is mixed; {@code false}
* otherwise.
*/
@@ -535,7 +535,7 @@
/**
* Indicates whether the text is from right to left, that is, both the base
* direction and the text direction is from right to left.
- *
+ *
* @return {@code true} if the text is from right to left; {@code false}
* otherwise.
*/
@@ -551,7 +551,7 @@
* of objects at {@code index} from {@code objectStart} to {@code
* objectStart + count} will be reordered according to the range of levels
* at {@code index} from {@code levelStart} to {@code levelStart + count}.
- *
+ *
* @param levels
* the level array, which is already determined.
* @param levelStart
@@ -576,7 +576,7 @@
", levelStart=" + levelStart + ", objects=" + objects.length +
", objectStart=" + objectStart + ", count=" + count + ")");
}
-
+
// BEGIN android-changed
byte[] realLevels = new byte[count];
System.arraycopy(levels, levelStart, realLevels, 0, count);
@@ -595,7 +595,7 @@
/**
* Indicates whether a range of characters of a text requires a {@code Bidi}
* object to display properly.
- *
+ *
* @param text
* the char array of the text.
* @param start
@@ -614,7 +614,7 @@
if (limit < 0 || start < 0 || start > limit || limit > text.length) {
throw new IllegalArgumentException();
}
-
+
// BEGIN android-changed
Bidi bidi = new Bidi(text, start, null, 0, limit - start, 0);
return !bidi.isLeftToRight();
@@ -624,7 +624,7 @@
/**
* Returns the internal message of the {@code Bidi} object, used in
* debugging.
- *
+ *
* @return a string containing the internal message.
*/
@Override
diff --git a/luni/src/main/java/java/text/BreakIterator.java b/luni/src/main/java/java/text/BreakIterator.java
index a858b46..cfa5db5 100644
--- a/luni/src/main/java/java/text/BreakIterator.java
+++ b/luni/src/main/java/java/text/BreakIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -268,7 +268,7 @@
/**
* Returns a new instance of {@code BreakIterator} to iterate over
* characters using the given locale.
- *
+ *
* @param where
* the given locale.
* @return a new instance of {@code BreakIterator} using the given locale.
@@ -290,7 +290,7 @@
/**
* Returns a new instance of {@code BreakIterator} to iterate over
* line breaks using the given locale.
- *
+ *
* @param where
* the given locale.
* @return a new instance of {@code BreakIterator} using the given locale.
@@ -313,7 +313,7 @@
/**
* Returns a new instance of {@code BreakIterator} to iterate over
* sentence-breaks using the given locale.
- *
+ *
* @param where
* the given locale.
* @return a new instance of {@code BreakIterator} using the given locale.
@@ -336,7 +336,7 @@
/**
* Returns a new instance of {@code BreakIterator} to iterate over
* word-breaks using the given locale.
- *
+ *
* @param where
* the given locale.
* @return a new instance of {@code BreakIterator} using the given locale.
@@ -351,7 +351,7 @@
* returns true, the current iteration position is set to the given
* position; if the function returns false, the current iteration position
* is set as though {@link #following(int)} had been called.
- *
+ *
* @param offset
* the given offset to check.
* @return {@code true} if the given offset is a boundary position; {@code
@@ -380,7 +380,7 @@
* Sets the new text string to be analyzed, the current position will be
* reset to the beginning of this new string, and the old string will be
* lost.
- *
+ *
* @param newText
* the new text string to be analyzed.
*/
@@ -390,7 +390,7 @@
/**
* Returns this iterator's current position.
- *
+ *
* @return this iterator's current position.
*/
public abstract int current();
@@ -398,7 +398,7 @@
/**
* Sets this iterator's current position to the first boundary and returns
* that position.
- *
+ *
* @return the position of the first boundary.
*/
public abstract int first();
@@ -422,7 +422,7 @@
* iterator used by this object. If the invoker wants to modify the status
* of the returned iterator, it is recommended to first create a clone of
* the iterator returned.
- *
+ *
* @return a {@code CharacterIterator} which represents the text being
* analyzed.
*/
@@ -431,7 +431,7 @@
/**
* Sets this iterator's current position to the last boundary and returns
* that position.
- *
+ *
* @return the position of last boundary.
*/
public abstract int last();
@@ -440,7 +440,7 @@
* Sets this iterator's current position to the next boundary after the
* current position, and returns this position. Returns {@code DONE} if no
* boundary was found after the current position.
- *
+ *
* @return the position of last boundary.
*/
public abstract int next();
@@ -449,7 +449,7 @@
* Sets this iterator's current position to the next boundary after the
* given position, and returns that position. Returns {@code DONE} if no
* boundary was found after the given position.
- *
+ *
* @param n
* the given position.
* @return the position of last boundary.
@@ -460,7 +460,7 @@
* Sets this iterator's current position to the previous boundary before the
* current position and returns that position. Returns {@code DONE} if
* no boundary was found before the current position.
- *
+ *
* @return the position of last boundary.
*/
public abstract int previous();
@@ -469,7 +469,7 @@
* Sets the new text to be analyzed by the given {@code CharacterIterator}.
* The position will be reset to the beginning of the new text, and other
* status information of this iterator will be kept.
- *
+ *
* @param newText
* the {@code CharacterIterator} referring to the text to be
* analyzed.
@@ -479,7 +479,7 @@
/**
* Creates a copy of this iterator, all status information including the
* current position are kept the same.
- *
+ *
* @return a copy of this iterator.
*/
@Override
diff --git a/luni/src/main/java/java/text/CharacterIterator.java b/luni/src/main/java/java/text/CharacterIterator.java
index 81c1fa4..a99c344e 100644
--- a/luni/src/main/java/java/text/CharacterIterator.java
+++ b/luni/src/main/java/java/text/CharacterIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,16 +32,16 @@
/**
* Returns a new {@code CharacterIterator} with the same properties.
- *
+ *
* @return a shallow copy of this character iterator.
- *
+ *
* @see java.lang.Cloneable
*/
public Object clone();
/**
* Returns the character at the current index.
- *
+ *
* @return the current character, or {@code DONE} if the current index is
* past the beginning or end of the sequence.
*/
@@ -50,28 +50,28 @@
/**
* Sets the current position to the begin index and returns the character at
* the new position.
- *
+ *
* @return the character at the begin index.
*/
public char first();
/**
* Returns the begin index.
- *
+ *
* @return the index of the first character of the iteration.
*/
public int getBeginIndex();
/**
* Returns the end index.
- *
+ *
* @return the index one past the last character of the iteration.
*/
public int getEndIndex();
/**
* Returns the current index.
- *
+ *
* @return the current index.
*/
public int getIndex();
@@ -79,14 +79,14 @@
/**
* Sets the current position to the end index - 1 and returns the character
* at the new position.
- *
+ *
* @return the character before the end index.
*/
public char last();
/**
* Increments the current index and returns the character at the new index.
- *
+ *
* @return the character at the next index, or {@code DONE} if the next
* index would be past the end.
*/
@@ -94,7 +94,7 @@
/**
* Decrements the current index and returns the character at the new index.
- *
+ *
* @return the character at the previous index, or {@code DONE} if the
* previous index would be past the beginning.
*/
@@ -103,7 +103,7 @@
/**
* Sets the current index to a new position and returns the character at the
* new index.
- *
+ *
* @param location
* the new index that this character iterator is set to.
* @return the character at the new index, or {@code DONE} if the index is
diff --git a/luni/src/main/java/java/text/ChoiceFormat.java b/luni/src/main/java/java/text/ChoiceFormat.java
index 1a61781..4d689df 100644
--- a/luni/src/main/java/java/text/ChoiceFormat.java
+++ b/luni/src/main/java/java/text/ChoiceFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -100,7 +100,7 @@
/**
* Constructs a new {@code ChoiceFormat} with the strings and limits parsed
* from the specified pattern.
- *
+ *
* @param template
* the pattern of strings and ranges.
* @throws IllegalArgumentException
@@ -113,7 +113,7 @@
/**
* Parses the pattern to determine new strings and ranges for this
* {@code ChoiceFormat}.
- *
+ *
* @param template
* the pattern of strings and ranges.
* @throws IllegalArgumentException
@@ -184,9 +184,9 @@
/**
* Returns a new instance of {@code ChoiceFormat} with the same ranges and
* strings as this {@code ChoiceFormat}.
- *
+ *
* @return a shallow copy of this {@code ChoiceFormat}.
- *
+ *
* @see java.lang.Cloneable
*/
@Override
@@ -201,7 +201,7 @@
* Compares the specified object with this {@code ChoiceFormat}. The object
* must be an instance of {@code ChoiceFormat} and have the same limits and
* formats to be equal to this instance.
- *
+ *
* @param object
* the object to compare with this instance.
* @return {@code true} if the specified object is equal to this instance;
@@ -224,7 +224,7 @@
/**
* Appends the string associated with the range in which the specified
* double value fits to the specified string buffer.
- *
+ *
* @param value
* the double to format.
* @param buffer
@@ -248,7 +248,7 @@
/**
* Appends the string associated with the range in which the specified long
* value fits to the specified string buffer.
- *
+ *
* @param value
* the long to format.
* @param buffer
@@ -266,7 +266,7 @@
/**
* Returns the strings associated with the ranges of this {@code
* ChoiceFormat}.
- *
+ *
* @return an array of format strings.
*/
public Object[] getFormats() {
@@ -275,7 +275,7 @@
/**
* Returns the limits of this {@code ChoiceFormat}.
- *
+ *
* @return the array of doubles which make up the limits of this {@code
* ChoiceFormat}.
*/
@@ -286,9 +286,9 @@
/**
* Returns an integer hash code for the receiver. Objects which are equal
* return the same value for this method.
- *
+ *
* @return the receiver's hash.
- *
+ *
* @see #equals
*/
@Override
@@ -304,7 +304,7 @@
/**
* Returns the double value which is closest to the specified double but
* larger.
- *
+ *
* @param value
* a double value.
* @return the next larger double value.
@@ -326,7 +326,7 @@
/**
* Returns the double value which is closest to the specified double but
* either larger or smaller as specified.
- *
+ *
* @param value
* a double value.
* @param increment
@@ -386,7 +386,7 @@
/**
* Returns the double value which is closest to the specified double but
* smaller.
- *
+ *
* @param value
* a double value.
* @return the next smaller double value.
@@ -442,7 +442,7 @@
/**
* Returns the pattern of this {@code ChoiceFormat} which specifies the
* ranges and their associated strings.
- *
+ *
* @return the pattern.
*/
public String toPattern() {
diff --git a/luni/src/main/java/java/text/CollationElementIterator.java b/luni/src/main/java/java/text/CollationElementIterator.java
index 863821c..0bdef23 100644
--- a/luni/src/main/java/java/text/CollationElementIterator.java
+++ b/luni/src/main/java/java/text/CollationElementIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,7 +62,7 @@
* Obtains the maximum length of any expansion sequence that ends with the
* specified collation element. Returns {@code 1} if there is no expansion
* with this collation element as the last element.
- *
+ *
* @param order
* a collation element that has been previously obtained from a
* call to either the {@link #next()} or {@link #previous()}
@@ -92,7 +92,7 @@
* <li>The length of the source string, if iteration has reached the end.
* </li>
* </ul>
- *
+ *
* @return The position of the collation element in the source string that
* will be returned by the next invocation of the {@link #next()}
* method.
@@ -103,7 +103,7 @@
/**
* Obtains the next collation element in the source string.
- *
+ *
* @return the next collation element or {@code NULLORDER} if the end
* of the iteration has been reached.
*/
@@ -113,7 +113,7 @@
/**
* Obtains the previous collation element in the source string.
- *
+ *
* @return the previous collation element, or {@code NULLORDER} when
* the start of the iteration has been reached.
*/
@@ -124,7 +124,7 @@
/**
* Obtains the primary order of the specified collation element, i.e. the
* first 16 bits. This value is unsigned.
- *
+ *
* @param order
* the element of the collation.
* @return the element's 16 bit primary order.
@@ -149,7 +149,7 @@
/**
* Obtains the secondary order of the specified collation element, i.e. the
* 16th to 23th bits, inclusive. This value is unsigned.
- *
+ *
* @param order
* the element of the collator.
* @return the 8 bit secondary order of the element.
@@ -175,7 +175,7 @@
* decomposable range of source text, the iterator may not return a correct
* result for the next forwards or backwards iteration. The user must ensure
* that the offset is not in the middle of a decomposable range.
- *
+ *
* @param newOffset
* the character offset into the original source string to set.
* Note that this is not an offset into the corresponding
@@ -188,7 +188,7 @@
/**
* Sets a new source string iterator for iteration, and resets the offset to
* the beginning of the text.
- *
+ *
* @param source
* the new source string iterator for iteration.
*/
@@ -199,7 +199,7 @@
/**
* Sets a new source string for iteration, and resets the offset to the
* beginning of the text.
- *
+ *
* @param source
* the new source string for iteration.
*/
@@ -210,7 +210,7 @@
/**
* Obtains the tertiary order of the specified collation element, i.e. the
* last 8 bits. This value is unsigned.
- *
+ *
* @param order
* the element of the collation.
* @return the 8 bit tertiary order of the element.
diff --git a/luni/src/main/java/java/text/CollationKey.java b/luni/src/main/java/java/text/CollationKey.java
index 946f462..7d043e8 100644
--- a/luni/src/main/java/java/text/CollationKey.java
+++ b/luni/src/main/java/java/text/CollationKey.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -87,7 +87,7 @@
/**
* Compares this collation key to the given collation key.
- *
+ *
* @param value the other collation key.
* @return a negative value if this key is less than {@code value},
* 0 if they are equal, and a positive value if this key is greater.
@@ -96,7 +96,7 @@
/**
* Returns the string from which this collation key was created.
- *
+ *
* @return the source string of this collation key.
*/
public String getSourceString() {
@@ -105,7 +105,7 @@
/**
* Returns this collation key as a byte array.
- *
+ *
* @return an array of bytes.
*/
public abstract byte[] toByteArray();
diff --git a/luni/src/main/java/java/text/Collator.java b/luni/src/main/java/java/text/Collator.java
index 3495d2d..4eba893 100644
--- a/luni/src/main/java/java/text/Collator.java
+++ b/luni/src/main/java/java/text/Collator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -167,7 +167,7 @@
/**
* Returns a new collator with the same decomposition mode and
* strength value as this collator.
- *
+ *
* @return a shallow copy of this collator.
* @see java.lang.Cloneable
*/
@@ -185,7 +185,7 @@
/**
* Compares two objects to determine their relative order. The objects must
* be strings.
- *
+ *
* @param object1
* the first string to compare.
* @param object2
@@ -202,7 +202,7 @@
/**
* Compares two strings to determine their relative order.
- *
+ *
* @param string1
* the first string to compare.
* @param string2
@@ -216,7 +216,7 @@
/**
* Compares this collator with the specified object and indicates if they
* are equal.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if {@code object} is a {@code Collator} object and
@@ -237,7 +237,7 @@
/**
* Compares two strings using the collation rules to determine if they are
* equal.
- *
+ *
* @param string1
* the first string to compare.
* @param string2
@@ -260,7 +260,7 @@
/**
* Returns a {@link CollationKey} for the specified string for this collator
* with the current decomposition rule and strength value.
- *
+ *
* @param string
* the source string that is converted into a collation key.
* @return the collation key for {@code string}.
@@ -269,7 +269,7 @@
/**
* Returns the decomposition rule for this collator.
- *
+ *
* @return the decomposition rule, either {@code NO_DECOMPOSITION} or
* {@code CANONICAL_DECOMPOSITION}. {@code FULL_DECOMPOSITION} is
* not supported.
@@ -299,7 +299,7 @@
/**
* Returns the strength value for this collator.
- *
+ *
* @return the strength value, either PRIMARY, SECONDARY, TERTIARY or
* IDENTICAL.
*/
@@ -312,7 +312,7 @@
/**
* Sets the decomposition rule for this collator.
- *
+ *
* @param value
* the decomposition rule, either {@code NO_DECOMPOSITION} or
* {@code CANONICAL_DECOMPOSITION}. {@code FULL_DECOMPOSITION}
@@ -327,7 +327,7 @@
/**
* Sets the strength value for this collator.
- *
+ *
* @param value
* the strength value, either PRIMARY, SECONDARY, TERTIARY, or
* IDENTICAL.
diff --git a/luni/src/main/java/java/text/DateFormat.java b/luni/src/main/java/java/text/DateFormat.java
index 0b44aad..927df7a 100644
--- a/luni/src/main/java/java/text/DateFormat.java
+++ b/luni/src/main/java/java/text/DateFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -289,9 +289,9 @@
/**
* Returns a new instance of {@code DateFormat} with the same properties.
- *
+ *
* @return a shallow copy of this {@code DateFormat}.
- *
+ *
* @see java.lang.Cloneable
*/
@Override
@@ -305,7 +305,7 @@
/**
* Compares this date format with the specified object and indicates if they
* are equal.
- *
+ *
* @param object
* the object to compare with this date format.
* @return {@code true} if {@code object} is a {@code DateFormat} object and
@@ -370,7 +370,7 @@
/**
* Formats the specified date using the rules of this date format.
- *
+ *
* @param date
* the date to format.
* @return the formatted string.
@@ -411,7 +411,7 @@
/**
* Returns the calendar used by this {@code DateFormat}.
- *
+ *
* @return the calendar used by this date format.
*/
public Calendar getCalendar() {
@@ -421,7 +421,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing dates in
* the DEFAULT style for the default locale.
- *
+ *
* @return the {@code DateFormat} instance for the default style and locale.
*/
public final static DateFormat getDateInstance() {
@@ -448,7 +448,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing dates in
* the specified style for the specified locale.
- *
+ *
* @param style
* one of SHORT, MEDIUM, LONG, FULL, or DEFAULT.
* @param locale
@@ -467,7 +467,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing dates
* and time values in the DEFAULT style for the default locale.
- *
+ *
* @return the {@code DateFormat} instance for the default style and locale.
*/
public final static DateFormat getDateTimeInstance() {
@@ -497,7 +497,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing dates
* and time values in the specified styles for the specified locale.
- *
+ *
* @param dateStyle
* one of SHORT, MEDIUM, LONG, FULL, or DEFAULT.
* @param timeStyle
@@ -521,7 +521,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing dates
* and times in the SHORT style for the default locale.
- *
+ *
* @return the {@code DateFormat} instance for the SHORT style and default
* locale.
*/
@@ -531,7 +531,7 @@
/**
* Returns the {@code NumberFormat} used by this {@code DateFormat}.
- *
+ *
* @return the {@code NumberFormat} used by this date format.
*/
public NumberFormat getNumberFormat() {
@@ -541,7 +541,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing time
* values in the DEFAULT style for the default locale.
- *
+ *
* @return the {@code DateFormat} instance for the default style and locale.
*/
public final static DateFormat getTimeInstance() {
@@ -568,7 +568,7 @@
/**
* Returns a {@code DateFormat} instance for formatting and parsing time
* values in the specified style for the specified locale.
- *
+ *
* @param style
* one of SHORT, MEDIUM, LONG, FULL, or DEFAULT.
* @param locale
@@ -586,7 +586,7 @@
/**
* Returns the time zone of this date format's calendar.
- *
+ *
* @return the time zone of the calendar used by this date format.
*/
public TimeZone getTimeZone() {
@@ -604,7 +604,7 @@
/**
* Indicates whether the calendar used by this date format is lenient.
- *
+ *
* @return {@code true} if the calendar is lenient; {@code false} otherwise.
*/
public boolean isLenient() {
@@ -614,7 +614,7 @@
/**
* Parses a date from the specified string using the rules of this date
* format.
- *
+ *
* @param string
* the string to parse.
* @return the {@code Date} resulting from the parsing.
@@ -685,7 +685,7 @@
/**
* Sets the calendar used by this date format.
- *
+ *
* @param cal
* the new calendar.
*/
@@ -698,7 +698,7 @@
* parsing, the parser may use heuristics to interpret inputs that do not
* precisely match this object's format. With strict parsing, inputs must
* match this object's format.
- *
+ *
* @param value
* {@code true} to set the calendar to be lenient, {@code false}
* otherwise.
@@ -709,7 +709,7 @@
/**
* Sets the {@code NumberFormat} used by this date format.
- *
+ *
* @param format
* the new number format.
*/
@@ -719,7 +719,7 @@
/**
* Sets the time zone of the calendar used by this date format.
- *
+ *
* @param timezone
* the new time zone.
*/
@@ -858,7 +858,7 @@
/**
* Returns the Calendar field that this field represents.
- *
+ *
* @return the calendar field.
*/
public int getCalendarField() {
@@ -868,7 +868,7 @@
/**
* Returns the {@code DateFormat.Field} instance for the given calendar
* field.
- *
+ *
* @param calendarField
* a calendar field constant.
* @return the {@code DateFormat.Field} corresponding to
@@ -901,7 +901,7 @@
if (calendarField != -1) {
try {
Field result = ofCalendarField(calendarField);
-
+
if (result != null && this.getName().equals(result.getName())) {
return result;
}
diff --git a/luni/src/main/java/java/text/DateFormatSymbols.java b/luni/src/main/java/java/text/DateFormatSymbols.java
index d586ae1..4cd4c08 100644
--- a/luni/src/main/java/java/text/DateFormatSymbols.java
+++ b/luni/src/main/java/java/text/DateFormatSymbols.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -112,7 +112,7 @@
/**
* Constructs a new {@code DateFormatSymbols} instance containing the
* symbols for the specified locale.
- *
+ *
* @param locale
* the locale.
*/
@@ -131,7 +131,7 @@
/**
* Returns a new {@code DateFormatSymbols} instance for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return an instance of {@code DateFormatSymbols}
* @since 1.6
* @hide
@@ -202,7 +202,7 @@
/**
* Compares this object with the specified object and indicates if they are
* equal.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if {@code object} is an instance of
@@ -260,7 +260,7 @@
* Returns the array of strings which represent AM and PM. Use the
* {@link java.util.Calendar} constants {@code Calendar.AM} and
* {@code Calendar.PM} as indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getAmPmStrings() {
@@ -271,7 +271,7 @@
* Returns the array of strings which represent BC and AD. Use the
* {@link java.util.Calendar} constants {@code GregorianCalendar.BC} and
* {@code GregorianCalendar.AD} as indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getEras() {
@@ -281,7 +281,7 @@
/**
* Returns the pattern characters used by {@link SimpleDateFormat} to
* specify date and time fields.
- *
+ *
* @return a string containing the pattern characters.
*/
public String getLocalPatternChars() {
@@ -292,7 +292,7 @@
* Returns the array of strings containing the full names of the months. Use
* the {@link java.util.Calendar} constants {@code Calendar.JANUARY} etc. as
* indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getMonths() {
@@ -303,7 +303,7 @@
* Returns the array of strings containing the abbreviated names of the
* months. Use the {@link java.util.Calendar} constants
* {@code Calendar.JANUARY} etc. as indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getShortMonths() {
@@ -314,7 +314,7 @@
* Returns the array of strings containing the abbreviated names of the days
* of the week. Use the {@link java.util.Calendar} constants
* {@code Calendar.SUNDAY} etc. as indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getShortWeekdays() {
@@ -325,7 +325,7 @@
* Returns the array of strings containing the full names of the days of the
* week. Use the {@link java.util.Calendar} constants
* {@code Calendar.SUNDAY} etc. as indices for the array.
- *
+ *
* @return an array of strings.
*/
public String[] getWeekdays() {
@@ -338,7 +338,7 @@
* first is a TimeZone ID, the second and third are the full and abbreviated
* time zone names for standard time, and the fourth and fifth are the full
* and abbreviated names for daylight time.
- *
+ *
* @return a two-dimensional array of strings.
*/
public String[][] getZoneStrings() {
@@ -384,7 +384,7 @@
* Sets the array of strings which represent AM and PM. Use the
* {@link java.util.Calendar} constants {@code Calendar.AM} and
* {@code Calendar.PM} as indices for the array.
- *
+ *
* @param data
* the array of strings for AM and PM.
*/
@@ -396,7 +396,7 @@
* Sets the array of Strings which represent BC and AD. Use the
* {@link java.util.Calendar} constants {@code GregorianCalendar.BC} and
* {@code GregorianCalendar.AD} as indices for the array.
- *
+ *
* @param data
* the array of strings for BC and AD.
*/
@@ -407,7 +407,7 @@
/**
* Sets the pattern characters used by {@link SimpleDateFormat} to specify
* date and time fields.
- *
+ *
* @param data
* the string containing the pattern characters.
* @throws NullPointerException
@@ -424,7 +424,7 @@
* Sets the array of strings containing the full names of the months. Use
* the {@link java.util.Calendar} constants {@code Calendar.JANUARY} etc. as
* indices for the array.
- *
+ *
* @param data
* the array of strings.
*/
@@ -436,7 +436,7 @@
* Sets the array of strings containing the abbreviated names of the months.
* Use the {@link java.util.Calendar} constants {@code Calendar.JANUARY}
* etc. as indices for the array.
- *
+ *
* @param data
* the array of strings.
*/
@@ -448,7 +448,7 @@
* Sets the array of strings containing the abbreviated names of the days of
* the week. Use the {@link java.util.Calendar} constants
* {@code Calendar.SUNDAY} etc. as indices for the array.
- *
+ *
* @param data
* the array of strings.
*/
@@ -460,7 +460,7 @@
* Sets the array of strings containing the full names of the days of the
* week. Use the {@link java.util.Calendar} constants
* {@code Calendar.SUNDAY} etc. as indices for the array.
- *
+ *
* @param data
* the array of strings.
*/
@@ -474,7 +474,7 @@
* first is a TimeZone ID, and second and third are the full and abbreviated
* time zone names for standard time, and the fourth and fifth are the full
* and abbreviated names for daylight time.
- *
+ *
* @param data
* the two-dimensional array of strings.
*/
diff --git a/luni/src/main/java/java/text/DecimalFormat.java b/luni/src/main/java/java/text/DecimalFormat.java
index dfec8e6..2c9c68d 100644
--- a/luni/src/main/java/java/text/DecimalFormat.java
+++ b/luni/src/main/java/java/text/DecimalFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -578,7 +578,7 @@
/**
* Constructs a new {@code DecimalFormat} using the specified non-localized
* pattern and {@code DecimalFormatSymbols}.
- *
+ *
* @param pattern
* the non-localized pattern.
* @param value
@@ -612,7 +612,7 @@
/**
* Changes the pattern of this decimal format to the specified pattern which
* uses localized pattern characters.
- *
+ *
* @param pattern
* the localized pattern.
* @throws IllegalArgumentException
@@ -625,7 +625,7 @@
/**
* Changes the pattern of this decimal format to the specified pattern which
* uses non-localized pattern characters.
- *
+ *
* @param pattern
* the non-localized pattern.
* @throws IllegalArgumentException
@@ -638,7 +638,7 @@
/**
* Returns a new instance of {@code DecimalFormat} with the same pattern and
* properties as this decimal format.
- *
+ *
* @return a shallow copy of this decimal format.
* @see java.lang.Cloneable
*/
@@ -654,7 +654,7 @@
* Compares the specified object to this decimal format and indicates if
* they are equal. In order to be equal, {@code object} must be an instance
* of {@code DecimalFormat} with the same pattern and properties.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this decimal
@@ -678,7 +678,7 @@
* Formats the specified object using the rules of this decimal format and
* returns an {@code AttributedCharacterIterator} with the formatted number
* and attributes.
- *
+ *
* @param object
* the object to format.
* @return an AttributedCharacterIterator with the formatted number and
@@ -738,7 +738,7 @@
/**
* Returns the {@code DecimalFormatSymbols} used by this decimal format.
- *
+ *
* @return a copy of the {@code DecimalFormatSymbols} used by this decimal
* format.
*/
@@ -748,7 +748,7 @@
/**
* Returns the currency used by this decimal format.
- *
+ *
* @return the currency used by this decimal format.
* @see DecimalFormatSymbols#getCurrency()
*/
@@ -771,7 +771,7 @@
/**
* Returns the multiplier which is applied to the number before formatting
* or after parsing.
- *
+ *
* @return the multiplier.
*/
public int getMultiplier() {
@@ -780,7 +780,7 @@
/**
* Returns the prefix which is formatted or parsed before a negative number.
- *
+ *
* @return the negative prefix.
*/
public String getNegativePrefix() {
@@ -789,7 +789,7 @@
/**
* Returns the suffix which is formatted or parsed after a negative number.
- *
+ *
* @return the negative suffix.
*/
public String getNegativeSuffix() {
@@ -798,7 +798,7 @@
/**
* Returns the prefix which is formatted or parsed before a positive number.
- *
+ *
* @return the positive prefix.
*/
public String getPositivePrefix() {
@@ -807,7 +807,7 @@
/**
* Returns the suffix which is formatted or parsed after a positive number.
- *
+ *
* @return the positive suffix.
*/
public String getPositiveSuffix() {
@@ -822,7 +822,7 @@
/**
* Indicates whether the decimal separator is shown when there are no
* fractional digits.
- *
+ *
* @return {@code true} if the decimal separator should always be formatted;
* {@code false} otherwise.
*/
@@ -833,7 +833,7 @@
/**
* This value indicates whether the return object of the parse operation is
* of type {@code BigDecimal}. This value defaults to {@code false}.
- *
+ *
* @return {@code true} if parse always returns {@code BigDecimals},
* {@code false} if the type of the result is {@code Long} or
* {@code Double}.
@@ -848,7 +848,7 @@
* {@code true}, then the resulting numbers will be of type
* {@code java.lang.Integer}. Special cases are NaN, positive and negative
* infinity, which are still returned as {@code java.lang.Double}.
- *
+ *
*
* @param value
* {@code true} that the resulting numbers of parse operations
@@ -866,7 +866,7 @@
/**
* Indicates whether parsing with this decimal format will only
* return numbers of type {@code java.lang.Integer}.
- *
+ *
* @return {@code true} if this {@code DecimalFormat}'s parse method only
* returns {@code java.lang.Integer}; {@code false} otherwise.
*/
@@ -884,7 +884,7 @@
* updated to the index following the parsed text. On error, the index is
* unchanged and the error index of {@code ParsePosition} is set to the
* index where the error occurred.
- *
+ *
* @param string
* the string to parse.
* @param position
@@ -913,7 +913,7 @@
// }
// if ((number instanceof Double) && !((Double) number).isInfinite()
// && !((Double) number).isNaN()) {
- //
+ //
// return new BigDecimal(number.doubleValue());
// }
// if (number instanceof BigInteger) {
@@ -958,7 +958,7 @@
/**
* Sets the {@code DecimalFormatSymbols} used by this decimal format.
- *
+ *
* @param value
* the {@code DecimalFormatSymbols} to set.
*/
@@ -974,7 +974,7 @@
/**
* Sets the currency used by this decimal format. The min and max fraction
* digits remain the same.
- *
+ *
* @param currency
* the currency this {@code DecimalFormat} should use.
* @see DecimalFormatSymbols#setCurrency(Currency)
@@ -990,7 +990,7 @@
/**
* Sets whether the decimal separator is shown when there are no fractional
* digits.
- *
+ *
* @param value
* {@code true} if the decimal separator should always be
* formatted; {@code false} otherwise.
@@ -1014,7 +1014,7 @@
/**
* Sets whether or not grouping will be used in this format. Grouping
* affects both parsing and formatting.
- *
+ *
* @param value
* {@code true} if grouping is used; {@code false} otherwise.
*/
@@ -1025,7 +1025,7 @@
/**
* Indicates whether grouping will be used in this format.
- *
+ *
* @return {@code true} if grouping is used; {@code false} otherwise.
*/
@Override
@@ -1037,7 +1037,7 @@
* Sets the maximum number of digits after the decimal point.
* If the value passed is negative then it is replaced by 0.
* Regardless of this setting, no more than 340 digits will be used.
- *
+ *
* @param value the maximum number of fraction digits.
*/
@Override
@@ -1052,7 +1052,7 @@
* Sets the maximum number of digits before the decimal point.
* If the value passed is negative then it is replaced by 0.
* Regardless of this setting, no more than 309 digits will be used.
- *
+ *
* @param value the maximum number of integer digits.
*/
@Override
@@ -1065,7 +1065,7 @@
* Sets the minimum number of digits after the decimal point.
* If the value passed is negative then it is replaced by 0.
* Regardless of this setting, no more than 340 digits will be used.
- *
+ *
* @param value the minimum number of fraction digits.
*/
@Override
@@ -1078,7 +1078,7 @@
* Sets the minimum number of digits before the decimal point.
* If the value passed is negative then it is replaced by 0.
* Regardless of this setting, no more than 309 digits will be used.
- *
+ *
* @param value the minimum number of integer digits.
*/
@Override
@@ -1090,7 +1090,7 @@
/**
* Sets the multiplier which is applied to the number before formatting or
* after parsing.
- *
+ *
* @param value
* the multiplier.
*/
@@ -1100,7 +1100,7 @@
/**
* Sets the prefix which is formatted or parsed before a negative number.
- *
+ *
* @param value
* the negative prefix.
*/
@@ -1110,7 +1110,7 @@
/**
* Sets the suffix which is formatted or parsed after a negative number.
- *
+ *
* @param value
* the negative suffix.
*/
@@ -1120,7 +1120,7 @@
/**
* Sets the prefix which is formatted or parsed before a positive number.
- *
+ *
* @param value
* the positive prefix.
*/
@@ -1130,7 +1130,7 @@
/**
* Sets the suffix which is formatted or parsed after a positive number.
- *
+ *
* @param value
* the positive suffix.
*/
@@ -1141,7 +1141,7 @@
/**
* Sets the behaviour of the parse method. If set to {@code true} then all
* the returned objects will be of type {@code BigDecimal}.
- *
+ *
* @param newValue
* {@code true} if all the returned objects should be of type
* {@code BigDecimal}; {@code false} otherwise.
@@ -1153,7 +1153,7 @@
/**
* Returns the pattern of this decimal format using localized pattern
* characters.
- *
+ *
* @return the localized pattern.
*/
public String toLocalizedPattern() {
@@ -1163,7 +1163,7 @@
/**
* Returns the pattern of this decimal format using non-localized pattern
* characters.
- *
+ *
* @return the non-localized pattern.
*/
public String toPattern() {
@@ -1172,33 +1172,33 @@
// the fields list to be serialized
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("positivePrefix", String.class),
- new ObjectStreamField("positiveSuffix", String.class),
- new ObjectStreamField("negativePrefix", String.class),
- new ObjectStreamField("negativeSuffix", String.class),
- new ObjectStreamField("posPrefixPattern", String.class),
- new ObjectStreamField("posSuffixPattern", String.class),
- new ObjectStreamField("negPrefixPattern", String.class),
- new ObjectStreamField("negSuffixPattern", String.class),
- new ObjectStreamField("multiplier", int.class),
- new ObjectStreamField("groupingSize", byte.class),
- new ObjectStreamField("groupingUsed", boolean.class),
- new ObjectStreamField("decimalSeparatorAlwaysShown", boolean.class),
- new ObjectStreamField("parseBigDecimal", boolean.class),
- new ObjectStreamField("roundingMode", RoundingMode.class),
- new ObjectStreamField("symbols", DecimalFormatSymbols.class),
- new ObjectStreamField("useExponentialNotation", boolean.class),
- new ObjectStreamField("minExponentDigits", byte.class),
- new ObjectStreamField("maximumIntegerDigits", int.class),
- new ObjectStreamField("minimumIntegerDigits", int.class),
- new ObjectStreamField("maximumFractionDigits", int.class),
- new ObjectStreamField("minimumFractionDigits", int.class),
- new ObjectStreamField("serialVersionOnStream", int.class), };
+ new ObjectStreamField("positivePrefix", String.class),
+ new ObjectStreamField("positiveSuffix", String.class),
+ new ObjectStreamField("negativePrefix", String.class),
+ new ObjectStreamField("negativeSuffix", String.class),
+ new ObjectStreamField("posPrefixPattern", String.class),
+ new ObjectStreamField("posSuffixPattern", String.class),
+ new ObjectStreamField("negPrefixPattern", String.class),
+ new ObjectStreamField("negSuffixPattern", String.class),
+ new ObjectStreamField("multiplier", int.class),
+ new ObjectStreamField("groupingSize", byte.class),
+ new ObjectStreamField("groupingUsed", boolean.class),
+ new ObjectStreamField("decimalSeparatorAlwaysShown", boolean.class),
+ new ObjectStreamField("parseBigDecimal", boolean.class),
+ new ObjectStreamField("roundingMode", RoundingMode.class),
+ new ObjectStreamField("symbols", DecimalFormatSymbols.class),
+ new ObjectStreamField("useExponentialNotation", boolean.class),
+ new ObjectStreamField("minExponentDigits", byte.class),
+ new ObjectStreamField("maximumIntegerDigits", int.class),
+ new ObjectStreamField("minimumIntegerDigits", int.class),
+ new ObjectStreamField("maximumFractionDigits", int.class),
+ new ObjectStreamField("minimumFractionDigits", int.class),
+ new ObjectStreamField("serialVersionOnStream", int.class), };
/**
* Writes serialized fields following serialized forms specified by Java
* specification.
- *
+ *
* @param stream
* the output stream to write serialized bytes
* @throws IOException
@@ -1240,7 +1240,7 @@
/**
* Reads serialized fields following serialized forms specified by Java
* specification.
- *
+ *
* @param stream
* the input stream to read serialized bytes
* @throws IOException
diff --git a/luni/src/main/java/java/text/DecimalFormatSymbols.java b/luni/src/main/java/java/text/DecimalFormatSymbols.java
index a32f6cf..07e9d9c 100644
--- a/luni/src/main/java/java/text/DecimalFormatSymbols.java
+++ b/luni/src/main/java/java/text/DecimalFormatSymbols.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -77,7 +77,7 @@
* Best practice is to create a {@code DecimalFormat}
* and then to get the {@code DecimalFormatSymbols} from that object by
* calling {@link DecimalFormat#getDecimalFormatSymbols()}.
- *
+ *
* @param locale
* the locale.
*/
@@ -110,7 +110,7 @@
/**
* Returns a new {@code DecimalFormatSymbols} instance for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return an instance of {@code DecimalFormatSymbols}
* @since 1.6
* @hide
@@ -158,7 +158,7 @@
* Compares the specified object to this {@code DecimalFormatSymbols} and
* indicates if they are equal. In order to be equal, {@code object} must be
* an instance of {@code DecimalFormatSymbols} and contain the same symbols.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this
@@ -232,7 +232,7 @@
/**
* Returns the international currency symbol.
- *
+ *
* @return the international currency symbol as string.
*/
public String getInternationalCurrencySymbol() {
@@ -241,7 +241,7 @@
/**
* Returns the currency symbol.
- *
+ *
* @return the currency symbol as string.
*/
public String getCurrencySymbol() {
@@ -250,7 +250,7 @@
/**
* Returns the character which represents the decimal point in a number.
- *
+ *
* @return the decimal separator character.
*/
public char getDecimalSeparator() {
@@ -260,7 +260,7 @@
/**
* Returns the character which represents a single digit in a format
* pattern.
- *
+ *
* @return the digit pattern character.
*/
public char getDigit() {
@@ -269,7 +269,7 @@
/**
* Returns the character used as the thousands separator in a number.
- *
+ *
* @return the thousands separator character.
*/
public char getGroupingSeparator() {
@@ -278,7 +278,7 @@
/**
* Returns the string which represents infinity.
- *
+ *
* @return the infinity symbol as a string.
*/
public String getInfinity() {
@@ -287,7 +287,7 @@
/**
* Returns the minus sign character.
- *
+ *
* @return the minus sign as a character.
*/
public char getMinusSign() {
@@ -297,7 +297,7 @@
/**
* Returns the character which represents the decimal point in a monetary
* value.
- *
+ *
* @return the monetary decimal point as a character.
*/
public char getMonetaryDecimalSeparator() {
@@ -306,7 +306,7 @@
/**
* Returns the string which represents NaN.
- *
+ *
* @return the symbol NaN as a string.
*/
public String getNaN() {
@@ -316,7 +316,7 @@
/**
* Returns the character which separates the positive and negative patterns
* in a format pattern.
- *
+ *
* @return the pattern separator character.
*/
public char getPatternSeparator() {
@@ -325,7 +325,7 @@
/**
* Returns the percent character.
- *
+ *
* @return the percent character.
*/
public char getPercent() {
@@ -334,7 +334,7 @@
/**
* Returns the per mill sign character.
- *
+ *
* @return the per mill sign character.
*/
public char getPerMill() {
@@ -343,7 +343,7 @@
/**
* Returns the character which represents zero.
- *
+ *
* @return the zero character.
*/
public char getZeroDigit() {
@@ -385,7 +385,7 @@
* The international currency symbol and the currency symbol are updated,
* but the min and max number of fraction digits stays the same.
* <p>
- *
+ *
* @param currency
* the new currency.
* @throws NullPointerException
@@ -410,7 +410,7 @@
* valid ISO4217 currency code.
* <p>
* The min and max number of fraction digits stay the same.
- *
+ *
* @param value
* the currency code.
*/
@@ -436,7 +436,7 @@
/**
* Sets the currency symbol.
- *
+ *
* @param value
* the currency symbol.
*/
@@ -446,7 +446,7 @@
/**
* Sets the character which represents the decimal point in a number.
- *
+ *
* @param value
* the decimal separator character.
*/
@@ -456,7 +456,7 @@
/**
* Sets the character which represents a single digit in a format pattern.
- *
+ *
* @param value
* the digit character.
*/
@@ -466,7 +466,7 @@
/**
* Sets the character used as the thousands separator in a number.
- *
+ *
* @param value
* the grouping separator character.
*/
@@ -476,7 +476,7 @@
/**
* Sets the string which represents infinity.
- *
+ *
* @param value
* the string representing infinity.
*/
@@ -486,7 +486,7 @@
/**
* Sets the minus sign character.
- *
+ *
* @param value
* the minus sign character.
*/
@@ -497,7 +497,7 @@
/**
* Sets the character which represents the decimal point in a monetary
* value.
- *
+ *
* @param value
* the monetary decimal separator character.
*/
@@ -507,7 +507,7 @@
/**
* Sets the string which represents NaN.
- *
+ *
* @param value
* the string representing NaN.
*/
@@ -518,7 +518,7 @@
/**
* Sets the character which separates the positive and negative patterns in
* a format pattern.
- *
+ *
* @param value
* the pattern separator character.
*/
@@ -528,7 +528,7 @@
/**
* Sets the percent character.
- *
+ *
* @param value
* the percent character.
*/
@@ -538,7 +538,7 @@
/**
* Sets the per mill sign character.
- *
+ *
* @param value
* the per mill character.
*/
@@ -548,7 +548,7 @@
/**
* Sets the character which represents zero.
- *
+ *
* @param value
* the zero digit character.
*/
diff --git a/luni/src/main/java/java/text/FieldPosition.java b/luni/src/main/java/java/text/FieldPosition.java
index c116937..d5bccc7 100644
--- a/luni/src/main/java/java/text/FieldPosition.java
+++ b/luni/src/main/java/java/text/FieldPosition.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code FieldPosition} for the specified field.
- *
+ *
* @param field
* the field to identify.
*/
@@ -48,7 +48,7 @@
/**
* Constructs a new {@code FieldPosition} for the specified {@code Field}
* attribute.
- *
+ *
* @param attribute
* the field attribute to identify.
*/
@@ -60,7 +60,7 @@
/**
* Constructs a new {@code FieldPosition} for the specified {@code Field}
* attribute and field id.
- *
+ *
* @param attribute
* the field attribute to identify.
* @param field
@@ -79,7 +79,7 @@
* Compares the specified object to this field position and indicates if
* they are equal. In order to be equal, {@code object} must be an instance
* of {@code FieldPosition} with the same field, begin index and end index.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this field
@@ -98,7 +98,7 @@
/**
* Returns the index of the beginning of the field.
- *
+ *
* @return the first index of the field.
*/
public int getBeginIndex() {
@@ -107,7 +107,7 @@
/**
* Returns the index one past the end of the field.
- *
+ *
* @return one past the index of the last character in the field.
*/
public int getEndIndex() {
@@ -116,7 +116,7 @@
/**
* Returns the field which is being identified.
- *
+ *
* @return the field constant.
*/
public int getField() {
@@ -125,7 +125,7 @@
/**
* Returns the attribute which is being identified.
- *
+ *
* @return the field.
*/
public Format.Field getFieldAttribute() {
@@ -140,7 +140,7 @@
/**
* Sets the index of the beginning of the field.
- *
+ *
* @param index
* the index of the first character in the field.
*/
@@ -150,7 +150,7 @@
/**
* Sets the index of the end of the field.
- *
+ *
* @param index
* one past the index of the last character in the field.
*/
@@ -160,13 +160,13 @@
/**
* Returns the string representation of this field position.
- *
+ *
* @return the string representation of this field position.
*/
@Override
public String toString() {
- return getClass().getName() + "[attribute=" + myAttribute + ", field="
- + myField + ", beginIndex=" + beginIndex + ", endIndex="
- + endIndex + "]";
+ return getClass().getName() + "[attribute=" + myAttribute + ", field="
+ + myField + ", beginIndex=" + beginIndex + ", endIndex="
+ + endIndex + "]";
}
}
diff --git a/luni/src/main/java/java/text/Format.java b/luni/src/main/java/java/text/Format.java
index 0ebaba5..b07b3e8 100644
--- a/luni/src/main/java/java/text/Format.java
+++ b/luni/src/main/java/java/text/Format.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -69,9 +69,9 @@
/**
* Returns a copy of this {@code Format} instance.
- *
+ *
* @return a shallow copy of this format.
- *
+ *
* @see java.lang.Cloneable
*/
@Override
@@ -115,7 +115,7 @@
/**
* Formats the specified object using the rules of this format.
- *
+ *
* @param object
* the object to format.
* @return the formatted string.
@@ -171,7 +171,7 @@
/**
* Parses the specified string using the rules of this format.
- *
+ *
* @param string
* the string to parse.
* @return the object resulting from the parse.
@@ -193,7 +193,7 @@
* the {@code ParsePosition} is updated to the index following the parsed
* text. On error, the index is unchanged and the error index of
* {@code ParsePosition} is set to the index where the error occurred.
- *
+ *
* @param string
* the string to parse.
* @param position
diff --git a/luni/src/main/java/java/text/MessageFormat.java b/luni/src/main/java/java/text/MessageFormat.java
index d770869..e45c386 100644
--- a/luni/src/main/java/java/text/MessageFormat.java
+++ b/luni/src/main/java/java/text/MessageFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -345,7 +345,7 @@
/**
* Constructs a new {@code MessageFormat} using the specified pattern and {@code locale}.
- *
+ *
* @param template
* the pattern.
* @param locale
@@ -362,7 +362,7 @@
* Constructs a new {@code MessageFormat} using the specified pattern and
* the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param template
* the pattern.
* @throws IllegalArgumentException
@@ -374,7 +374,7 @@
/**
* Changes this {@code MessageFormat} to use the specified pattern.
- *
+ *
* @param template
* the new pattern.
* @throws IllegalArgumentException
@@ -402,9 +402,9 @@
if (ch < '0' && ch > '9') {
throw new IllegalArgumentException("Invalid argument number");
}
-
+
arg = arg * 10 + (ch - '0');
-
+
if (arg < 0 || offset >= length) {
throw new IllegalArgumentException("Invalid argument number");
}
@@ -441,7 +441,7 @@
/**
* Returns a new instance of {@code MessageFormat} with the same pattern and
* formats as this {@code MessageFormat}.
- *
+ *
* @return a shallow copy of this {@code MessageFormat}.
* @see java.lang.Cloneable
*/
@@ -462,7 +462,7 @@
* Compares the specified object to this {@code MessageFormat} and indicates
* if they are equal. In order to be equal, {@code object} must be an
* instance of {@code MessageFormat} and have the same pattern.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this
@@ -498,7 +498,7 @@
* returns an {@code AttributedCharacterIterator} with the formatted message and
* attributes. The {@code AttributedCharacterIterator} returned also includes the
* attributes from the formats of this message format.
- *
+ *
* @param object
* the object to format.
* @return an {@code AttributedCharacterIterator} with the formatted message and
@@ -649,7 +649,7 @@
/**
* If fields vector is not null, find and add the fields of this format to
* the fields vector by iterating through its AttributedCharacterIterator
- *
+ *
* @param format
* the format to find fields for
* @param arg
@@ -693,7 +693,7 @@
* <p>
* Calling this method is equivalent to calling
* <blockquote>
- *
+ *
* <pre>
* format((Object[])object, buffer, field)
* </pre>
@@ -719,7 +719,7 @@
/**
* Formats the supplied objects using the specified message format pattern.
- *
+ *
* @param format the format string (see {@link java.util.Formatter#format})
* @param args
* the list of arguments passed to the formatter. If there are
@@ -742,7 +742,7 @@
/**
* Returns the {@code Format} instances used by this message format.
- *
+ *
* @return an array of {@code Format} instances.
*/
public Format[] getFormats() {
@@ -753,7 +753,7 @@
* Returns the formats used for each argument index. If an argument is
* placed more than once in the pattern string, then this returns the format
* of the last one.
- *
+ *
* @return an array of formats, ordered by argument index.
*/
public Format[] getFormatsByArgumentIndex() {
@@ -767,7 +767,7 @@
/**
* Sets the format used for the argument at index {@code argIndex} to
* {@code format}.
- *
+ *
* @param argIndex
* the index of the format to set.
* @param format
@@ -784,7 +784,7 @@
/**
* Sets the formats used for each argument. The {@code formats} array
* elements should be in the order of the argument indices.
- *
+ *
* @param formats
* the formats in an array.
*/
@@ -800,7 +800,7 @@
/**
* Returns the locale used when creating formats.
- *
+ *
* @return the locale used to create formats.
*/
public Locale getLocale() {
@@ -828,7 +828,7 @@
/**
* Parses the message arguments from the specified string using the rules of
* this message format.
- *
+ *
* @param string
* the string to parse.
* @return the array of {@code Object} arguments resulting from the parse.
@@ -851,7 +851,7 @@
* index following the parsed text. On error, the index is unchanged and the
* error index of {@code ParsePosition} is set to the index where the error
* occurred.
- *
+ *
* @param string
* the string to parse.
* @param position
@@ -922,7 +922,7 @@
* index following the parsed text. On error, the index is unchanged and the
* error index of {@code ParsePosition} is set to the index where the error
* occurred.
- *
+ *
* @param string
* the string to parse.
* @param position
@@ -1048,7 +1048,7 @@
/**
* Sets the specified format used by this message format.
- *
+ *
* @param offset
* the index of the format to change.
* @param format
@@ -1060,7 +1060,7 @@
/**
* Sets the formats used by this message format.
- *
+ *
* @param formats
* an array of {@code Format}.
*/
@@ -1078,7 +1078,7 @@
* Sets the locale to use when creating {@code Format} instances. Changing
* the locale may change the behavior of {@code applyPattern},
* {@code toPattern}, {@code format} and {@code formatToCharacterIterator}.
- *
+ *
* @param locale
* the new locale.
*/
@@ -1089,14 +1089,14 @@
// BEGIN android-removed
//if (format instanceof DecimalFormat) {
// formats[i] = new DecimalFormat(((DecimalFormat) format)
- // .toPattern(), new DecimalFormatSymbols(locale));
+ // .toPattern(), new DecimalFormatSymbols(locale));
//} else if (format instanceof SimpleDateFormat) {
// formats[i] = new SimpleDateFormat(((SimpleDateFormat) format)
// .toPattern(), locale);
//}
// END android-removed
// BEGIN android-added
- // java specification undefined for null argument, change into
+ // java specification undefined for null argument, change into
// a more tolerant implementation
if (format instanceof DecimalFormat) {
try {
@@ -1167,7 +1167,7 @@
/**
* Returns the pattern of this message format.
- *
+ *
* @return the pattern.
*/
public String toPattern() {
diff --git a/luni/src/main/java/java/text/Normalizer.java b/luni/src/main/java/java/text/Normalizer.java
index cc9819c..cfc30ae 100644
--- a/luni/src/main/java/java/text/Normalizer.java
+++ b/luni/src/main/java/java/text/Normalizer.java
@@ -23,7 +23,7 @@
* <a href="http://www.unicode.org/unicode/reports/tr15/tr15-23.html">Unicode Standard Annex #15:
* Unicode Normalization Forms</a>. Normalization can decompose and compose
* characters for equivalency checking.
- *
+ *
* @hide
* @since 1.6
*/
@@ -58,7 +58,7 @@
/**
* Check whether the given character sequence <code>src</code> is normalized
* according to the normalization method <code>form</code>.
- *
+ *
* @param src character sequence to check
* @param form normalization form to check against
* @return true if normalized according to <code>form</code>
@@ -70,7 +70,7 @@
/**
* Normalize the character sequence <code>src</code> according to the
* normalization method <code>form</code>.
- *
+ *
* @param src character sequence to read for normalization
* @param form normalization form
* @return string normalized according to <code>form</code>
diff --git a/luni/src/main/java/java/text/NumberFormat.java b/luni/src/main/java/java/text/NumberFormat.java
index a4cccc0..730dc5d 100644
--- a/luni/src/main/java/java/text/NumberFormat.java
+++ b/luni/src/main/java/java/text/NumberFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -168,7 +168,7 @@
/**
* Returns a new {@code NumberFormat} with the same properties as this
* {@code NumberFormat}.
- *
+ *
* @return a shallow copy of this {@code NumberFormat}.
* @see java.lang.Cloneable
*/
@@ -181,7 +181,7 @@
* Compares the specified object to this number format and indicates if
* they are equal. In order to be equal, {@code object} must be an instance
* of {@code NumberFormat} with the same pattern and properties.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this number
@@ -207,7 +207,7 @@
/**
* Formats the specified double using the rules of this number format.
- *
+ *
* @param value
* the double to format.
* @return the formatted string.
@@ -240,7 +240,7 @@
/**
* Formats the specified long using the rules of this number format.
- *
+ *
* @param value
* the long to format.
* @return the formatted string.
@@ -324,7 +324,7 @@
* concrete subclasses should override this method if they support currency
* formatting.
* <p>
- *
+ *
* @return the currency that was set in getInstance() or in setCurrency(),
* or {@code null}.
* @throws UnsupportedOperationException
@@ -337,7 +337,7 @@
* Returns a {@code NumberFormat} for formatting and parsing currency values
* for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return a {@code NumberFormat} for handling currency values.
*/
public final static NumberFormat getCurrencyInstance() {
@@ -347,7 +347,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing currency values
* for the specified locale.
- *
+ *
* @param locale
* the locale to use.
* @return a {@code NumberFormat} for handling currency values.
@@ -360,7 +360,7 @@
* Returns a {@code NumberFormat} for formatting and parsing integers for the
* user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return a {@code NumberFormat} for handling integers.
*/
public final static NumberFormat getIntegerInstance() {
@@ -370,7 +370,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing integers for
* the specified locale.
- *
+ *
* @param locale
* the locale to use.
* @return a {@code NumberFormat} for handling integers.
@@ -384,7 +384,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing numbers for the
* default locale.
- *
+ *
* @return a {@code NumberFormat} for handling {@code Number} objects.
*/
public final static NumberFormat getInstance() {
@@ -394,7 +394,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing numbers for the
* specified locale.
- *
+ *
* @param locale
* the locale to use.
* @return a {@code NumberFormat} for handling {@code Number} objects.
@@ -413,7 +413,7 @@
* Returns the maximum number of fraction digits that are printed when
* formatting. If the maximum is less than the number of fraction digits,
* the least significant digits are truncated.
- *
+ *
* @return the maximum number of fraction digits.
*/
public int getMaximumFractionDigits() {
@@ -424,7 +424,7 @@
* Returns the maximum number of integer digits that are printed when
* formatting. If the maximum is less than the number of integer digits, the
* most significant digits are truncated.
- *
+ *
* @return the maximum number of integer digits.
*/
public int getMaximumIntegerDigits() {
@@ -434,7 +434,7 @@
/**
* Returns the minimum number of fraction digits that are printed when
* formatting.
- *
+ *
* @return the minimum number of fraction digits.
*/
public int getMinimumFractionDigits() {
@@ -444,7 +444,7 @@
/**
* Returns the minimum number of integer digits that are printed when
* formatting.
- *
+ *
* @return the minimum number of integer digits.
*/
public int getMinimumIntegerDigits() {
@@ -455,7 +455,7 @@
* Returns a {@code NumberFormat} for formatting and parsing numbers for the
* user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return a {@code NumberFormat} for handling {@code Number} objects.
*/
public final static NumberFormat getNumberInstance() {
@@ -465,7 +465,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing numbers for the
* specified locale.
- *
+ *
* @param locale
* the locale to use.
* @return a {@code NumberFormat} for handling {@code Number} objects.
@@ -478,7 +478,7 @@
* Returns a {@code NumberFormat} for formatting and parsing percentage
* values for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @return a {@code NumberFormat} for handling percentage values.
*/
public final static NumberFormat getPercentInstance() {
@@ -488,7 +488,7 @@
/**
* Returns a {@code NumberFormat} for formatting and parsing percentage
* values for the specified locale.
- *
+ *
* @param locale
* the locale to use.
* @return a {@code NumberFormat} for handling percentage values.
@@ -507,7 +507,7 @@
/**
* Indicates whether this number format formats and parses numbers using a
* grouping separator.
- *
+ *
* @return {@code true} if a grouping separator is used; {@code false}
* otherwise.
*/
@@ -518,7 +518,7 @@
/**
* Indicates whether this number format only parses integer numbers. Parsing
* stops if a decimal separator is encountered.
- *
+ *
* @return {@code true} if this number format only parses integers,
* {@code false} if if parsese integers as well as fractions.
*/
@@ -529,7 +529,7 @@
/**
* Parses a {@code Number} from the specified string using the rules of this
* number format.
- *
+ *
* @param string
* the string to parse.
* @return the {@code Number} resulting from the parsing.
@@ -551,7 +551,7 @@
* the index of the {@code ParsePosition} is updated to the index following
* the parsed text. On error, the index is unchanged and the error index of
* {@code ParsePosition} is set to the index where the error occurred.
- *
+ *
* @param string
* the string to parse.
* @param position
@@ -596,7 +596,7 @@
/**
* Sets whether this number format formats and parses numbers using a
* grouping separator.
- *
+ *
* @param value
* {@code true} if a grouping separator is used; {@code false}
* otherwise.
@@ -609,7 +609,7 @@
* Sets the maximum number of fraction digits that are printed when
* formatting. If the maximum is less than the number of fraction digits,
* the least significant digits are truncated.
- *
+ *
* @param value
* the maximum number of fraction digits.
*/
@@ -624,7 +624,7 @@
* Sets the new maximum count of integer digits that are printed when
* formatting. If the maximum is less than the number of integer digits, the
* most significant digits are truncated.
- *
+ *
* @param value
* the new maximum number of integer numerals for display.
*/
@@ -638,7 +638,7 @@
/**
* Sets the minimum number of fraction digits that are printed when
* formatting.
- *
+ *
* @param value
* the minimum number of fraction digits.
*/
@@ -652,7 +652,7 @@
/**
* Sets the minimum number of integer digits that are printed when
* formatting.
- *
+ *
* @param value
* the minimum number of integer digits.
*/
@@ -668,7 +668,7 @@
* else as any kind of number. If this method is called with a {@code true}
* value then subsequent parsing attempts will stop if a decimal separator
* is encountered.
- *
+ *
* @param value
* {@code true} to only parse integers, {@code false} to parse
* integers as well as fractions.
@@ -704,7 +704,7 @@
fields.put("minFractionDigits",
minimumFractionDigits < Byte.MAX_VALUE ? (byte) minimumFractionDigits
: Byte.MAX_VALUE);
- fields.put("minimumFractionDigits", minimumFractionDigits);
+ fields.put("minimumFractionDigits", minimumFractionDigits);
fields.put("minimumIntegerDigits", minimumIntegerDigits);
fields.put("minIntegerDigits",
minimumIntegerDigits < Byte.MAX_VALUE ? (byte) minimumIntegerDigits : Byte.MAX_VALUE);
diff --git a/luni/src/main/java/java/text/ParseException.java b/luni/src/main/java/java/text/ParseException.java
index b5a9c62..0d7f788 100644
--- a/luni/src/main/java/java/text/ParseException.java
+++ b/luni/src/main/java/java/text/ParseException.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@
/**
* Constructs a new instance of this class with its stack trace, detail
* message and the location of the error filled in.
- *
+ *
* @param detailMessage
* the detail message for this exception.
* @param location
@@ -42,7 +42,7 @@
/**
* Returns the index at which this parse exception occurred.
- *
+ *
* @return the location of this exception in the parsed string.
*/
public int getErrorOffset() {
diff --git a/luni/src/main/java/java/text/ParsePosition.java b/luni/src/main/java/java/text/ParsePosition.java
index 40a6d47..71ce866 100644
--- a/luni/src/main/java/java/text/ParsePosition.java
+++ b/luni/src/main/java/java/text/ParsePosition.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
/**
* Constructs a new {@code ParsePosition} with the specified index.
- *
+ *
* @param index
* the index to begin parsing.
*/
@@ -41,7 +41,7 @@
* if they are equal. In order to be equal, {@code object} must be an
* instance of {@code ParsePosition} and it must have the same index and
* error index.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this
@@ -60,7 +60,7 @@
/**
* Returns the index at which the parse could not continue.
- *
+ *
* @return the index of the parse error or -1 if there is no error.
*/
public int getErrorIndex() {
@@ -69,7 +69,7 @@
/**
* Returns the current parse position.
- *
+ *
* @return the current position.
*/
public int getIndex() {
@@ -83,7 +83,7 @@
/**
* Sets the index at which the parse could not continue.
- *
+ *
* @param index
* the index of the parse error.
*/
@@ -93,7 +93,7 @@
/**
* Sets the current parse position.
- *
+ *
* @param index
* the current parse position.
*/
@@ -103,12 +103,12 @@
/**
* Returns the string representation of this parse position.
- *
+ *
* @return the string representation of this parse position.
*/
@Override
public String toString() {
- return getClass().getName() + "[index=" + currentPosition
- + ", errorIndex=" + errorIndex + "]";
+ return getClass().getName() + "[index=" + currentPosition
+ + ", errorIndex=" + errorIndex + "]";
}
}
diff --git a/luni/src/main/java/java/text/RuleBasedBreakIterator.java b/luni/src/main/java/java/text/RuleBasedBreakIterator.java
index 2537f0c..7202cb6 100644
--- a/luni/src/main/java/java/text/RuleBasedBreakIterator.java
+++ b/luni/src/main/java/java/text/RuleBasedBreakIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#current()
*/
@Override
@@ -46,7 +46,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#first()
*/
@Override
@@ -56,7 +56,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#following(int)
*/
@Override
@@ -77,7 +77,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#getText()
*/
@Override
@@ -87,7 +87,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#last()
*/
@Override
@@ -97,7 +97,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#next()
*/
@Override
@@ -107,7 +107,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#next(int)
*/
@Override
@@ -117,7 +117,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#previous()
*/
@Override
@@ -127,7 +127,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#setText(java.text.CharacterIterator)
*/
@Override
@@ -139,7 +139,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#isBoundary(int)
*/
@Override
@@ -150,7 +150,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.text.BreakIterator#preceding(int)
*/
@Override
@@ -161,7 +161,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -174,7 +174,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#toString()
*/
@Override
@@ -184,7 +184,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#hashCode()
*/
@Override
@@ -194,7 +194,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.lang.Object#clone()
*/
@Override
diff --git a/luni/src/main/java/java/text/RuleBasedCollator.java b/luni/src/main/java/java/text/RuleBasedCollator.java
index 0955f89..9e638c9 100644
--- a/luni/src/main/java/java/text/RuleBasedCollator.java
+++ b/luni/src/main/java/java/text/RuleBasedCollator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -307,7 +307,7 @@
* Obtains a {@code CollationElementIterator} for the given
* {@code CharacterIterator}. The source iterator's integrity will be
* preserved since a new copy will be created for use.
- *
+ *
* @param source
* the source character iterator.
* @return a {@code CollationElementIterator} for {@code source}.
@@ -323,7 +323,7 @@
/**
* Obtains a {@code CollationElementIterator} for the given string.
- *
+ *
* @param source
* the source string.
* @return the {@code CollationElementIterator} for {@code source}.
@@ -356,7 +356,7 @@
/**
* Returns a new collator with the same collation rules, decomposition mode and
* strength value as this collator.
- *
+ *
* @return a shallow copy of this collator.
* @see java.lang.Cloneable
*/
@@ -378,7 +378,7 @@
* {@code CollationKey.compareTo(CollationKey)} for the comparisons. If each
* string is compared to only once, using
* {@code RuleBasedCollator.compare(String, String)} has better performance.
- *
+ *
* @param source
* the source text.
* @param target
@@ -397,7 +397,7 @@
/**
* Returns the {@code CollationKey} for the given source text.
- *
+ *
* @param source
* the specified source text.
* @return the {@code CollationKey} for the given source text.
@@ -417,7 +417,7 @@
* indicates if they are equal. In order to be equal, {@code object} must be
* an instance of {@code Collator} with the same collation rules and the
* same attributes.
- *
+ *
* @param obj
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this
diff --git a/luni/src/main/java/java/text/SimpleDateFormat.java b/luni/src/main/java/java/text/SimpleDateFormat.java
index c910574..35c6d47 100644
--- a/luni/src/main/java/java/text/SimpleDateFormat.java
+++ b/luni/src/main/java/java/text/SimpleDateFormat.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -218,7 +218,7 @@
* A pattern containing any invalid pattern letter will result in an exception
* thrown during formatting or parsing.
* <h4>Examples Using the US Locale</h4> <blockquote>
- *
+ *
* <pre>
* Format Pattern Result
* -------------- -------
@@ -229,25 +229,25 @@
* "K:mm a, vvv" → 0:00 PM, PT
* "yyyyy.MMMMM.dd GGG hh:mm aaa" → 01996.July.10 AD 12:08 PM
* </pre>
- *
+ *
* </blockquote> <h4>Code Sample:</h4> <blockquote>
- *
+ *
* <pre>
* SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, "PST");
* pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
* pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
- *
+ *
* // Format the current time.
* SimpleDateFormat formatter = new SimpleDateFormat(
* "yyyy.MM.dd G 'at' hh:mm:ss a zzz");
* Date currentTime_1 = new Date();
* String dateString = formatter.format(currentTime_1);
- *
+ *
* // Parse the previous string back into a Date.
* ParsePosition pos = new ParsePosition(0);
* Date currentTime_2 = formatter.parse(dateString, pos);
* </pre>
- *
+ *
* </blockquote>
* <p>
* In the example, the time value {@code currentTime_2} obtained from parsing
@@ -296,7 +296,7 @@
* <h4>Synchronization</h4> Date formats are not synchronized. It is recommended
* to create separate format instances for each thread. If multiple threads
* access a format concurrently, it must be synchronized externally.
- *
+ *
* @see Calendar
* @see GregorianCalendar
* @see java.util.TimeZone
@@ -334,7 +334,7 @@
* non-localized pattern and the {@code DateFormatSymbols} and {@code
* Calendar} for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param pattern
* the pattern.
* @throws NullPointerException
@@ -346,7 +346,7 @@
public SimpleDateFormat(String pattern) {
this(pattern, Locale.getDefault());
}
-
+
/**
* Validates the format character.
*
@@ -421,13 +421,13 @@
throw new IllegalArgumentException("Unterminated quote");
}
}
-
+
/**
* Constructs a new {@code SimpleDateFormat} using the specified
* non-localized pattern and {@code DateFormatSymbols} and the {@code
* Calendar} for the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param template
* the pattern.
* @param value
@@ -448,7 +448,7 @@
* Constructs a new {@code SimpleDateFormat} using the specified
* non-localized pattern and the {@code DateFormatSymbols} and {@code
* Calendar} for the specified locale.
- *
+ *
* @param template
* the pattern.
* @param locale
@@ -487,7 +487,7 @@
/**
* Changes the pattern of this simple date format to the specified pattern
* which uses localized pattern characters.
- *
+ *
* @param template
* the localized pattern.
*/
@@ -501,7 +501,7 @@
/**
* Changes the pattern of this simple date format to the specified pattern
* which uses non-localized pattern characters.
- *
+ *
* @param template
* the non-localized pattern.
* @throws NullPointerException
@@ -525,7 +525,7 @@
/**
* Converts the Java-spec pattern into an equivalent pattern used by ICU.
- *
+ *
* @param p
* the Java-spec style pattern.
* @return the ICU-style pattern.
@@ -556,7 +556,7 @@
/**
* Returns a new {@code SimpleDateFormat} with the same pattern and
* properties as this simple date format.
- *
+ *
* @return a shallow copy of this simple date format.
* @see java.lang.Cloneable
*/
@@ -578,7 +578,7 @@
* if they are equal. In order to be equal, {@code object} must be an
* instance of {@code SimpleDateFormat} and have the same {@code DateFormat}
* properties, pattern, {@code DateFormatSymbols} and creation year.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this simple date
@@ -602,7 +602,7 @@
* Formats the specified object using the rules of this simple date format
* and returns an {@code AttributedCharacterIterator} with the formatted
* date and attributes.
- *
+ *
* @param object
* the object to format.
* @return an {@code AttributedCharacterIterator} with the formatted date
@@ -626,9 +626,9 @@
.longValue()));
}
throw new IllegalArgumentException();
-
+
}
-
+
private AttributedCharacterIterator formatToCharacterIteratorImpl(Date date) {
StringBuffer buffer = new StringBuffer();
Vector<FieldPosition> fields = new Vector<FieldPosition>();
@@ -661,7 +661,7 @@
* If the Vector {@code fields} is not null, find fields of this
* date, set FieldPositions with these fields, and add them to the fields
* vector.
- *
+ *
* @param date
* Date to Format
* @param buffer
@@ -728,7 +728,7 @@
}
return buffer;
}
-
+
private void append(StringBuffer buffer, FieldPosition position,
Vector<FieldPosition> fields, char format, int count) {
int field = -1;
@@ -864,10 +864,10 @@
}
}
}
-
+
/**
* Append a representation of the time zone of 'calendar' to 'buffer'.
- *
+ *
* @param count the number of z or Z characters in the format string; "zzz" would be 3,
* for example.
* @param generalTimeZone true if we should use a display name ("PDT") if available;
@@ -1340,7 +1340,7 @@
/**
* Sets the {@code DateFormatSymbols} used by this simple date format.
- *
+ *
* @param value
* the new {@code DateFormatSymbols} object.
*/
@@ -1356,7 +1356,7 @@
/**
* Returns the pattern of this simple date format using localized pattern
* characters.
- *
+ *
* @return the localized pattern.
*/
public String toLocalizedPattern() {
@@ -1369,7 +1369,7 @@
/**
* Returns the pattern of this simple date format using non-localized
* pattern characters.
- *
+ *
* @return the non-localized pattern.
*/
public String toPattern() {
diff --git a/luni/src/main/java/java/text/StringCharacterIterator.java b/luni/src/main/java/java/text/StringCharacterIterator.java
index ea60180..8b0e2b7 100644
--- a/luni/src/main/java/java/text/StringCharacterIterator.java
+++ b/luni/src/main/java/java/text/StringCharacterIterator.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
* Constructs a new {@code StringCharacterIterator} on the specified string.
* The begin and current indices are set to the beginning of the string, the
* end index is set to the length of the string.
- *
+ *
* @param value
* the source string to iterate over.
*/
@@ -45,7 +45,7 @@
* with the current index set to the specified value. The begin index is set
* to the beginning of the string, the end index is set to the length of the
* string.
- *
+ *
* @param value
* the source string to iterate over.
* @param location
@@ -67,7 +67,7 @@
/**
* Constructs a new {@code StringCharacterIterator} on the specified string
* with the begin, end and current index set to the specified values.
- *
+ *
* @param value
* the source string to iterate over.
* @param start
@@ -96,7 +96,7 @@
/**
* Returns a new {@code StringCharacterIterator} with the same source
* string, begin, end, and current index as this iterator.
- *
+ *
* @return a shallow copy of this iterator.
* @see java.lang.Cloneable
*/
@@ -111,7 +111,7 @@
/**
* Returns the character at the current index in the source string.
- *
+ *
* @return the current character, or {@code DONE} if the current index is
* past the end.
*/
@@ -127,7 +127,7 @@
* and indicates if they are equal. In order to be equal, {@code object}
* must be an instance of {@code StringCharacterIterator} that iterates over
* the same sequence of characters with the same index.
- *
+ *
* @param object
* the object to compare with this object.
* @return {@code true} if the specified object is equal to this
@@ -147,7 +147,7 @@
/**
* Sets the current position to the begin index and returns the character at
* the new position in the source string.
- *
+ *
* @return the character at the begin index or {@code DONE} if the begin
* index is equal to the end index.
*/
@@ -161,7 +161,7 @@
/**
* Returns the begin index in the source string.
- *
+ *
* @return the index of the first character of the iteration.
*/
public int getBeginIndex() {
@@ -170,7 +170,7 @@
/**
* Returns the end index in the source string.
- *
+ *
* @return the index one past the last character of the iteration.
*/
public int getEndIndex() {
@@ -179,7 +179,7 @@
/**
* Returns the current index in the source string.
- *
+ *
* @return the current index.
*/
public int getIndex() {
@@ -194,7 +194,7 @@
/**
* Sets the current position to the end index - 1 and returns the character
* at the new position.
- *
+ *
* @return the character before the end index or {@code DONE} if the begin
* index is equal to the end index.
*/
@@ -222,7 +222,7 @@
/**
* Decrements the current index and returns the character at the new index.
- *
+ *
* @return the character at the previous index, or {@code DONE} if the
* previous index would be past the beginning.
*/
@@ -235,7 +235,7 @@
/**
* Sets the current index in the source string.
- *
+ *
* @param location
* the index the current position is set to.
* @return the character at the new index, or {@code DONE} if
@@ -258,7 +258,7 @@
/**
* Sets the source string to iterate over. The begin and end positions are
* set to the start and end of this string.
- *
+ *
* @param value
* the new source string.
*/
diff --git a/luni/src/main/java/java/text/spi/BreakIteratorProvider.java b/luni/src/main/java/java/text/spi/BreakIteratorProvider.java
index e2f85d7..7a7bff2 100644
--- a/luni/src/main/java/java/text/spi/BreakIteratorProvider.java
+++ b/luni/src/main/java/java/text/spi/BreakIteratorProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
/**
* Returns an instance of {@code BreakIterator} for word breaks in the
* given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code BreakIterator}
* @throws NullPointerException if {@code locale == null}
@@ -52,7 +52,7 @@
/**
* Returns an instance of {@code BreakIterator} for line breaks in the
* given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code BreakIterator}
* @throws NullPointerException if {@code locale == null}
@@ -65,7 +65,7 @@
/**
* Returns an instance of {@code BreakIterator} for character breaks in the
* given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code BreakIterator}
* @throws NullPointerException if {@code locale == null}
@@ -78,7 +78,7 @@
/**
* Returns an instance of {@code BreakIterator} for sentence breaks in the
* given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code BreakIterator}
* @throws NullPointerException if {@code locale == null}
diff --git a/luni/src/main/java/java/text/spi/CollatorProvider.java b/luni/src/main/java/java/text/spi/CollatorProvider.java
index 8d234a1..6e3655f 100644
--- a/luni/src/main/java/java/text/spi/CollatorProvider.java
+++ b/luni/src/main/java/java/text/spi/CollatorProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
/**
* Returns an instance of {@code Collator} for the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code Collator}
* @throws NullPointerException if {@code locale == null}
diff --git a/luni/src/main/java/java/text/spi/DateFormatProvider.java b/luni/src/main/java/java/text/spi/DateFormatProvider.java
index ba17cb4..ad8e6b1 100644
--- a/luni/src/main/java/java/text/spi/DateFormatProvider.java
+++ b/luni/src/main/java/java/text/spi/DateFormatProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
/**
* Returns an instance of {@code DateFormat} that formats times
* in the given style for the given locale.
- *
+ *
* @param style the given time formatting style.
* @param locale the locale
* @return an instance of {@code DateFormat}
@@ -53,7 +53,7 @@
/**
* Returns an instance of {@code DateFormat} that formats dates
* in the given style for the given locale.
- *
+ *
* @param style the given date formatting style.
* @param locale the locale
* @return an instance of {@code DateFormat}
@@ -67,7 +67,7 @@
/**
* Returns an instance of {@code DateFormat} that formats dates and times
* in the given style for the given locale.
- *
+ *
* @param dateStyle the given date formatting style.
* @param timeStyle the given time formatting style.
* @param locale the locale
diff --git a/luni/src/main/java/java/text/spi/DateFormatSymbolsProvider.java b/luni/src/main/java/java/text/spi/DateFormatSymbolsProvider.java
index 8467f05..a2ace4f 100644
--- a/luni/src/main/java/java/text/spi/DateFormatSymbolsProvider.java
+++ b/luni/src/main/java/java/text/spi/DateFormatSymbolsProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
/**
* Returns an instance of {@code DateFormatSymbols} for the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code DateFormatSymbols}
* @throws NullPointerException if {@code locale == null}
diff --git a/luni/src/main/java/java/text/spi/DecimalFormatSymbolsProvider.java b/luni/src/main/java/java/text/spi/DecimalFormatSymbolsProvider.java
index 81dbd4a..3473a4b 100644
--- a/luni/src/main/java/java/text/spi/DecimalFormatSymbolsProvider.java
+++ b/luni/src/main/java/java/text/spi/DecimalFormatSymbolsProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
/**
* Returns an instance of {@code DecimalFormatSymbols} for the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code DecimalFormatSymbols}
* @throws NullPointerException if {@code locale == null}
diff --git a/luni/src/main/java/java/text/spi/NumberFormatProvider.java b/luni/src/main/java/java/text/spi/NumberFormatProvider.java
index f6d43e0..34c557f 100644
--- a/luni/src/main/java/java/text/spi/NumberFormatProvider.java
+++ b/luni/src/main/java/java/text/spi/NumberFormatProvider.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,7 +39,7 @@
/**
* Returns an instance of {@code NumberFormat} that formats
* monetary values for the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code NumberFormat}
* @throws NullPointerException if {@code locale == null}
@@ -55,7 +55,7 @@
* is configured to round floating point numbers to the nearest integer
* using half-even rounding mode for formatting, and to parse only the
* integer part of an input string.
- *
+ *
* @param locale the locale
* @return an instance of {@code NumberFormat}
* @throws NullPointerException if {@code locale == null}
@@ -68,7 +68,7 @@
/**
* Returns an instance of {@code NumberFormat} class for general
* use in the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code NumberFormat}
* @throws NullPointerException if {@code locale == null}
@@ -81,7 +81,7 @@
/**
* Returns an instance of {@code NumberFormat} class that formats
* percentage values for the given locale.
- *
+ *
* @param locale the locale
* @return an instance of {@code NumberFormat}
* @throws NullPointerException if {@code locale == null}
diff --git a/luni/src/main/java/java/util/AbstractCollection.java b/luni/src/main/java/java/util/AbstractCollection.java
index 925176f..5c836eb 100644
--- a/luni/src/main/java/java/util/AbstractCollection.java
+++ b/luni/src/main/java/java/util/AbstractCollection.java
@@ -53,7 +53,7 @@
* If the passed {@code Collection} is changed during the process of adding elements
* to this {@code Collection}, the behavior depends on the behavior of the passed
* {@code Collection}.
- *
+ *
* @param collection
* the collection of objects.
* @return {@code true} if this {@code Collection} is modified, {@code false}
@@ -89,7 +89,7 @@
* <p>
* Concrete implementations usually can clear a {@code Collection} more efficiently
* and should therefore overwrite this method.
- *
+ *
* @throws UnsupportedOperationException
* it the iterator does not support removing elements from
* this {@code Collection}
@@ -113,7 +113,7 @@
* the iterator until the element is found. If {@code object == null} then
* each element {@code e} returned by the iterator is compared with the test
* {@code e == null}.
- *
+ *
* @param object
* the object to search for.
* @return {@code true} if object is an element of this {@code Collection}, {@code
@@ -147,7 +147,7 @@
* specified {@code Collection}. This implementation iterates over the specified
* {@code Collection}. If one element returned by the iterator is not contained in
* this {@code Collection}, then {@code false} is returned; {@code true} otherwise.
- *
+ *
* @param collection
* the collection of objects.
* @return {@code true} if all objects in the specified {@code Collection} are
@@ -175,7 +175,7 @@
/**
* Returns if this {@code Collection} contains no elements. This implementation
* tests, whether {@code size} returns 0.
- *
+ *
* @return {@code true} if this {@code Collection} has no elements, {@code false}
* otherwise.
*
@@ -193,7 +193,7 @@
* <p>
* In this class this method is declared abstract and has to be implemented
* by concrete {@code Collection} implementations.
- *
+ *
* @return an iterator for accessing the {@code Collection} contents.
*/
public abstract Iterator<E> iterator();
@@ -209,7 +209,7 @@
* {@code true} is returned, {@code false} otherwise. If the iterator does
* not support removing elements, an {@code UnsupportedOperationException}
* is thrown.
- *
+ *
* @param object
* the object to remove.
* @return {@code true} if this {@code Collection} is modified, {@code false}
@@ -254,7 +254,7 @@
* remove} method is called on the iterator. If the iterator does not
* support removing elements, an {@code UnsupportedOperationException} is
* thrown.
- *
+ *
* @param collection
* the collection of objects to remove.
* @return {@code true} if this {@code Collection} is modified, {@code false}
@@ -295,7 +295,7 @@
* remove} method is called on the iterator. If the iterator does not
* support removing elements, an {@code UnsupportedOperationException} is
* thrown.
- *
+ *
* @param collection
* the collection of objects to retain.
* @return {@code true} if this {@code Collection} is modified, {@code false}
@@ -329,7 +329,7 @@
* <p>
* In this class this method is declared abstract and has to be implemented
* by concrete {@code Collection} implementations.
- *
+ *
* @return how many objects this {@code Collection} contains, or {@code Integer.MAX_VALUE}
* if there are more than {@code Integer.MAX_VALUE} elements in this
* {@code Collection}.
@@ -366,13 +366,13 @@
* Returns the string representation of this {@code Collection}. The presentation
* has a specific format. It is enclosed by square brackets ("[]"). Elements
* are separated by ', ' (comma and space).
- *
+ *
* @return the string representation of this {@code Collection}.
*/
@Override
public String toString() {
if (isEmpty()) {
- return "[]";
+ return "[]";
}
StringBuilder buffer = new StringBuilder(size() * 16);
@@ -383,10 +383,10 @@
if (next != this) {
buffer.append(next);
} else {
- buffer.append("(this Collection)");
+ buffer.append("(this Collection)");
}
if (it.hasNext()) {
- buffer.append(", ");
+ buffer.append(", ");
}
}
buffer.append(']');
diff --git a/luni/src/main/java/java/util/AbstractQueue.java b/luni/src/main/java/java/util/AbstractQueue.java
index 4b4fccf..8ec69f9 100644
--- a/luni/src/main/java/java/util/AbstractQueue.java
+++ b/luni/src/main/java/java/util/AbstractQueue.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
/**
* Adds an element to the queue.
- *
+ *
* @param o
* the element to be added to the queue.
* @return {@code true} if the operation succeeds, otherwise {@code false}.
@@ -63,7 +63,7 @@
* in the collection which have already successfully been added will remain
* in the queue. The result of the method is undefined if the collection is
* modified during the process of the method.
- *
+ *
* @param c
* the collection to be added to the queue.
* @return {@code true} if the operation succeeds, otherwise {@code false}.
@@ -86,7 +86,7 @@
/**
* Removes the element at the head of the queue and returns it.
- *
+ *
* @return the element at the head of the queue.
* @throws NoSuchElementException
* if the queue is empty.
@@ -101,7 +101,7 @@
/**
* Returns but does not remove the element at the head of the queue.
- *
+ *
* @return the element at the head of the queue.
* @throws NoSuchElementException
* if the queue is empty.
diff --git a/luni/src/main/java/java/util/AbstractSet.java b/luni/src/main/java/java/util/AbstractSet.java
index 1515550..b71b05b 100644
--- a/luni/src/main/java/java/util/AbstractSet.java
+++ b/luni/src/main/java/java/util/AbstractSet.java
@@ -21,7 +21,7 @@
* An AbstractSet is an abstract implementation of the Set interface. This
* implementation does not support adding. A subclass must implement the
* abstract methods iterator() and size().
- *
+ *
* @since 1.2
*/
public abstract class AbstractSet<E> extends AbstractCollection<E> implements
@@ -38,7 +38,7 @@
* Compares the specified object to this Set and returns true if they are
* equal. The object must be an instance of Set and contain the same
* objects.
- *
+ *
* @param object
* the object to compare with this set.
* @return {@code true} if the specified object is equal to this set,
@@ -68,7 +68,7 @@
* Returns the hash code for this set. Two set which are equal must return
* the same value. This implementation calculates the hash code by adding
* each element's hash code.
- *
+ *
* @return the hash code of this set.
* @see #equals
*/
@@ -86,7 +86,7 @@
/**
* Removes all occurrences in this collection which are contained in the
* specified collection.
- *
+ *
* @param collection
* the collection of objects to remove.
* @return {@code true} if this collection was modified, {@code false}
diff --git a/luni/src/main/java/java/util/ArrayList.java b/luni/src/main/java/java/util/ArrayList.java
index ba96593..59331f2 100644
--- a/luni/src/main/java/java/util/ArrayList.java
+++ b/luni/src/main/java/java/util/ArrayList.java
@@ -31,16 +31,16 @@
/**
* ArrayList is an implementation of {@link List}, backed by an array.
* All optional operations including adding, removing, and replacing elements are supported.
- *
+ *
* <p>All elements are permitted, including null.
- *
+ *
* <p>This class is a good choice as your default {@code List} implementation.
* {@link Vector} synchronizes all operations, but not necessarily in a way that's
* meaningful to your application: synchronizing each call to {@code get}, for example, is not
* equivalent to synchronizing the list and iterating over it (which is probably what you intended).
* {@link java.util.concurrent.CopyOnWriteArrayList} is intended for the special case of very high
* concurrency, frequent traversals, and very rare mutations.
- *
+ *
* @param <E> The element type of this list.
* @since 1.2
*/
diff --git a/luni/src/main/java/java/util/Arrays.java b/luni/src/main/java/java/util/Arrays.java
index 012708d..a09cb5d 100644
--- a/luni/src/main/java/java/util/Arrays.java
+++ b/luni/src/main/java/java/util/Arrays.java
@@ -1749,16 +1749,16 @@
private static void checkFillBounds(int arrLength, int start, int end) {
if (start > end) {
// K0033=Start index ({0}) is greater than end index ({1})
- throw new IllegalArgumentException(Msg.getString("K0033",
+ throw new IllegalArgumentException(Msg.getString("K0033",
start, end));
}
if (start < 0) {
// K0052=Array index out of range\: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0052", start));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0052", start));
}
if (end > arrLength) {
// K0052=Array index out of range\: {0}
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0052", end));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0052", end));
}
}
@@ -2119,16 +2119,16 @@
*/
public static String toString(boolean[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 7); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2149,16 +2149,16 @@
*/
public static String toString(byte[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 6); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2179,16 +2179,16 @@
*/
public static String toString(char[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 3); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2209,16 +2209,16 @@
*/
public static String toString(double[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 7); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2239,16 +2239,16 @@
*/
public static String toString(float[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 7); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2269,16 +2269,16 @@
*/
public static String toString(int[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 6); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2299,16 +2299,16 @@
*/
public static String toString(long[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 6); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2329,16 +2329,16 @@
*/
public static String toString(short[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 6); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2359,16 +2359,16 @@
*/
public static String toString(Object[] array) {
if (array == null) {
- return "null";
+ return "null";
}
if (array.length == 0) {
- return "[]";
+ return "[]";
}
StringBuilder sb = new StringBuilder(array.length * 7); // android-changed
sb.append('[');
sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
- sb.append(", ");
+ sb.append(", ");
sb.append(array[i]);
}
sb.append(']');
@@ -2395,7 +2395,7 @@
public static String deepToString(Object[] array) {
// Special case null to prevent NPE
if (array == null) {
- return "null";
+ return "null";
}
// delegate this to the recursive method
StringBuilder buf = new StringBuilder(array.length * 9); // android-changed
@@ -2420,7 +2420,7 @@
private static void deepToStringImpl(Object[] array, Object[] origArrays,
StringBuilder sb) {
if (array == null) {
- sb.append("null");
+ sb.append("null");
return;
}
@@ -2428,13 +2428,13 @@
for (int i = 0; i < array.length; i++) {
if (i != 0) {
- sb.append(", ");
+ sb.append(", ");
}
// establish current element
Object elem = array[i];
if (elem == null) {
// element is null
- sb.append("null");
+ sb.append("null");
} else {
// get the Class of the current element
Class<?> elemClass = elem.getClass();
@@ -2469,7 +2469,7 @@
// element is an Object[], so we assert that
assert elem instanceof Object[];
if (deepToStringImplContains(origArrays, elem)) {
- sb.append("[...]");
+ sb.append("[...]");
} else {
Object[] newArray = (Object[]) elem;
Object[] newOrigArrays = new Object[origArrays.length + 1];
diff --git a/luni/src/main/java/java/util/BitSet.java b/luni/src/main/java/java/util/BitSet.java
index 1d3edd0..4bff1c1 100644
--- a/luni/src/main/java/java/util/BitSet.java
+++ b/luni/src/main/java/java/util/BitSet.java
@@ -240,7 +240,7 @@
public boolean get(int pos) {
if (pos < 0) {
// Negative index specified
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
int arrayPos = pos >> OFFSET;
@@ -267,7 +267,7 @@
*/
public BitSet get(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
int last = actualArrayLength << OFFSET;
@@ -338,7 +338,7 @@
*/
public void set(int pos) {
if (pos < 0) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
int len = (pos >> OFFSET) + 1;
@@ -388,7 +388,7 @@
*/
public void set(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
if (pos1 == pos2) {
@@ -477,7 +477,7 @@
public void clear(int pos) {
if (pos < 0) {
// Negative index specified
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
if (!needClear) {
@@ -507,7 +507,7 @@
*/
public void clear(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
if (!needClear) {
@@ -552,7 +552,7 @@
*/
public void flip(int pos) {
if (pos < 0) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
int len = (pos >> OFFSET) + 1;
@@ -582,7 +582,7 @@
*/
public void flip(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
if (pos1 == pos2) {
@@ -830,7 +830,7 @@
for (int j = 0; j < ELM_SIZE; j++) {
if (((bits[i] & (TWO_N_ARRAY[j])) != 0)) {
if (comma) {
- sb.append(", ");
+ sb.append(", ");
}
sb.append(bitCount);
comma = true;
@@ -851,7 +851,7 @@
*/
public int nextSetBit(int pos) {
if (pos < 0) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
if (pos >= actualArrayLength << OFFSET) {
@@ -897,7 +897,7 @@
*/
public int nextClearBit(int pos) {
if (pos < 0) {
- throw new IndexOutOfBoundsException(Msg.getString("K0006"));
+ throw new IndexOutOfBoundsException(Msg.getString("K0006"));
}
int length = actualArrayLength;
diff --git a/luni/src/main/java/java/util/Calendar.java b/luni/src/main/java/java/util/Calendar.java
index 7748498..0b048d8 100644
--- a/luni/src/main/java/java/util/Calendar.java
+++ b/luni/src/main/java/java/util/Calendar.java
@@ -1417,10 +1417,10 @@
* Returns a human-readable string for the value of {@code field}
* using the given style and locale. If no string is available, returns null.
* The value is retrieved by invoking {@code get(field)}.
- *
+ *
* <p>For example, {@code getDisplayName(MONTH, SHORT, Locale.US)} will return "Jan"
* while {@code getDisplayName(MONTH, LONG, Locale.US)} will return "January".
- *
+ *
* @param field the field
* @param style {@code SHORT} or {@code LONG}
* @param locale the locale
@@ -1469,10 +1469,10 @@
* Returns a map of human-readable strings to corresponding values,
* for the given field, style, and locale.
* Returns null if no strings are available.
- *
+ *
* <p>For example, {@code getDisplayNames(MONTH, ALL_STYLES, Locale.US)} would
* contain mappings from "Jan" and "January" to {@link JANUARY}, and so on.
- *
+ *
* @param field the field
* @param style {@code SHORT}, {@code LONG}, or {@code ALL_STYLES}
* @param locale the locale
@@ -1508,33 +1508,33 @@
@SuppressWarnings("nls")
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("areFieldsSet", Boolean.TYPE),
- new ObjectStreamField("fields", int[].class),
- new ObjectStreamField("firstDayOfWeek", Integer.TYPE),
- new ObjectStreamField("isSet", boolean[].class),
- new ObjectStreamField("isTimeSet", Boolean.TYPE),
- new ObjectStreamField("lenient", Boolean.TYPE),
- new ObjectStreamField("minimalDaysInFirstWeek", Integer.TYPE),
- new ObjectStreamField("nextStamp", Integer.TYPE),
- new ObjectStreamField("serialVersionOnStream", Integer.TYPE),
- new ObjectStreamField("time", Long.TYPE),
- new ObjectStreamField("zone", TimeZone.class), };
+ new ObjectStreamField("areFieldsSet", Boolean.TYPE),
+ new ObjectStreamField("fields", int[].class),
+ new ObjectStreamField("firstDayOfWeek", Integer.TYPE),
+ new ObjectStreamField("isSet", boolean[].class),
+ new ObjectStreamField("isTimeSet", Boolean.TYPE),
+ new ObjectStreamField("lenient", Boolean.TYPE),
+ new ObjectStreamField("minimalDaysInFirstWeek", Integer.TYPE),
+ new ObjectStreamField("nextStamp", Integer.TYPE),
+ new ObjectStreamField("serialVersionOnStream", Integer.TYPE),
+ new ObjectStreamField("time", Long.TYPE),
+ new ObjectStreamField("zone", TimeZone.class), };
@SuppressWarnings("nls")
private void writeObject(ObjectOutputStream stream) throws IOException {
complete();
ObjectOutputStream.PutField putFields = stream.putFields();
- putFields.put("areFieldsSet", areFieldsSet);
- putFields.put("fields", this.fields);
- putFields.put("firstDayOfWeek", firstDayOfWeek);
- putFields.put("isSet", isSet);
- putFields.put("isTimeSet", isTimeSet);
- putFields.put("lenient", lenient);
- putFields.put("minimalDaysInFirstWeek", minimalDaysInFirstWeek);
- putFields.put("nextStamp", 2 /* MINIMUM_USER_STAMP */);
- putFields.put("serialVersionOnStream", 1);
- putFields.put("time", time);
- putFields.put("zone", zone);
+ putFields.put("areFieldsSet", areFieldsSet);
+ putFields.put("fields", this.fields);
+ putFields.put("firstDayOfWeek", firstDayOfWeek);
+ putFields.put("isSet", isSet);
+ putFields.put("isTimeSet", isTimeSet);
+ putFields.put("lenient", lenient);
+ putFields.put("minimalDaysInFirstWeek", minimalDaysInFirstWeek);
+ putFields.put("nextStamp", 2 /* MINIMUM_USER_STAMP */);
+ putFields.put("serialVersionOnStream", 1);
+ putFields.put("time", time);
+ putFields.put("zone", zone);
stream.writeFields();
}
@@ -1542,14 +1542,14 @@
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField readFields = stream.readFields();
- areFieldsSet = readFields.get("areFieldsSet", false);
- this.fields = (int[]) readFields.get("fields", null);
- firstDayOfWeek = readFields.get("firstDayOfWeek", Calendar.SUNDAY);
- isSet = (boolean[]) readFields.get("isSet", null);
- isTimeSet = readFields.get("isTimeSet", false);
- lenient = readFields.get("lenient", true);
- minimalDaysInFirstWeek = readFields.get("minimalDaysInFirstWeek", 1);
- time = readFields.get("time", 0L);
- zone = (TimeZone) readFields.get("zone", null);
+ areFieldsSet = readFields.get("areFieldsSet", false);
+ this.fields = (int[]) readFields.get("fields", null);
+ firstDayOfWeek = readFields.get("firstDayOfWeek", Calendar.SUNDAY);
+ isSet = (boolean[]) readFields.get("isSet", null);
+ isTimeSet = readFields.get("isTimeSet", false);
+ lenient = readFields.get("lenient", true);
+ minimalDaysInFirstWeek = readFields.get("minimalDaysInFirstWeek", 1);
+ time = readFields.get("time", 0L);
+ zone = (TimeZone) readFields.get("zone", null);
}
}
diff --git a/luni/src/main/java/java/util/Collections.java b/luni/src/main/java/java/util/Collections.java
index eee5a01..12cf940 100644
--- a/luni/src/main/java/java/util/Collections.java
+++ b/luni/src/main/java/java/util/Collections.java
@@ -1593,7 +1593,7 @@
List<? extends T> source) {
if (destination.size() < source.size()) {
// K0032=Source size {0} does not fit into destination
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0032", source.size()));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0032", source.size()));
}
Iterator<? extends T> srcIt = source.iterator();
ListIterator<? super T> destIt = destination.listIterator();
@@ -1602,7 +1602,7 @@
destIt.next();
} catch (NoSuchElementException e) {
// K0032=Source size {0} does not fit into destination
- throw new ArrayIndexOutOfBoundsException(Msg.getString("K0032", source.size()));
+ throw new ArrayIndexOutOfBoundsException(Msg.getString("K0032", source.size()));
}
destIt.set(srcIt.next());
}
@@ -3531,7 +3531,7 @@
/**
* Constructs a dynamically typesafe view of the specified entry
* set.
- *
+ *
* @param s -
* the entry set for which a dynamically typesafe view is
* to be constructed.
@@ -3681,7 +3681,7 @@
/**
* Constructs a dynamically typesafe view of the specified entry
* iterator.
- *
+ *
* @param i -
* the entry iterator for which a dynamically
* typesafe view is to be constructed.
@@ -3730,7 +3730,7 @@
/**
* Constructs a dynamically typesafe view of the specified sortedSet.
- *
+ *
* @param s -
* the sortedSet for which a dynamically typesafe view is to
* be constructed.
@@ -3796,7 +3796,7 @@
/**
* Constructs a dynamically typesafe view of the specified sortedMap.
- *
+ *
* @param m -
* the sortedMap for which a dynamically typesafe view is to
* be constructed.
diff --git a/luni/src/main/java/java/util/ConcurrentModificationException.java b/luni/src/main/java/java/util/ConcurrentModificationException.java
index a9ca4e3..03cb223 100644
--- a/luni/src/main/java/java/util/ConcurrentModificationException.java
+++ b/luni/src/main/java/java/util/ConcurrentModificationException.java
@@ -21,7 +21,7 @@
* An {@code ConcurrentModificationException} is thrown when a Collection is
* modified and an existing iterator on the Collection is used to modify the
* Collection as well.
- *
+ *
* @see java.lang.RuntimeException
*/
public class ConcurrentModificationException extends RuntimeException {
@@ -39,7 +39,7 @@
/**
* Constructs a new {@code ConcurrentModificationException} with the current
* stack trace and message filled in.
- *
+ *
* @param detailMessage
* the detail message for the exception.
*/
diff --git a/luni/src/main/java/java/util/Dictionary.java b/luni/src/main/java/java/util/Dictionary.java
index c29b11b..1895fa1 100644
--- a/luni/src/main/java/java/util/Dictionary.java
+++ b/luni/src/main/java/java/util/Dictionary.java
@@ -23,7 +23,7 @@
* <p>
* Dictionary is an abstract class which is the superclass of all classes that
* associate keys with values, such as {@code Hashtable}.
- *
+ *
* @see Hashtable
* @since 1.0
*/
@@ -37,7 +37,7 @@
/**
* Returns an enumeration on the elements of this dictionary.
- *
+ *
* @return an enumeration of the values of this dictionary.
* @see #keys
* @see #size
@@ -47,7 +47,7 @@
/**
* Returns the value which is associated with {@code key}.
- *
+ *
* @param key
* the key of the value returned.
* @return the value associated with {@code key}, or {@code null} if the
@@ -58,7 +58,7 @@
/**
* Returns true if this dictionary has no key/value pairs.
- *
+ *
* @return {@code true} if this dictionary has no key/value pairs,
* {@code false} otherwise.
* @see #size
@@ -67,7 +67,7 @@
/**
* Returns an enumeration on the keys of this dictionary.
- *
+ *
* @return an enumeration of the keys of this dictionary.
* @see #elements
* @see #size
@@ -79,7 +79,7 @@
* Associate {@code key} with {@code value} in this dictionary. If {@code
* key} exists in the dictionary before this call, the old value in the
* dictionary is replaced by {@code value}.
- *
+ *
* @param key
* the key to add.
* @param value
@@ -95,7 +95,7 @@
/**
* Removes the key/value pair with the specified {@code key} from this
* dictionary.
- *
+ *
* @param key
* the key to remove.
* @return the associated value before the deletion or {@code null} if
@@ -107,7 +107,7 @@
/**
* Returns the number of key/value pairs in this dictionary.
- *
+ *
* @return the number of key/value pairs in this dictionary.
* @see #elements
* @see #keys
diff --git a/luni/src/main/java/java/util/DuplicateFormatFlagsException.java b/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
index 3330dcb..7362e9b 100644
--- a/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
+++ b/luni/src/main/java/java/util/DuplicateFormatFlagsException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
/**
* Constructs a new {@code DuplicateFormatFlagsException} with the flags
* containing duplicates.
- *
+ *
* @param f
* the format flags that contain a duplicate flag.
*/
@@ -44,7 +44,7 @@
/**
* Returns the format flags that contain a duplicate flag.
- *
+ *
* @return the format flags that contain a duplicate flag.
*/
public String getFlags() {
@@ -53,7 +53,7 @@
/**
* Returns the message string of the DuplicateFormatFlagsException.
- *
+ *
* @return the message string of the DuplicateFormatFlagsException.
*/
@Override
diff --git a/luni/src/main/java/java/util/EnumMap.java b/luni/src/main/java/java/util/EnumMap.java
index c5f3111..34bfb5f 100644
--- a/luni/src/main/java/java/util/EnumMap.java
+++ b/luni/src/main/java/java/util/EnumMap.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -112,7 +112,7 @@
public String toString() {
StringBuilder result = new StringBuilder(enumMap.keys[ordinal]
.toString());
- result.append("=");
+ result.append("=");
result.append(enumMap.values[ordinal].toString());
return result.toString();
}
diff --git a/luni/src/main/java/java/util/EnumSet.java b/luni/src/main/java/java/util/EnumSet.java
index f5ecf4f..d187a64 100644
--- a/luni/src/main/java/java/util/EnumSet.java
+++ b/luni/src/main/java/java/util/EnumSet.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/Enumeration.java b/luni/src/main/java/java/util/Enumeration.java
index 5944a75..dbdcb7c 100644
--- a/luni/src/main/java/java/util/Enumeration.java
+++ b/luni/src/main/java/java/util/Enumeration.java
@@ -19,16 +19,16 @@
/**
* A legacy iteration interface.
- *
+ *
* <p>New code should use {@link Iterator} instead. {@code Iterator} replaces the
* enumeration interface and adds a way to remove elements from a collection.
- *
+ *
* <p>If you <i>have</i> an {@code Enumeration} and want a {@code Collection}, you
* can use {@link Collections#list} to get a {@code List}.
- *
+ *
* <p>If you <i>need</i> an {@code Enumeration} for a legacy API and have a
* {@code Collection}, you can use {@link Collections#enumeration}.
- *
+ *
* @version 1.0
* @see Iterator
*/
@@ -36,7 +36,7 @@
/**
* Returns whether this {@code Enumeration} has more elements.
- *
+ *
* @return {@code true} if there are more elements, {@code false} otherwise.
* @see #nextElement
*/
@@ -44,7 +44,7 @@
/**
* Returns the next element in this {@code Enumeration}.
- *
+ *
* @return the next element..
* @throws NoSuchElementException
* if there are no more elements.
diff --git a/luni/src/main/java/java/util/EventListener.java b/luni/src/main/java/java/util/EventListener.java
index b100f0c..394e062 100644
--- a/luni/src/main/java/java/util/EventListener.java
+++ b/luni/src/main/java/java/util/EventListener.java
@@ -19,7 +19,7 @@
/**
* EventListener is the superclass of all event listener interfaces.
- *
+ *
* @see EventObject
*/
public interface EventListener {
diff --git a/luni/src/main/java/java/util/EventListenerProxy.java b/luni/src/main/java/java/util/EventListenerProxy.java
index 1e023f6..adf822a 100644
--- a/luni/src/main/java/java/util/EventListenerProxy.java
+++ b/luni/src/main/java/java/util/EventListenerProxy.java
@@ -27,7 +27,7 @@
/**
* Creates a new {@code EventListener} proxy instance.
- *
+ *
* @param listener
* the listener wrapped by this proxy.
*/
@@ -38,7 +38,7 @@
/**
* Returns the wrapped {@code EventListener}.
- *
+ *
* @return the wrapped {@code EventListener}.
*/
public EventListener getListener() {
diff --git a/luni/src/main/java/java/util/EventObject.java b/luni/src/main/java/java/util/EventObject.java
index 3107224..e8a169f 100644
--- a/luni/src/main/java/java/util/EventObject.java
+++ b/luni/src/main/java/java/util/EventObject.java
@@ -23,11 +23,11 @@
/**
* {@code EventObject}s represent events. Typically applications subclass this class to
* add event specific information.
- *
+ *
* @see EventListener
*/
public class EventObject implements Serializable {
-
+
private static final long serialVersionUID = 5516075349620653480L;
/**
@@ -37,7 +37,7 @@
/**
* Constructs a new instance of this class.
- *
+ *
* @param source
* the object which fired the event.
*/
@@ -51,7 +51,7 @@
/**
* Returns the event source.
- *
+ *
* @return the object which fired the event.
*/
public Object getSource() {
@@ -60,11 +60,11 @@
/**
* Returns the string representation of this {@code EventObject}.
- *
+ *
* @return the string representation of this {@code EventObject}.
*/
@Override
public String toString() {
- return getClass().getName() + "[source=" + source + ']';
+ return getClass().getName() + "[source=" + source + ']';
}
}
diff --git a/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java b/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
index e4f39d2..1ab0720 100644
--- a/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
+++ b/luni/src/main/java/java/util/FormatFlagsConversionMismatchException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* A {@code FormatFlagsConversionMismatchException} will be thrown if a
* conversion and the flags are incompatible.
- *
+ *
* @see java.lang.RuntimeException
*/
public class FormatFlagsConversionMismatchException extends
@@ -36,7 +36,7 @@
/**
* Constructs a new {@code FormatFlagsConversionMismatchException} with the
* flags and conversion specified.
- *
+ *
* @param f
* the flags.
* @param c
@@ -52,7 +52,7 @@
/**
* Returns the incompatible format flag.
- *
+ *
* @return the incompatible format flag.
*/
public String getFlags() {
@@ -61,7 +61,7 @@
/**
* Returns the incompatible conversion.
- *
+ *
* @return the incompatible conversion.
*/
public char getConversion() {
@@ -70,7 +70,7 @@
/**
* Returns the message string of the {@code FormatFlagsConversionMismatchException}.
- *
+ *
* @return the message string of the {@code FormatFlagsConversionMismatchException}.
*/
@Override
diff --git a/luni/src/main/java/java/util/Formattable.java b/luni/src/main/java/java/util/Formattable.java
index 15b66b5..24ec11d 100644
--- a/luni/src/main/java/java/util/Formattable.java
+++ b/luni/src/main/java/java/util/Formattable.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/FormattableFlags.java b/luni/src/main/java/java/util/FormattableFlags.java
index b8d44d4..496f13b 100644
--- a/luni/src/main/java/java/util/FormattableFlags.java
+++ b/luni/src/main/java/java/util/FormattableFlags.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,21 +20,21 @@
* {@link Formattable#formatTo(Formatter, int, int, int)} and change the output
* format in {@code Formattable}s. The validation and interpretation of the
* flags must be done by the implementations.
- *
+ *
* @see Formattable
*/
public class FormattableFlags {
-
+
private FormattableFlags(){
//prevent this class from being instantiated
}
-
+
/**
* Denotes the output is to be left-justified. In order to fill the minimum
* width requirement, spaces('\u0020') will be appended at the end of the
* specified output element. If no such flag is set, the output is
* right-justified.
- *
+ *
* The flag corresponds to '-' ('\u002d') in the format specifier.
*/
public static final int LEFT_JUSTIFY = 1;
@@ -43,7 +43,7 @@
* Denotes the output is to be converted to upper case in the way the locale
* parameter of Formatter.formatTo() requires. The output has the same
* effect as {@code String.toUpperCase(java.util.Locale)}.
- *
+ *
* This flag corresponds to {@code '^' ('\u005e')} in the format specifier.
*/
public static final int UPPERCASE = 2;
@@ -51,7 +51,7 @@
/**
* Denotes the output is to be formatted in an alternate form. The definition
* of the alternate form is determined by the {@code Formattable}.
- *
+ *
* This flag corresponds to {@code '#' ('\u0023')} in the format specifier.
*/
public static final int ALTERNATE = 4;
diff --git a/luni/src/main/java/java/util/Formatter.java b/luni/src/main/java/java/util/Formatter.java
index a27e7a1..70005817 100644
--- a/luni/src/main/java/java/util/Formatter.java
+++ b/luni/src/main/java/java/util/Formatter.java
@@ -577,7 +577,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param a
* the output destination of the {@code Formatter}. If {@code a} is {@code null},
* then a {@code StringBuilder} will be used.
@@ -628,7 +628,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param fileName
* the filename of the file that is used as the output
* destination for the {@code Formatter}. The file will be truncated to
@@ -652,7 +652,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param fileName
* the filename of the file that is used as the output
* destination for the {@code Formatter}. The file will be truncated to
@@ -712,7 +712,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param file
* the {@code File} that is used as the output destination for the
* {@code Formatter}. The {@code File} will be truncated to zero size if the {@code File}
@@ -736,7 +736,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param file
* the {@code File} that is used as the output destination for the
* {@code Formatter}. The {@code File} will be truncated to zero size if the {@code File}
@@ -807,7 +807,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param os
* the stream to be used as the destination of the {@code Formatter}.
*/
@@ -822,7 +822,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param os
* the stream to be used as the destination of the {@code Formatter}.
* @param csn
@@ -860,7 +860,7 @@
*
* <p>The {@code Locale} used is the user's default locale.
* See "<a href="../util/Locale.html#default_locale">Be wary of the default locale</a>".
- *
+ *
* @param ps
* the {@code PrintStream} used as destination of the {@code Formatter}. If
* {@code ps} is {@code null}, then a {@code NullPointerException} will
@@ -1326,7 +1326,7 @@
default:
throw unknownFormatConversionException();
}
-
+
// Check for disallowed flags.
String mismatch = null;
if (!allowAdd && flagAdd) {
@@ -1352,18 +1352,18 @@
throw new FormatFlagsConversionMismatchException(mismatch, conversionType);
}
}
-
+
// Check for a missing width with flags that require a width.
if ((flagMinus || flagZero) && width == UNSET) {
throw new MissingFormatWidthException("-" + conversionType);
}
-
+
// Check that no-argument conversion types don't have an argument.
// Note: the RI doesn't enforce this.
if (!allowArgument && argIndex != UNSET) {
throw new IllegalFormatFlagsException(getStrFlags());
}
-
+
// Check that we don't have a precision or width where they're not allowed.
if (!allowPrecision && precision != UNSET) {
throw new IllegalFormatPrecisionException(precision);
@@ -1371,7 +1371,7 @@
if (!allowWidth && width != UNSET) {
throw new IllegalFormatWidthException(width);
}
-
+
// Some combinations make no sense...
if (flagAdd && flagSpace) {
throw new IllegalFormatFlagsException("the '+' and ' ' flags are incompatible");
@@ -1827,7 +1827,7 @@
}
return padding(result, 0);
}
-
+
private boolean appendT(StringBuilder result, char conversion, Calendar calendar) {
switch (conversion) {
case 'A':
@@ -1964,11 +1964,11 @@
}
return false;
}
-
+
private int to12Hour(int hour) {
return hour == 0 ? 12 : hour;
}
-
+
private void appendLocalized(StringBuilder result, long value, int width) {
int paddingIndex = result.length();
char zeroDigit = localeData.zeroDigit;
@@ -2249,11 +2249,11 @@
}
return format.charAt(i++);
}
-
+
private UnknownFormatConversionException unknownFormatConversionException() {
throw new UnknownFormatConversionException(getFormatSpecifierText());
}
-
+
private FormatToken parseArgumentIndexAndFlags(FormatToken token) {
// Parse the argument index, if there is one.
int position = i;
diff --git a/luni/src/main/java/java/util/FormatterClosedException.java b/luni/src/main/java/java/util/FormatterClosedException.java
index e7e57ba..6b9ab16 100644
--- a/luni/src/main/java/java/util/FormatterClosedException.java
+++ b/luni/src/main/java/java/util/FormatterClosedException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* A {@code FormatterClosedException} will be thrown if the formatter has been
* closed.
- *
+ *
* @see java.lang.RuntimeException
*/
public class FormatterClosedException extends IllegalStateException implements
diff --git a/luni/src/main/java/java/util/HashMap.java b/luni/src/main/java/java/util/HashMap.java
index 19aa2b8..9c4b6da 100644
--- a/luni/src/main/java/java/util/HashMap.java
+++ b/luni/src/main/java/java/util/HashMap.java
@@ -30,18 +30,18 @@
/**
* HashMap is an implementation of {@link Map}. All optional operations are supported.
- *
+ *
* <p>All elements are permitted as keys or values, including null.
- *
+ *
* <p>Note that the iteration order for HashMap is non-deterministic. If you want
* deterministic iteration, use {@link LinkedHashMap}.
- *
+ *
* <p>Note: the implementation of {@code HashMap} is not synchronized.
* If one thread of several threads accessing an instance modifies the map
* structurally, access to the map needs to be synchronized. A structural
* modification is an operation that adds or removes an entry. Changes in
* the value of an entry are not structural changes.
- *
+ *
* <p>The {@code Iterator} created by calling the {@code iterator} method
* may throw a {@code ConcurrentModificationException} if the map is structurally
* changed while an iterator is used to iterate over the elements. Only the
@@ -49,7 +49,7 @@
* elements during iteration. It is not possible to guarantee that this
* mechanism works in all cases of unsynchronized concurrent modification. It
* should only be used for debugging purposes.
- *
+ *
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
diff --git a/luni/src/main/java/java/util/HashSet.java b/luni/src/main/java/java/util/HashSet.java
index aa5c3fb..2df5299 100644
--- a/luni/src/main/java/java/util/HashSet.java
+++ b/luni/src/main/java/java/util/HashSet.java
@@ -42,7 +42,7 @@
/**
* Constructs a new instance of {@code HashSet} with the specified capacity.
- *
+ *
* @param capacity
* the initial capacity of this {@code HashSet}.
*/
@@ -53,7 +53,7 @@
/**
* Constructs a new instance of {@code HashSet} with the specified capacity
* and load factor.
- *
+ *
* @param capacity
* the initial capacity.
* @param loadFactor
@@ -66,7 +66,7 @@
/**
* Constructs a new instance of {@code HashSet} containing the unique
* elements in the specified collection.
- *
+ *
* @param collection
* the collection of elements to add.
*/
@@ -84,7 +84,7 @@
/**
* Adds the specified object to this {@code HashSet} if not already present.
- *
+ *
* @param object
* the object to add.
* @return {@code true} when this {@code HashSet} did not already contain
@@ -97,7 +97,7 @@
/**
* Removes all elements from this {@code HashSet}, leaving it empty.
- *
+ *
* @see #isEmpty
* @see #size
*/
@@ -109,7 +109,7 @@
/**
* Returns a new {@code HashSet} with the same elements and size as this
* {@code HashSet}.
- *
+ *
* @return a shallow copy of this {@code HashSet}.
* @see java.lang.Cloneable
*/
@@ -127,7 +127,7 @@
/**
* Searches this {@code HashSet} for the specified object.
- *
+ *
* @param object
* the object to search for.
* @return {@code true} if {@code object} is an element of this
@@ -140,7 +140,7 @@
/**
* Returns true if this {@code HashSet} has no elements, false otherwise.
- *
+ *
* @return {@code true} if this {@code HashSet} has no elements,
* {@code false} otherwise.
* @see #size
@@ -152,7 +152,7 @@
/**
* Returns an Iterator on the elements of this {@code HashSet}.
- *
+ *
* @return an Iterator on the elements of this {@code HashSet}.
* @see Iterator
*/
@@ -163,7 +163,7 @@
/**
* Removes the specified object from this {@code HashSet}.
- *
+ *
* @param object
* the object to remove.
* @return {@code true} if the object was removed, {@code false} otherwise.
@@ -175,7 +175,7 @@
/**
* Returns the number of elements in this {@code HashSet}.
- *
+ *
* @return the number of elements in this {@code HashSet}.
*/
@Override
diff --git a/luni/src/main/java/java/util/Hashtable.java b/luni/src/main/java/java/util/Hashtable.java
index af0f4b3..d260df2 100644
--- a/luni/src/main/java/java/util/Hashtable.java
+++ b/luni/src/main/java/java/util/Hashtable.java
@@ -30,10 +30,10 @@
/**
* Hashtable is a synchronized implementation of {@link Map}. All optional operations are supported.
- *
+ *
* <p>Neither keys nor values can be null. (Use {@code HashMap} or {@code LinkedHashMap} if you
* need null keys or values.)
- *
+ *
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
* @see HashMap
diff --git a/luni/src/main/java/java/util/HugeEnumSet.java b/luni/src/main/java/java/util/HugeEnumSet.java
index 7b7efa7..ef90d8e 100644
--- a/luni/src/main/java/java/util/HugeEnumSet.java
+++ b/luni/src/main/java/java/util/HugeEnumSet.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,19 +22,19 @@
*/
@SuppressWarnings("serial")
final class HugeEnumSet<E extends Enum<E>> extends EnumSet<E> {
-
+
private static final int BIT_IN_LONG = 64;
final private E[] enums;
-
+
private long[] bits;
-
+
private int size;
-
+
// BEGIN android-changed
/**
* Constructs an instance.
- *
+ *
* @param elementType non-null; type of the elements
* @param enums non-null; prepopulated array of constants in ordinal
* order
@@ -45,7 +45,7 @@
bits = new long[(enums.length + BIT_IN_LONG - 1) / BIT_IN_LONG];
}
// END android-changed
-
+
private class HugeEnumSetIterator implements Iterator<E> {
/**
@@ -118,7 +118,7 @@
last = null;
}
}
-
+
@Override
public boolean add(E element) {
if (!isValidType(element.getDeclaringClass())) {
@@ -137,7 +137,7 @@
}
return false;
}
-
+
@Override
public boolean addAll(Collection<? extends E> collection) {
if (collection.isEmpty() || collection == this) {
@@ -165,18 +165,18 @@
}
return super.addAll(collection);
}
-
+
@Override
public int size() {
return size;
}
-
+
@Override
public void clear() {
Arrays.fill(bits, 0);
size = 0;
}
-
+
@Override
protected void complement() {
size = 0;
@@ -192,7 +192,7 @@
bits[i] = b;
}
}
-
+
@Override
public boolean contains(Object object) {
if (object == null || !isValidType(object.getClass())) {
@@ -205,14 +205,14 @@
int inBits = ordinal % BIT_IN_LONG;
return (bits[index] & (1L << inBits)) != 0;
}
-
+
@Override
public HugeEnumSet<E> clone() {
HugeEnumSet<E> set = (HugeEnumSet<E>) super.clone();
set.bits = bits.clone();
return set;
}
-
+
@Override
public boolean containsAll(Collection<?> collection) {
if (collection.isEmpty()) {
@@ -232,7 +232,7 @@
}
return !(collection instanceof EnumSet) && super.containsAll(collection);
}
-
+
@Override
public boolean equals(Object object) {
if (object == null) {
@@ -243,12 +243,12 @@
}
return Arrays.equals(bits, ((HugeEnumSet<?>) object).bits);
}
-
+
@Override
public Iterator<E> iterator() {
return new HugeEnumSetIterator();
}
-
+
@Override
public boolean remove(Object object) {
if (object == null || !isValidType(object.getClass())) {
@@ -268,13 +268,13 @@
}
return false;
}
-
+
@Override
public boolean removeAll(Collection<?> collection) {
if (collection.isEmpty()) {
return false;
}
-
+
if (collection instanceof EnumSet) {
EnumSet<?> set = (EnumSet<?>) collection;
if (!isValidType(set.elementClass)) {
@@ -296,7 +296,7 @@
}
return super.removeAll(collection);
}
-
+
@Override
public boolean retainAll(Collection<?> collection) {
if (collection instanceof EnumSet) {
@@ -325,7 +325,7 @@
}
return super.retainAll(collection);
}
-
+
@Override
void setRange(E start, E end) {
int startOrdinal = start.ordinal();
diff --git a/luni/src/main/java/java/util/IdentityHashMap.java b/luni/src/main/java/java/util/IdentityHashMap.java
index 3b7bea1..9678b9d 100644
--- a/luni/src/main/java/java/util/IdentityHashMap.java
+++ b/luni/src/main/java/java/util/IdentityHashMap.java
@@ -37,7 +37,7 @@
* Like HashMap, IdentityHashMap is not thread safe, so access by multiple
* threads must be synchronized by an external mechanism such as
* Collections.synchronizedMap.
- *
+ *
* @since 1.4
*/
public class IdentityHashMap<K, V> extends AbstractMap<K, V> implements
@@ -112,7 +112,7 @@
@Override
public String toString() {
- return key + "=" + value;
+ return key + "=" + value;
}
}
@@ -245,7 +245,7 @@
/**
* Creates an IdentityHashMap with the specified maximum size parameter.
- *
+ *
* @param maxSize
* The estimated maximum number of entries that will be put in
* this map.
@@ -275,7 +275,7 @@
/**
* Create a new element array
- *
+ *
* @param s
* the number of elements
* @return Reference to the element array
@@ -286,7 +286,7 @@
/**
* Creates an IdentityHashMap using the given map as initial values.
- *
+ *
* @param map
* A map of (key,value) pairs to copy into the IdentityHashMap.
*/
@@ -302,7 +302,7 @@
/**
* Removes all elements from this map, leaving it empty.
- *
+ *
* @see #isEmpty()
* @see #size()
*/
@@ -317,7 +317,7 @@
/**
* Returns whether this map contains the specified key.
- *
+ *
* @param key
* the key to search for.
* @return {@code true} if this map contains the specified key,
@@ -335,7 +335,7 @@
/**
* Returns whether this map contains the specified value.
- *
+ *
* @param value
* the value to search for.
* @return {@code true} if this map contains the specified value,
@@ -357,7 +357,7 @@
/**
* Returns the value of the mapping with the specified key.
- *
+ *
* @param key
* the key.
* @return the value of the mapping with the specified key.
@@ -437,7 +437,7 @@
/**
* Maps the specified key to the specified value.
- *
+ *
* @param key
* the key.
* @param value
@@ -478,12 +478,12 @@
return massageValue(result);
}
-
+
/**
* Copies all the mappings in the specified map to this map. These mappings
* will replace all mappings that this map had for any of the keys currently
* in the given map.
- *
+ *
* @param map
* the map to copy mappings from.
* @throws NullPointerException
@@ -519,7 +519,7 @@
/**
* Removes the mapping with the specified key from this map.
- *
+ *
* @param key
* the key of the mapping to remove.
* @return the value of the removed mapping, or {@code null} if no mapping
@@ -581,7 +581,7 @@
* Returns a set containing all of the mappings in this map. Each mapping is
* an instance of {@link Map.Entry}. As the set is backed by this map,
* changes in one will be reflected in the other.
- *
+ *
* @return a set of the mappings.
*/
@Override
@@ -593,7 +593,7 @@
* Returns a set of the keys contained in this map. The set is backed by
* this map so changes to one are reflected by the other. The set does not
* support adding.
- *
+ *
* @return a set of the keys.
*/
@Override
@@ -654,7 +654,7 @@
* and returned in response to all subsequent calls. This method may return
* different collections when multiple concurrent calls occur, since no
* synchronization is performed.
- *
+ *
* @return a collection of the values contained in this map.
*/
@Override
@@ -709,7 +709,7 @@
* compared with a map that is not an IdentityHashMap, the equals method is
* neither necessarily symmetric (a.equals(b) implies b.equals(a)) nor
* transitive (a.equals(b) and b.equals(c) implies a.equals(c)).
- *
+ *
* @param object
* the object to compare to.
* @return whether the argument object is equal to this object.
@@ -744,7 +744,7 @@
/**
* Returns a new IdentityHashMap with the same mappings and size as this
* one.
- *
+ *
* @return a shallow copy of this IdentityHashMap.
* @see java.lang.Cloneable
*/
@@ -764,7 +764,7 @@
/**
* Returns whether this IdentityHashMap has no elements.
- *
+ *
* @return {@code true} if this IdentityHashMap has no elements,
* {@code false} otherwise.
* @see #size()
@@ -776,7 +776,7 @@
/**
* Returns the number of mappings in this IdentityHashMap.
- *
+ *
* @return the number of mappings in this IdentityHashMap.
*/
@Override
@@ -808,7 +808,7 @@
}
size = savedSize;
}
-
+
private void putAllImpl(Map<? extends K, ? extends V> map) {
if (map.entrySet() != null) {
super.putAll(map);
diff --git a/luni/src/main/java/java/util/IllegalFormatCodePointException.java b/luni/src/main/java/java/util/IllegalFormatCodePointException.java
index c0d6b6f..9679b81 100644
--- a/luni/src/main/java/java/util/IllegalFormatCodePointException.java
+++ b/luni/src/main/java/java/util/IllegalFormatCodePointException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@
* An {@code IllegalFormatCodePointException} will be thrown if an invalid
* Unicode code point (defined by {@link Character#isValidCodePoint(int)}) is
* passed as a parameter to a Formatter.
- *
+ *
* @see java.lang.RuntimeException
*/
public class IllegalFormatCodePointException extends IllegalFormatException
@@ -34,7 +34,7 @@
/**
* Constructs a new {@code IllegalFormatCodePointException} which is
* specified by the invalid Unicode code point.
- *
+ *
* @param c
* the invalid Unicode code point.
*/
@@ -44,7 +44,7 @@
/**
* Returns the invalid Unicode code point.
- *
+ *
* @return the invalid Unicode code point.
*/
public int getCodePoint() {
@@ -53,7 +53,7 @@
/**
* Returns the message string of the IllegalFormatCodePointException.
- *
+ *
* @return the message string of the IllegalFormatCodePointException.
*/
@Override
diff --git a/luni/src/main/java/java/util/IllegalFormatConversionException.java b/luni/src/main/java/java/util/IllegalFormatConversionException.java
index 696f4f2..5270f6b 100644
--- a/luni/src/main/java/java/util/IllegalFormatConversionException.java
+++ b/luni/src/main/java/java/util/IllegalFormatConversionException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* An {@code IllegalFormatConversionException} will be thrown when the parameter
* is incompatible with the corresponding format specifier.
- *
+ *
* @see java.lang.RuntimeException
*
* @since 1.5
@@ -37,7 +37,7 @@
/**
* Constructs a new {@code IllegalFormatConversionException} with the class
* of the mismatched conversion and corresponding parameter.
- *
+ *
* @param c
* the class of the mismatched conversion.
* @param arg
@@ -53,7 +53,7 @@
/**
* Returns the class of the mismatched parameter.
- *
+ *
* @return the class of the mismatched parameter.
*/
public Class<?> getArgumentClass() {
@@ -62,7 +62,7 @@
/**
* Returns the incompatible conversion.
- *
+ *
* @return the incompatible conversion.
*/
public char getConversion() {
@@ -71,7 +71,7 @@
/**
* Returns the message string of the IllegalFormatConversionException.
- *
+ *
* @return the message string of the IllegalFormatConversionException.
*/
@Override
diff --git a/luni/src/main/java/java/util/IllegalFormatException.java b/luni/src/main/java/java/util/IllegalFormatException.java
index 3d37cd0..0e1809a 100644
--- a/luni/src/main/java/java/util/IllegalFormatException.java
+++ b/luni/src/main/java/java/util/IllegalFormatException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@
* contains either an illegal syntax or format specifier is transferred as a
* parameter. Only subclasses inheriting explicitly from this exception are
* allowed to be instantiated.
- *
+ *
* @see java.lang.RuntimeException
*/
public class IllegalFormatException extends IllegalArgumentException implements
diff --git a/luni/src/main/java/java/util/IllegalFormatFlagsException.java b/luni/src/main/java/java/util/IllegalFormatFlagsException.java
index 4fa2d9c..a1fbfcf 100644
--- a/luni/src/main/java/java/util/IllegalFormatFlagsException.java
+++ b/luni/src/main/java/java/util/IllegalFormatFlagsException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* An {@code IllegalFormatFlagsException} will be thrown if the combination of
* the format flags is illegal.
- *
+ *
* @see java.lang.RuntimeException
*/
public class IllegalFormatFlagsException extends IllegalFormatException
@@ -33,7 +33,7 @@
/**
* Constructs a new {@code IllegalFormatFlagsException} with the specified
* flags.
- *
+ *
* @param f
* the specified flags.
*/
@@ -46,7 +46,7 @@
/**
* Returns the flags that are illegal.
- *
+ *
* @return the flags that are illegal.
*/
public String getFlags() {
@@ -55,7 +55,7 @@
/**
* Returns the message string of the IllegalFormatFlagsException.
- *
+ *
* @return the message string of the IllegalFormatFlagsException.
*/
@Override
diff --git a/luni/src/main/java/java/util/IllegalFormatPrecisionException.java b/luni/src/main/java/java/util/IllegalFormatPrecisionException.java
index 5d5113f..5e78569 100644
--- a/luni/src/main/java/java/util/IllegalFormatPrecisionException.java
+++ b/luni/src/main/java/java/util/IllegalFormatPrecisionException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@
/**
* An {@code IllegalFormatPrecisionException} will be thrown if the precision is
* a negative other than -1 or in other cases where precision is not supported.
- *
+ *
* @see java.lang.RuntimeException
*/
@@ -31,7 +31,7 @@
/**
* Constructs a new {@code IllegalFormatPrecisionException} with specified
* precision.
- *
+ *
* @param p
* the precision.
*/
@@ -41,7 +41,7 @@
/**
* Returns the precision associated with the exception.
- *
+ *
* @return the precision.
*/
public int getPrecision() {
@@ -50,7 +50,7 @@
/**
* Returns the message of the exception.
- *
+ *
* @return the message of the exception.
*/
@Override
diff --git a/luni/src/main/java/java/util/IllegalFormatWidthException.java b/luni/src/main/java/java/util/IllegalFormatWidthException.java
index 01904f8..25a2ecc 100644
--- a/luni/src/main/java/java/util/IllegalFormatWidthException.java
+++ b/luni/src/main/java/java/util/IllegalFormatWidthException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
* An {@code IllegalFormatWidthException} will be thrown if the width is a
* negative value other than -1 or in other cases where a width is not
* supported.
- *
+ *
* @see java.lang.RuntimeException
*/
public class IllegalFormatWidthException extends IllegalFormatException {
@@ -32,7 +32,7 @@
/**
* Constructs a new {@code IllegalFormatWidthException} with specified
* width.
- *
+ *
* @param w
* the width.
*/
@@ -42,7 +42,7 @@
/**
* Returns the width associated with the exception.
- *
+ *
* @return the width.
*/
public int getWidth() {
@@ -51,7 +51,7 @@
/**
* Returns the message of the exception.
- *
+ *
* @return the message of the exception.
*/
@Override
diff --git a/luni/src/main/java/java/util/InputMismatchException.java b/luni/src/main/java/java/util/InputMismatchException.java
index eed0b83..60616d2 100644
--- a/luni/src/main/java/java/util/InputMismatchException.java
+++ b/luni/src/main/java/java/util/InputMismatchException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
* An {@code InputMismatchException} is thrown by a scanner to indicate that the
* next token does not match or is out of range for the type specified in the
* pattern.
- *
+ *
* @see Scanner
* @see java.lang.RuntimeException
*/
@@ -41,7 +41,7 @@
/**
* Constructs a new {@code InputMismatchException} with the stack trace
* filled in and {@code msg} as its error message.
- *
+ *
* @param msg
* the specified error message.
*/
diff --git a/luni/src/main/java/java/util/InvalidPropertiesFormatException.java b/luni/src/main/java/java/util/InvalidPropertiesFormatException.java
index 015c3d0..bd66bb7 100644
--- a/luni/src/main/java/java/util/InvalidPropertiesFormatException.java
+++ b/luni/src/main/java/java/util/InvalidPropertiesFormatException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,19 +26,19 @@
* An {@code InvalidPropertiesFormatException} is thrown if loading the XML
* document defining the properties does not follow the {@code Properties}
* specification.
- *
+ *
* Even though this Exception inherits the {@code Serializable} interface, it is not
* serializable. The methods used for serialization throw
* {@code NotSerializableException}s.
*/
public class InvalidPropertiesFormatException extends IOException {
-
+
private static final long serialVersionUID = 7763056076009360219L;
/**
* Constructs a new {@code InvalidPropertiesFormatException} with the
* current stack trace and message filled in.
- *
+ *
* @param m
* the detail message for the exception.
*/
@@ -49,21 +49,21 @@
/**
* Constructs a new {@code InvalidPropertiesFormatException} with the cause
* for the Exception.
- *
+ *
* @param c
* the cause for the Exception.
*/
public InvalidPropertiesFormatException(Throwable c) {
initCause(c);
}
-
- private void writeObject(ObjectOutputStream out)
+
+ private void writeObject(ObjectOutputStream out)
throws NotSerializableException{
- throw new NotSerializableException();
+ throw new NotSerializableException();
}
-
- private void readObject(ObjectInputStream in)
+
+ private void readObject(ObjectInputStream in)
throws NotSerializableException{
- throw new NotSerializableException();
+ throw new NotSerializableException();
}
}
diff --git a/luni/src/main/java/java/util/Iterator.java b/luni/src/main/java/java/util/Iterator.java
index bec797b..cbe61d2 100644
--- a/luni/src/main/java/java/util/Iterator.java
+++ b/luni/src/main/java/java/util/Iterator.java
@@ -19,16 +19,16 @@
/**
* An iterator over a sequence of objects, such as a collection.
- *
+ *
* <p>If a collection has been changed since the iterator was created,
* methods {@code next} and {@code hasNext()} may throw a {@code ConcurrentModificationException}.
* It is not possible to guarantee that this mechanism works in all cases of unsynchronized
* concurrent modification. It should only be used for debugging purposes. Iterators with this
* behavior are called fail-fast iterators.
- *
+ *
* <p>Implementing {@link Iterable} and returning an {@code Iterator} allows your
* class to be used as a collection with the enhanced for loop.
- *
+ *
* @param <E>
* the type of object returned by the iterator.
*/
@@ -41,7 +41,7 @@
/**
* Returns the next object and advances the iterator.
- *
+ *
* @return the next object.
* @throws NoSuchElementException
* if there are no more elements.
@@ -52,7 +52,7 @@
/**
* Removes the last object returned by {@code next} from the collection.
* This method can only be called once between each call to {@code next}.
- *
+ *
* @throws UnsupportedOperationException
* if removing is not supported by the collection being
* iterated.
diff --git a/luni/src/main/java/java/util/LinkedHashMap.java b/luni/src/main/java/java/util/LinkedHashMap.java
index eeee1a9..47d532f 100644
--- a/luni/src/main/java/java/util/LinkedHashMap.java
+++ b/luni/src/main/java/java/util/LinkedHashMap.java
@@ -24,16 +24,16 @@
/**
* LinkedHashMap is an implementation of {@link Map} that guarantees iteration order.
* All optional operations are supported.
- *
+ *
* <p>All elements are permitted as keys or values, including null.
- *
+ *
* <p>Entries are kept in a doubly-linked list. The iteration order is, by default, the
* order in which keys were inserted. Reinserting an already-present key doesn't change the
* order. If the three argument constructor is used, and {@code accessOrder} is specified as
* {@code true}, the iteration will be in the order that entries were accessed.
* The access order is affected by {@code put}, {@code get}, and {@code putAll} operations,
* but not by operations on the collection views.
- *
+ *
* <p>Note: the implementation of {@code LinkedHashMap} is not synchronized.
* If one thread of several threads accessing an instance modifies the map
* structurally, access to the map needs to be synchronized. For
@@ -41,7 +41,7 @@
* removes or adds an entry. Access-ordered instances also are structurally
* modified by {@code put}, {@code get}, and {@code putAll} since these methods
* change the order of the entries. Changes in the value of an entry are not structural changes.
- *
+ *
* <p>The {@code Iterator} created by calling the {@code iterator} method
* may throw a {@code ConcurrentModificationException} if the map is structurally
* changed while an iterator is used to iterate over the elements. Only the
diff --git a/luni/src/main/java/java/util/LinkedHashSet.java b/luni/src/main/java/java/util/LinkedHashSet.java
index 3add460..a4fb75d 100644
--- a/luni/src/main/java/java/util/LinkedHashSet.java
+++ b/luni/src/main/java/java/util/LinkedHashSet.java
@@ -47,7 +47,7 @@
/**
* Constructs a new instance of {@code LinkedHashSet} with the specified
* capacity.
- *
+ *
* @param capacity
* the initial capacity of this {@code LinkedHashSet}.
*/
@@ -58,7 +58,7 @@
/**
* Constructs a new instance of {@code LinkedHashSet} with the specified
* capacity and load factor.
- *
+ *
* @param capacity
* the initial capacity.
* @param loadFactor
@@ -71,7 +71,7 @@
/**
* Constructs a new instance of {@code LinkedHashSet} containing the unique
* elements in the specified collection.
- *
+ *
* @param collection
* the collection of elements to add.
*/
diff --git a/luni/src/main/java/java/util/LinkedList.java b/luni/src/main/java/java/util/LinkedList.java
index 6a9ae9b..4d95847 100644
--- a/luni/src/main/java/java/util/LinkedList.java
+++ b/luni/src/main/java/java/util/LinkedList.java
@@ -26,14 +26,14 @@
/**
* LinkedList is an implementation of {@link List}, backed by a doubly-linked list.
* All optional operations including adding, removing, and replacing elements are supported.
- *
+ *
* <p>All elements are permitted, including null.
- *
+ *
* <p>This class is primarily useful if you need queue-like behavior. It may also be useful
* as a list if you expect your lists to contain zero or one element, but still require the
* ability to scale to slightly larger numbers of elements. In general, though, you should
* probably use {@link ArrayList} if you don't need the queue-like behavior.
- *
+ *
* @since 1.2
*/
public class LinkedList<E> extends AbstractSequentialList<E> implements
diff --git a/luni/src/main/java/java/util/List.java b/luni/src/main/java/java/util/List.java
index 68e1ad9..c27ca3f 100644
--- a/luni/src/main/java/java/util/List.java
+++ b/luni/src/main/java/java/util/List.java
@@ -32,7 +32,7 @@
* is added at the end. If the location is smaller than the size of this
* {@code List}, then all elements beyond the specified location are moved by one
* position towards the end of the {@code List}.
- *
+ *
* @param location
* the index at which to insert.
* @param object
@@ -51,7 +51,7 @@
/**
* Adds the specified object at the end of this {@code List}.
- *
+ *
* @param object
* the object to add.
* @return always true.
@@ -69,7 +69,7 @@
* Inserts the objects in the specified collection at the specified location
* in this {@code List}. The objects are added in the order they are returned from
* the collection's iterator.
- *
+ *
* @param location
* the index at which to insert.
* @param collection
@@ -92,7 +92,7 @@
* Adds the objects in the specified collection to the end of this {@code List}. The
* objects are added in the order in which they are returned from the
* collection's iterator.
- *
+ *
* @param collection
* the collection of objects.
* @return {@code true} if this {@code List} is modified, {@code false} otherwise
@@ -109,7 +109,7 @@
/**
* Removes all elements from this {@code List}, leaving it empty.
- *
+ *
* @throws UnsupportedOperationException
* if removing from this {@code List} is not supported.
* @see #isEmpty
@@ -119,7 +119,7 @@
/**
* Tests whether this {@code List} contains the specified object.
- *
+ *
* @param object
* the object to search for.
* @return {@code true} if object is an element of this {@code List}, {@code false}
@@ -130,7 +130,7 @@
/**
* Tests whether this {@code List} contains all objects contained in the
* specified collection.
- *
+ *
* @param collection
* the collection of objects
* @return {@code true} if all objects in the specified collection are
@@ -143,7 +143,7 @@
* represent the <em>same</em> object using a class specific comparison. For
* {@code List}s, this means that they contain the same elements in exactly the same
* order.
- *
+ *
* @param object
* the object to compare with this object.
* @return boolean {@code true} if the object is the same as this object,
@@ -154,7 +154,7 @@
/**
* Returns the element at the specified location in this {@code List}.
- *
+ *
* @param location
* the index of the element to return.
* @return the element at the specified location.
@@ -166,7 +166,7 @@
/**
* Returns the hash code for this {@code List}. It is calculated by taking each
* element' hashcode and its position in the {@code List} into account.
- *
+ *
* @return the hash code of the {@code List}.
*/
public int hashCode();
@@ -174,7 +174,7 @@
/**
* Searches this {@code List} for the specified object and returns the index of the
* first occurrence.
- *
+ *
* @param object
* the object to search for.
* @return the index of the first occurrence of the object or -1 if the
@@ -184,7 +184,7 @@
/**
* Returns whether this {@code List} contains no elements.
- *
+ *
* @return {@code true} if this {@code List} has no elements, {@code false}
* otherwise.
* @see #size
@@ -194,7 +194,7 @@
/**
* Returns an iterator on the elements of this {@code List}. The elements are
* iterated in the same order as they occur in the {@code List}.
- *
+ *
* @return an iterator on the elements of this {@code List}.
* @see Iterator
*/
@@ -203,7 +203,7 @@
/**
* Searches this {@code List} for the specified object and returns the index of the
* last occurrence.
- *
+ *
* @param object
* the object to search for.
* @return the index of the last occurrence of the object, or -1 if the
@@ -214,9 +214,9 @@
/**
* Returns a {@code List} iterator on the elements of this {@code List}. The elements are
* iterated in the same order that they occur in the {@code List}.
- *
+ *
* @return a {@code List} iterator on the elements of this {@code List}
- *
+ *
* @see ListIterator
*/
public ListIterator<E> listIterator();
@@ -225,7 +225,7 @@
* Returns a list iterator on the elements of this {@code List}. The elements are
* iterated in the same order as they occur in the {@code List}. The iteration
* starts at the specified location.
- *
+ *
* @param location
* the index at which to start the iteration.
* @return a list iterator on the elements of this {@code List}.
@@ -237,7 +237,7 @@
/**
* Removes the object at the specified location from this {@code List}.
- *
+ *
* @param location
* the index of the object to remove.
* @return the removed object.
@@ -250,7 +250,7 @@
/**
* Removes the first occurrence of the specified object from this {@code List}.
- *
+ *
* @param object
* the object to remove.
* @return true if this {@code List} was modified by this operation, false
@@ -263,7 +263,7 @@
/**
* Removes all occurrences in this {@code List} of each object in the specified
* collection.
- *
+ *
* @param collection
* the collection of objects to remove.
* @return {@code true} if this {@code List} is modified, {@code false} otherwise.
@@ -275,7 +275,7 @@
/**
* Removes all objects from this {@code List} that are not contained in the
* specified collection.
- *
+ *
* @param collection
* the collection of objects to retain.
* @return {@code true} if this {@code List} is modified, {@code false} otherwise.
@@ -287,7 +287,7 @@
/**
* Replaces the element at the specified location in this {@code List} with the
* specified object. This operation does not change the size of the {@code List}.
- *
+ *
* @param location
* the index at which to put the specified object.
* @param object
@@ -307,7 +307,7 @@
/**
* Returns the number of elements in this {@code List}.
- *
+ *
* @return the number of elements in this {@code List}.
*/
public int size();
@@ -316,7 +316,7 @@
* Returns a {@code List} of the specified portion of this {@code List} from the given start
* index to the end index minus one. The returned {@code List} is backed by this
* {@code List} so changes to it are reflected by the other.
- *
+ *
* @param start
* the index at which to start the sublist.
* @param end
@@ -330,7 +330,7 @@
/**
* Returns an array containing all elements contained in this {@code List}.
- *
+ *
* @return an array of the elements from this {@code List}.
*/
public Object[] toArray();
@@ -341,7 +341,7 @@
* is used, otherwise an array of the same type is created. If the specified
* array is used and is larger than this {@code List}, the array element following
* the collection elements is set to null.
- *
+ *
* @param array
* the array.
* @return an array of the elements from this {@code List}.
diff --git a/luni/src/main/java/java/util/ListIterator.java b/luni/src/main/java/java/util/ListIterator.java
index 1c62a22..18df4e8 100644
--- a/luni/src/main/java/java/util/ListIterator.java
+++ b/luni/src/main/java/java/util/ListIterator.java
@@ -23,11 +23,11 @@
* move backwards or forwards through the list.
*/
public interface ListIterator<E> extends Iterator<E> {
-
+
/**
* Inserts the specified object into the list between {@code next} and
* {@code previous}. The object inserted will be the previous object.
- *
+ *
* @param object
* the object to insert.
* @throws UnsupportedOperationException
@@ -41,7 +41,7 @@
/**
* Returns whether there are more elements to iterate.
- *
+ *
* @return {@code true} if there are more elements, {@code false} otherwise.
* @see #next
*/
@@ -49,7 +49,7 @@
/**
* Returns whether there are previous elements to iterate.
- *
+ *
* @return {@code true} if there are previous elements, {@code false}
* otherwise.
* @see #previous
@@ -58,7 +58,7 @@
/**
* Returns the next object in the iteration.
- *
+ *
* @return the next object.
* @throws NoSuchElementException
* if there are no more elements.
@@ -68,7 +68,7 @@
/**
* Returns the index of the next object in the iteration.
- *
+ *
* @return the index of the next object, or the size of the list if the
* iterator is at the end.
* @throws NoSuchElementException
@@ -79,7 +79,7 @@
/**
* Returns the previous object in the iteration.
- *
+ *
* @return the previous object.
* @throws NoSuchElementException
* if there are no previous elements.
@@ -89,7 +89,7 @@
/**
* Returns the index of the previous object in the iteration.
- *
+ *
* @return the index of the previous object, or -1 if the iterator is at the
* beginning.
* @throws NoSuchElementException
@@ -101,7 +101,7 @@
/**
* Removes the last object returned by {@code next} or {@code previous} from
* the list.
- *
+ *
* @throws UnsupportedOperationException
* if removing is not supported by the list being iterated.
* @throws IllegalStateException
@@ -114,7 +114,7 @@
/**
* Replaces the last object returned by {@code next} or {@code previous}
* with the specified object.
- *
+ *
* @param object
* the object to set.
* @throws UnsupportedOperationException
diff --git a/luni/src/main/java/java/util/ListResourceBundle.java b/luni/src/main/java/java/util/ListResourceBundle.java
index 278f130..b81f0cb 100644
--- a/luni/src/main/java/java/util/ListResourceBundle.java
+++ b/luni/src/main/java/java/util/ListResourceBundle.java
@@ -21,7 +21,7 @@
* {@code ListResourceBundle} is the abstract superclass of classes which provide
* resources by implementing the {@code getContents()} method to return
* the list of resources.
- *
+ *
* @see ResourceBundle
* @since 1.1
*/
@@ -40,7 +40,7 @@
* {@code ListResourceBundle}. Each element in the array is an array of two
* elements, the first is the resource key string and the second is the
* resource.
- *
+ *
* @return a {@code Object} array containing the resources.
*/
protected abstract Object[][] getContents();
@@ -126,10 +126,10 @@
}
}
}
-
+
/**
* Returns a set of the keys in this ResourceBundle but not in its parents.
- *
+ *
* @return a set of the keys in this ResourceBundle but not in its parents.
* @since 1.6
* @hide
diff --git a/luni/src/main/java/java/util/Locale.java b/luni/src/main/java/java/util/Locale.java
index c6535c1..511c426 100644
--- a/luni/src/main/java/java/util/Locale.java
+++ b/luni/src/main/java/java/util/Locale.java
@@ -164,7 +164,7 @@
/**
* Locale constant for the root locale. The root locale has an empty language,
* country, and variant.
- *
+ *
* @since 1.6
* @hide
*/
@@ -303,7 +303,7 @@
* Locale.US}, and usually several others. Most locale-sensitive classes
* offer their own {@code getAvailableLocales} method, which should be
* preferred over this general purpose method.
- *
+ *
* @see java.text.BreakIterator#getAvailableLocales()
* @see java.text.Collator#getAvailableLocales()
* @see java.text.DateFormat#getAvailableLocales()
diff --git a/luni/src/main/java/java/util/Map.java b/luni/src/main/java/java/util/Map.java
index 7509d1a..38d2bb0 100644
--- a/luni/src/main/java/java/util/Map.java
+++ b/luni/src/main/java/java/util/Map.java
@@ -21,12 +21,12 @@
/**
* A {@code Map} is a data structure consisting of a set of keys and values
* in which each key is mapped to a single value. The class of the objects
- * used as keys is declared when the {@code Map} is declared, as is the
+ * used as keys is declared when the {@code Map} is declared, as is the
* class of the corresponding values.
* <p>
* A {@code Map} provides helper methods to iterate through all of the
- * keys contained in it, as well as various methods to access and update
- * the key/value pairs.
+ * keys contained in it, as well as various methods to access and update
+ * the key/value pairs.
*/
public interface Map<K,V> {
@@ -38,7 +38,7 @@
* Compares the specified object to this {@code Map.Entry} and returns if they
* are equal. To be equal, the object must be an instance of {@code Map.Entry} and have the
* same key and value.
- *
+ *
* @param object
* the {@code Object} to compare with this {@code Object}.
* @return {@code true} if the specified {@code Object} is equal to this
@@ -49,14 +49,14 @@
/**
* Returns the key.
- *
+ *
* @return the key
*/
public K getKey();
/**
* Returns the value.
- *
+ *
* @return the value
*/
public V getValue();
@@ -64,7 +64,7 @@
/**
* Returns an integer hash code for the receiver. {@code Object} which are
* equal return the same value for this method.
- *
+ *
* @return the receiver's hash code.
* @see #equals(Object)
*/
@@ -73,7 +73,7 @@
/**
* Sets the value of this entry to the specified value, replacing any
* existing value.
- *
+ *
* @param object
* the new value to set.
* @return object the replaced value of this entry.
@@ -83,7 +83,7 @@
/**
* Removes all elements from this {@code Map}, leaving it empty.
- *
+ *
* @throws UnsupportedOperationException
* if removing elements from this {@code Map} is not supported.
* @see #isEmpty()
@@ -93,7 +93,7 @@
/**
* Returns whether this {@code Map} contains the specified key.
- *
+ *
* @param key
* the key to search for.
* @return {@code true} if this map contains the specified key,
@@ -103,7 +103,7 @@
/**
* Returns whether this {@code Map} contains the specified value.
- *
+ *
* @param value
* the value to search for.
* @return {@code true} if this map contains the specified value,
@@ -115,7 +115,7 @@
* Returns a {@code Set} containing all of the mappings in this {@code Map}. Each mapping is
* an instance of {@link Map.Entry}. As the {@code Set} is backed by this {@code Map},
* changes in one will be reflected in the other.
- *
+ *
* @return a set of the mappings
*/
public Set<Map.Entry<K,V>> entrySet();
@@ -123,7 +123,7 @@
/**
* Compares the argument to the receiver, and returns {@code true} if the
* specified object is a {@code Map} and both {@code Map}s contain the same mappings.
- *
+ *
* @param object
* the {@code Object} to compare with this {@code Object}.
* @return boolean {@code true} if the {@code Object} is the same as this {@code Object}
@@ -135,7 +135,7 @@
/**
* Returns the value of the mapping with the specified key.
- *
+ *
* @param key
* the key.
* @return the value of the mapping with the specified key, or {@code null}
@@ -146,7 +146,7 @@
/**
* Returns an integer hash code for the receiver. {@code Object}s which are equal
* return the same value for this method.
- *
+ *
* @return the receiver's hash.
* @see #equals(Object)
*/
@@ -154,7 +154,7 @@
/**
* Returns whether this map is empty.
- *
+ *
* @return {@code true} if this map has no elements, {@code false}
* otherwise.
* @see #size()
@@ -165,14 +165,14 @@
* Returns a set of the keys contained in this {@code Map}. The {@code Set} is backed by
* this {@code Map} so changes to one are reflected by the other. The {@code Set} does not
* support adding.
- *
+ *
* @return a set of the keys.
*/
public Set<K> keySet();
/**
* Maps the specified key to the specified value.
- *
+ *
* @param key
* the key.
* @param value
@@ -194,7 +194,7 @@
/**
* Copies every mapping in the specified {@code Map} to this {@code Map}.
- *
+ *
* @param map
* the {@code Map} to copy mappings from.
* @throws UnsupportedOperationException
@@ -212,7 +212,7 @@
/**
* Removes a mapping with the specified key from this {@code Map}.
- *
+ *
* @param key
* the key of the mapping to remove.
* @return the value of the removed mapping or {@code null} if no mapping
@@ -224,7 +224,7 @@
/**
* Returns the number of mappings in this {@code Map}.
- *
+ *
* @return the number of mappings in this {@code Map}.
*/
public int size();
@@ -232,7 +232,7 @@
/**
* Returns a {@code Collection} of the values contained in this {@code Map}. The {@code Collection}
* is backed by this {@code Map} so changes to one are reflected by the other. The
- * {@code Collection} supports {@link Collection#remove}, {@link Collection#removeAll},
+ * {@code Collection} supports {@link Collection#remove}, {@link Collection#removeAll},
* {@link Collection#retainAll}, and {@link Collection#clear} operations,
* and it does not support {@link Collection#add} or {@link Collection#addAll} operations.
* <p>
@@ -246,7 +246,7 @@
* returned in response to all subsequent calls. This method may return
* different Collection when multiple calls to this method, since it has no
* synchronization performed.
- *
+ *
* @return a collection of the values contained in this map.
*/
public Collection<V> values();
diff --git a/luni/src/main/java/java/util/MiniEnumSet.java b/luni/src/main/java/java/util/MiniEnumSet.java
index 8e1a919..e19612a 100644
--- a/luni/src/main/java/java/util/MiniEnumSet.java
+++ b/luni/src/main/java/java/util/MiniEnumSet.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,17 +23,17 @@
@SuppressWarnings("serial")
final class MiniEnumSet<E extends Enum<E>> extends EnumSet<E> {
private static final int MAX_ELEMENTS = 64;
-
+
private int size;
-
- private final E[] enums;
-
+
+ private final E[] enums;
+
private long bits;
-
+
// BEGIN android-changed
/**
* Constructs an instance.
- *
+ *
* @param elementType non-null; type of the elements
* @param enums non-null; prepopulated array of constants in ordinal
* order
@@ -43,7 +43,7 @@
this.enums = enums;
}
// END android-changed
-
+
private class MiniEnumSetIterator implements Iterator<E> {
/**
@@ -99,13 +99,13 @@
public int size() {
return size;
}
-
+
@Override
public void clear() {
bits = 0;
size = 0;
}
-
+
@Override
public boolean add(E element) {
if (!isValidType(element.getDeclaringClass())) {
@@ -121,7 +121,7 @@
}
return false;
}
-
+
@Override
public boolean addAll(Collection<? extends E> collection) {
if (collection.isEmpty()) {
@@ -142,7 +142,7 @@
}
return super.addAll(collection);
}
-
+
@Override
public boolean contains(Object object) {
if (object == null || !isValidType(object.getClass())) {
@@ -154,7 +154,7 @@
int ordinal = element.ordinal();
return (bits & (1L << ordinal)) != 0;
}
-
+
@Override
public boolean containsAll(Collection<?> collection) {
if (collection.isEmpty()) {
@@ -165,9 +165,9 @@
long setBits = set.bits;
return isValidType(set.elementClass) && ((bits & setBits) == setBits);
}
- return !(collection instanceof EnumSet) && super.containsAll(collection);
+ return !(collection instanceof EnumSet) && super.containsAll(collection);
}
-
+
@Override
public boolean removeAll(Collection<?> collection) {
if (collection.isEmpty()) {
@@ -217,14 +217,14 @@
}
return super.retainAll(collection);
}
-
+
@Override
public boolean remove(Object object) {
if (object == null || !isValidType(object.getClass())) {
return false;
}
- @SuppressWarnings("unchecked") // guarded by isValidType()
+ @SuppressWarnings("unchecked") // guarded by isValidType()
Enum<E> element = (Enum<E>) object;
int ordinal = element.ordinal();
long oldBits = bits;
@@ -236,7 +236,7 @@
}
return false;
}
-
+
@Override
public boolean equals(Object object) {
if (!(object instanceof EnumSet)) {
@@ -248,7 +248,7 @@
}
return bits == ((MiniEnumSet<?>) set).bits;
}
-
+
@Override
void complement() {
if (enums.length != 0) {
@@ -257,7 +257,7 @@
size = enums.length - size;
}
}
-
+
@Override
void setRange(E start, E end) {
int length = end.ordinal() - start.ordinal() + 1;
diff --git a/luni/src/main/java/java/util/MissingFormatArgumentException.java b/luni/src/main/java/java/util/MissingFormatArgumentException.java
index dfa0c73..0e83f75 100644
--- a/luni/src/main/java/java/util/MissingFormatArgumentException.java
+++ b/luni/src/main/java/java/util/MissingFormatArgumentException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@
* A {@code MissingFormatArgumentException} will be thrown if there is no
* corresponding argument with the specified conversion or an argument index
* that refers to a missing argument.
- *
+ *
* @see java.lang.RuntimeException
*/
public class MissingFormatArgumentException extends IllegalFormatException {
@@ -33,7 +33,7 @@
/**
* Constructs a new {@code MissingFormatArgumentException} with the
* specified conversion that lacks the argument.
- *
+ *
* @param s
* the specified conversion that lacks the argument.
*/
@@ -46,7 +46,7 @@
/**
* Returns the conversion associated with the exception.
- *
+ *
* @return the conversion associated with the exception.
*/
public String getFormatSpecifier() {
@@ -55,7 +55,7 @@
/**
* Returns the message of the exception.
- *
+ *
* @return the message of the exception.
*/
@Override
diff --git a/luni/src/main/java/java/util/MissingFormatWidthException.java b/luni/src/main/java/java/util/MissingFormatWidthException.java
index 8b4e1f8..6b26754 100644
--- a/luni/src/main/java/java/util/MissingFormatWidthException.java
+++ b/luni/src/main/java/java/util/MissingFormatWidthException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@
/**
* A {@code MissingFormatWidthException} will be thrown if the format width is
* missing but is required.
- *
+ *
* @see java.lang.RuntimeException
*/
public class MissingFormatWidthException extends IllegalFormatException {
@@ -30,7 +30,7 @@
/**
* Constructs a new {@code MissingFormatWidthException} with the specified
* format specifier.
- *
+ *
* @param s
* the specified format specifier.
*/
@@ -43,7 +43,7 @@
/**
* Returns the format specifier associated with the exception.
- *
+ *
* @return the format specifier associated with the exception.
*/
public String getFormatSpecifier() {
@@ -52,7 +52,7 @@
/**
* Returns the message of the exception.
- *
+ *
* @return the message of the exception.
*/
@Override
diff --git a/luni/src/main/java/java/util/MissingResourceException.java b/luni/src/main/java/java/util/MissingResourceException.java
index 9a0cbbb..9edce9a 100644
--- a/luni/src/main/java/java/util/MissingResourceException.java
+++ b/luni/src/main/java/java/util/MissingResourceException.java
@@ -22,7 +22,7 @@
* A {@code MissingResourceException} is thrown by ResourceBundle when a
* resource bundle cannot be found or a resource is missing from a resource
* bundle.
- *
+ *
* @see ResourceBundle
* @see java.lang.RuntimeException
*/
@@ -36,7 +36,7 @@
* Constructs a new {@code MissingResourceException} with the stack trace,
* message, the class name of the resource bundle and the name of the
* missing resource filled in.
- *
+ *
* @param detailMessage
* the detail message for the exception.
* @param className
@@ -55,7 +55,7 @@
* Returns the class name of the resource bundle from which a resource could
* not be found, or in the case of a missing resource, the name of the
* missing resource bundle.
- *
+ *
* @return the class name of the resource bundle.
*/
public String getClassName() {
@@ -65,7 +65,7 @@
/**
* Returns the name of the missing resource, or an empty string if the
* resource bundle is missing.
- *
+ *
* @return the name of the missing resource.
*/
public String getKey() {
diff --git a/luni/src/main/java/java/util/NoSuchElementException.java b/luni/src/main/java/java/util/NoSuchElementException.java
index 4334f86..3583fb9 100644
--- a/luni/src/main/java/java/util/NoSuchElementException.java
+++ b/luni/src/main/java/java/util/NoSuchElementException.java
@@ -22,7 +22,7 @@
* A {@code NoSuchElementException} is thrown when trying to retrieve an element
* past the end of an Enumeration, or the first or last element from an empty
* Vector.
- *
+ *
* @see Enumeration
* @see java.lang.RuntimeException
*/
@@ -41,7 +41,7 @@
/**
* Constructs a new {@code NoSuchElementException} with the current stack
* trace and message filled in.
- *
+ *
* @param detailMessage
* the detail message for the exception.
*/
diff --git a/luni/src/main/java/java/util/Observer.java b/luni/src/main/java/java/util/Observer.java
index c398e1b..19cc3a7 100644
--- a/luni/src/main/java/java/util/Observer.java
+++ b/luni/src/main/java/java/util/Observer.java
@@ -19,18 +19,18 @@
/**
- * {@code Observer} is the interface to be implemented by objects that
+ * {@code Observer} is the interface to be implemented by objects that
* receive notification of updates on an {@code Observable} object.
- *
- * @see Observable
+ *
+ * @see Observable
*/
public interface Observer {
/**
* This method is called if the specified {@code Observable} object's
- * {@code notifyObservers} method is called (because the {@code Observable}
+ * {@code notifyObservers} method is called (because the {@code Observable}
* object has been updated.
- *
+ *
* @param observable
* the {@link Observable} object.
* @param data
diff --git a/luni/src/main/java/java/util/PriorityQueue.java b/luni/src/main/java/java/util/PriorityQueue.java
index 9b13b9c..30fce2e 100644
--- a/luni/src/main/java/java/util/PriorityQueue.java
+++ b/luni/src/main/java/java/util/PriorityQueue.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -59,7 +59,7 @@
/**
* Constructs a priority queue with the specified capacity and natural
* ordering.
- *
+ *
* @param initialCapacity
* the specified capacity.
* @throws IllegalArgumentException
@@ -71,7 +71,7 @@
/**
* Constructs a priority queue with the specified capacity and comparator.
- *
+ *
* @param initialCapacity
* the specified capacity.
* @param comparator
@@ -93,7 +93,7 @@
* The constructed priority queue has the initial capacity of 110% of the
* size of the collection. The queue uses natural ordering to order its
* elements.
- *
+ *
* @param c
* the collection whose elements will be added to the priority
* queue to be constructed.
@@ -118,7 +118,7 @@
* priority queue. The constructed priority queue has the initial capacity
* of 110% of the specified one. Both priority queues have the same
* comparator.
- *
+ *
* @param c
* the priority queue whose elements will be added to the
* priority queue to be constructed.
@@ -132,7 +132,7 @@
* The constructed priority queue has the initial capacity of 110% of the
* size of the sorted set. The priority queue will have the same comparator
* as the sorted set.
- *
+ *
* @param c
* the sorted set whose elements will be added to the priority
* queue to be constructed.
@@ -144,7 +144,7 @@
/**
* Gets the iterator of the priority queue, which will not return elements
* in any specified ordering.
- *
+ *
* @return the iterator of the priority queue.
*/
@Override
@@ -155,7 +155,7 @@
/**
* Gets the size of the priority queue. If the size of the queue is greater
* than the Integer.MAX, then it returns Integer.MAX.
- *
+ *
* @return the size of the priority queue.
*/
@Override
@@ -174,7 +174,7 @@
/**
* Inserts the element to the priority queue.
- *
+ *
* @param o
* the element to add to the priority queue.
* @return always true
@@ -196,7 +196,7 @@
/**
* Gets and removes the head of the queue.
- *
+ *
* @return the head of the queue or null if the queue is empty.
*/
public E poll() {
@@ -210,7 +210,7 @@
/**
* Gets but does not remove the head of the queue.
- *
+ *
* @return the head of the queue or null if the queue is empty.
*/
public E peek() {
@@ -222,7 +222,7 @@
/**
* Gets the comparator of the priority queue.
- *
+ *
* @return the comparator of the priority queue or null if the natural
* ordering is used.
*/
@@ -232,7 +232,7 @@
/**
* Removes the specified object from the priority queue.
- *
+ *
* @param o
* the object to be removed.
* @return true if the object was in the priority queue, false if the object
@@ -255,7 +255,7 @@
/**
* Adds the specified object to the priority queue.
- *
+ *
* @param o
* the object to be added.
* @return always true.
diff --git a/luni/src/main/java/java/util/Properties.java b/luni/src/main/java/java/util/Properties.java
index f5bd8a7..fd9c3d6 100644
--- a/luni/src/main/java/java/util/Properties.java
+++ b/luni/src/main/java/java/util/Properties.java
@@ -467,7 +467,7 @@
/**
* Returns those property names (keys) in this {@code Properties} object for which
* both key and value are strings.
- *
+ *
* @return a set of keys in the property list
* @since 1.6
* @hide
@@ -541,7 +541,7 @@
* Stores the mappings in this {@code Properties} object to {@code out},
* putting the specified comment at the beginning. The encoding is
* ISO8859-1.
- *
+ *
* @param out the {@code OutputStream}
* @param comment an optional comment to be written, or null
* @throws IOException
@@ -556,7 +556,7 @@
/**
* Stores the mappings in this {@code Properties} object to {@code out},
* putting the specified comment at the beginning.
- *
+ *
* @param out the {@code Writer}
* @param comment an optional comment to be written, or null
* @throws IOException
diff --git a/luni/src/main/java/java/util/PropertyPermission.java b/luni/src/main/java/java/util/PropertyPermission.java
index 9fc32c8..9d5b98b 100644
--- a/luni/src/main/java/java/util/PropertyPermission.java
+++ b/luni/src/main/java/java/util/PropertyPermission.java
@@ -47,7 +47,7 @@
/**
* Constructs a new instance of this class.
- *
+ *
* @param name
* the (possibly wildcarded) name of the property.
* @param actions
@@ -62,12 +62,12 @@
private void decodeActions(String actions) {
StringTokenizer tokenizer = new StringTokenizer(Util.toASCIILowerCase(actions),
- " \t\n\r,");
+ " \t\n\r,");
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
- if (token.equals("read")) {
+ if (token.equals("read")) {
read = true;
- } else if (token.equals("write")) {
+ } else if (token.equals("write")) {
write = true;
} else {
throw new IllegalArgumentException();
@@ -104,19 +104,19 @@
/**
* Returns the actions associated with the receiver. The result will be
* either "read", "write", or "read,write".
- *
+ *
* @return the actions associated with the receiver.
*/
@Override
public String getActions() {
- return read ? (write ? "read,write" : "read") : "write";
+ return read ? (write ? "read,write" : "read") : "write";
}
/**
* Returns an integer hash code for the receiver. Any two objects which
* return {@code true} when passed to {@code equals} must return the same
* value for this method.
- *
+ *
* @return the receiver's hash.
* @see #equals
*/
@@ -127,7 +127,7 @@
/**
* Indicates whether the argument permission is implied by the receiver.
- *
+ *
* @return boolean {@code true} if the argument permission is implied by the
* receiver, and {@code false} if it is not.
* @param permission
@@ -145,7 +145,7 @@
/**
* Returns a new {@code PermissionCollection} for holding permissions of this class.
* Returns {@code null} if any {@code PermissionCollection} can be used.
- *
+ *
* @return a new {@code PermissionCollection} or {@code null}.
* @see java.security.PermissionCollection
*/
@@ -155,18 +155,18 @@
}
private static final ObjectStreamField[] serialPersistentFields = { new ObjectStreamField(
- "actions", String.class) };
+ "actions", String.class) };
private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
- fields.put("actions", getActions());
+ fields.put("actions", getActions());
stream.writeFields();
}
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = stream.readFields();
- String actions = (String) fields.get("actions", "");
+ String actions = (String) fields.get("actions", "");
decodeActions(actions);
}
}
diff --git a/luni/src/main/java/java/util/PropertyPermissionCollection.java b/luni/src/main/java/java/util/PropertyPermissionCollection.java
index fe3301a..3d4b3a5 100644
--- a/luni/src/main/java/java/util/PropertyPermissionCollection.java
+++ b/luni/src/main/java/java/util/PropertyPermissionCollection.java
@@ -44,7 +44,7 @@
*/
if (prev != null && !prev.getActions().equals(perm.getActions())) {
Permission np = new PropertyPermission(perm.getName(),
- "read,write");
+ "read,write");
permissions.put(perm.getName(), np);
}
} else {
@@ -70,19 +70,19 @@
* are set, and these are separately granted by two different
* permissions with one representing a parent directory.
*/
- return perm.getActions().equals("read,write")
- && implies(new PropertyPermission(perm.getName(), "read"))
- && implies(new PropertyPermission(perm.getName(), "write"));
+ return perm.getActions().equals("read,write")
+ && implies(new PropertyPermission(perm.getName(), "read"))
+ && implies(new PropertyPermission(perm.getName(), "write"));
}
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("permissions", Hashtable.class),
- new ObjectStreamField("all_allowed", Boolean.TYPE) };
+ new ObjectStreamField("permissions", Hashtable.class),
+ new ObjectStreamField("all_allowed", Boolean.TYPE) };
private void writeObject(ObjectOutputStream stream) throws IOException {
ObjectOutputStream.PutField fields = stream.putFields();
- fields.put("permissions", permissions);
- fields.put("all_allowed", false);
+ fields.put("permissions", permissions);
+ fields.put("all_allowed", false);
stream.writeFields();
}
@@ -91,6 +91,6 @@
ClassNotFoundException {
ObjectInputStream.GetField fields = stream.readFields();
permissions = (Hashtable<String, Permission>) fields.get(
- "permissions", null);
+ "permissions", null);
}
}
diff --git a/luni/src/main/java/java/util/PropertyResourceBundle.java b/luni/src/main/java/java/util/PropertyResourceBundle.java
index 5d96ead..94d0ecf 100644
--- a/luni/src/main/java/java/util/PropertyResourceBundle.java
+++ b/luni/src/main/java/java/util/PropertyResourceBundle.java
@@ -25,7 +25,7 @@
* {@code PropertyResourceBundle} loads resources from an {@code InputStream}. All resources are
* Strings. The resources must be of the form {@code key=value}, one
* resource per line (see Properties).
- *
+ *
* @see ResourceBundle
* @see Properties
* @since 1.1
@@ -37,7 +37,7 @@
/**
* Constructs a new instance of {@code PropertyResourceBundle} and loads the
* properties file from the specified {@code InputStream}.
- *
+ *
* @param stream
* the {@code InputStream}.
* @throws IOException
@@ -51,10 +51,10 @@
resources = new Properties();
resources.load(stream);
}
-
+
/**
* Constructs a new resource bundle with properties read from {@code reader}.
- *
+ *
* @param reader the {@code Reader}
* @throws IOException
* @since 1.6
@@ -64,11 +64,11 @@
resources = new Properties();
resources.load(reader);
}
-
- protected Set<String> handleKeySet(){
+
+ protected Set<String> handleKeySet(){
return resources.stringPropertyNames();
}
-
+
@SuppressWarnings("unchecked")
private Enumeration<String> getLocalKeys() {
return (Enumeration<String>) resources.propertyNames();
diff --git a/luni/src/main/java/java/util/Queue.java b/luni/src/main/java/java/util/Queue.java
index 6ef776a..51899e3 100644
--- a/luni/src/main/java/java/util/Queue.java
+++ b/luni/src/main/java/java/util/Queue.java
@@ -43,7 +43,7 @@
* allows such an operation. The method is generally preferable to
* {@link Collection#add}, since the latter might throw an exception if the
* operation fails.
- *
+ *
* @param o
* the specified element to insert into the queue.
* @return {@code true} if the operation succeeds and {@code false} if it
@@ -54,7 +54,7 @@
/**
* Gets and removes the element at the head of the queue, or returns {@code
* null} if there is no element in the queue.
- *
+ *
* @return the element at the head of the queue or {@code null} if there is
* no element in the queue.
*/
@@ -63,7 +63,7 @@
/**
* Gets and removes the element at the head of the queue. Throws a
* NoSuchElementException if there is no element in the queue.
- *
+ *
* @return the element at the head of the queue.
* @throws NoSuchElementException
* if there is no element in the queue.
@@ -72,7 +72,7 @@
/**
* Gets but does not remove the element at the head of the queue.
- *
+ *
* @return the element at the head of the queue or {@code null} if there is
* no element in the queue.
*/
@@ -81,7 +81,7 @@
/**
* Gets but does not remove the element at the head of the queue. Throws a
* {@code NoSuchElementException} if there is no element in the queue.
- *
+ *
* @return the element at the head of the queue.
* @throws NoSuchElementException
* if there is no element in the queue.
diff --git a/luni/src/main/java/java/util/Random.java b/luni/src/main/java/java/util/Random.java
index d6fe0f6..39ddc03 100644
--- a/luni/src/main/java/java/util/Random.java
+++ b/luni/src/main/java/java/util/Random.java
@@ -23,19 +23,19 @@
/**
* This class provides methods that generates pseudo-random numbers of different
* types, such as {@code int}, {@code long}, {@code double}, and {@code float}.
- *
+ *
* @see Properties
* @see PropertyResourceBundle
*/
public class Random implements Serializable {
-
+
private static final long serialVersionUID = 3905348978240129619L;
private static final long multiplier = 0x5deece66dL;
/**
* The boolean value indicating if the second Gaussian number is available.
- *
+ *
* @serial
*/
private boolean haveNextNextGaussian;
@@ -47,7 +47,7 @@
/**
* The second Gaussian generated number.
- *
+ *
* @serial
*/
private double nextNextGaussian;
@@ -58,7 +58,7 @@
*
* <p>The initial state (that is, the seed) is <i>partially</i> based
* on the current time of day in milliseconds.</p>
- *
+ *
* @see #setSeed
*/
public Random() {
@@ -69,7 +69,7 @@
/**
* Construct a random generator with the given {@code seed} as the
* initial state. Equivalent to {@code Random r = new Random(); r.setSeed(seed);}.
- *
+ *
* @param seed
* the seed that will determine the initial state of this random
* number generator.
@@ -84,7 +84,7 @@
* the number of bits specified by the argument {@code bits} as
* described by Donald E. Knuth in <i>The Art of Computer Programming,
* Volume 2: Seminumerical Algorithms</i>, section 3.2.1.
- *
+ *
* @param bits
* number of bits of the returned value.
* @return a pseudo-random generated int number.
@@ -104,7 +104,7 @@
/**
* Returns the next pseudo-random, uniformly distributed {@code boolean} value
* generated by this generator.
- *
+ *
* @return a pseudo-random, uniformly distributed boolean value.
*/
public boolean nextBoolean() {
@@ -114,7 +114,7 @@
/**
* Modifies the {@code byte} array by a random sequence of {@code byte}s generated by this
* random number generator.
- *
+ *
* @param buf
* non-null array to contain the new random {@code byte}s.
* @see #next
@@ -136,7 +136,7 @@
/**
* Generates a normally distributed random {@code double} number between 0.0
* inclusively and 1.0 exclusively.
- *
+ *
* @return a random {@code double} in the range [0.0 - 1.0)
* @see #nextFloat
*/
@@ -147,7 +147,7 @@
/**
* Generates a normally distributed random {@code float} number between 0.0
* inclusively and 1.0 exclusively.
- *
+ *
* @return float a random {@code float} number between [0.0 and 1.0)
* @see #nextDouble
*/
@@ -162,7 +162,7 @@
* E. Muller, and G. Marsaglia, as described by Donald E. Knuth in <i>The
* Art of Computer Programming, Volume 2: Seminumerical Algorithms</i>,
* section 3.4.1, subsection C, algorithm P.
- *
+ *
* @return a random {@code double}
* @see #nextDouble
*/
@@ -172,7 +172,7 @@
haveNextNextGaussian = false;
return nextNextGaussian;
}
-
+
double v1, v2, s;
do {
v1 = 2 * nextDouble() - 1; // Generates two independent random
@@ -191,7 +191,7 @@
/**
* Generates a uniformly distributed 32-bit {@code int} value from
* the random number sequence.
- *
+ *
* @return a uniformly distributed {@code int} value.
* @see java.lang.Integer#MAX_VALUE
* @see java.lang.Integer#MIN_VALUE
@@ -205,7 +205,7 @@
/**
* Returns a new pseudo-random {@code int} value which is uniformly distributed
* between 0 (inclusively) and the value of {@code n} (exclusively).
- *
+ *
* @param n
* the exclusive upper border of the range [0 - n).
* @return a random {@code int}.
@@ -228,7 +228,7 @@
/**
* Generates a uniformly distributed 64-bit integer value from
* the random number sequence.
- *
+ *
* @return 64-bit random integer.
* @see java.lang.Integer#MAX_VALUE
* @see java.lang.Integer#MIN_VALUE
@@ -243,7 +243,7 @@
/**
* Modifies the seed a using linear congruential formula presented in <i>The
* Art of Computer Programming, Volume 2</i>, Section 3.2.1.
- *
+ *
* @param seed
* the seed that alters the state of the random number generator.
* @see #next
diff --git a/luni/src/main/java/java/util/ResourceBundle.java b/luni/src/main/java/java/util/ResourceBundle.java
index 77fe295..94bd546 100644
--- a/luni/src/main/java/java/util/ResourceBundle.java
+++ b/luni/src/main/java/java/util/ResourceBundle.java
@@ -80,9 +80,9 @@
*/
public abstract class ResourceBundle {
- private static final String UNDER_SCORE = "_";
+ private static final String UNDER_SCORE = "_";
- private static final String EMPTY_STRING = "";
+ private static final String EMPTY_STRING = "";
/**
* The parent of this {@code ResourceBundle} that is used if this bundle doesn't
@@ -122,7 +122,7 @@
/**
* Finds the named resource bundle for the default {@code Locale} and the caller's
* {@code ClassLoader}.
- *
+ *
* @param bundleName
* the name of the {@code ResourceBundle}.
* @return the requested {@code ResourceBundle}.
@@ -136,7 +136,7 @@
/**
* Finds the named {@code ResourceBundle} for the specified {@code Locale} and the caller
* {@code ClassLoader}.
- *
+ *
* @param bundleName
* the name of the {@code ResourceBundle}.
* @param locale
@@ -151,7 +151,7 @@
/**
* Finds the named resource bundle for the specified {@code Locale} and {@code ClassLoader}.
- *
+ *
* The passed base name and {@code Locale} are used to create resource bundle names.
* The first name is created by concatenating the base name with the result
* of {@link Locale#toString()}. From this name all parent bundle names are
@@ -227,13 +227,13 @@
/**
* Finds the named resource bundle for the specified base name and control.
- *
+ *
* @param baseName
* the base name of a resource bundle
* @param control
* the control that control the access sequence
* @return the named resource bundle
- *
+ *
* @since 1.6
* @hide
*/
@@ -243,7 +243,7 @@
/**
* Finds the named resource bundle for the specified base name and control.
- *
+ *
* @param baseName
* the base name of a resource bundle
* @param targetLocale
@@ -251,7 +251,7 @@
* @param control
* the control that control the access sequence
* @return the named resource bundle
- *
+ *
* @since 1.6
* @hide
*/
@@ -275,7 +275,7 @@
/**
* Finds the named resource bundle for the specified base name and control.
- *
+ *
* @param baseName
* the base name of a resource bundle
* @param targetLocale
@@ -285,7 +285,7 @@
* @param control
* the control that control the access sequence
* @return the named resource bundle
- *
+ *
* @since 1.6
* @hide
*/
@@ -294,7 +294,7 @@
ResourceBundle.Control control) {
boolean expired = false;
String bundleName = control.toBundleName(baseName, targetLocale);
- Object cacheKey = loader != null ? (Object) loader : (Object) "null";
+ Object cacheKey = loader != null ? (Object) loader : (Object) "null";
Hashtable<String, ResourceBundle> loaderCache;
// try to find in cache
synchronized (cache) {
@@ -432,7 +432,7 @@
/**
* Returns the names of the resources contained in this {@code ResourceBundle}.
- *
+ *
* @return an {@code Enumeration} of the resource names.
*/
public abstract Enumeration<String> getKeys();
@@ -441,7 +441,7 @@
* Gets the {@code Locale} of this {@code ResourceBundle}. In case a bundle was not
* found for the requested {@code Locale}, this will return the actual {@code Locale} of
* this resource bundle that was found after doing a fallback.
- *
+ *
* @return the {@code Locale} of this {@code ResourceBundle}.
*/
public Locale getLocale() {
@@ -453,7 +453,7 @@
* cannot be found in this bundle, it falls back to the parent bundle (if
* it's not null) by calling the {@link #handleGetObject} method. If the resource still
* can't be found it throws a {@code MissingResourceException}.
- *
+ *
* @param key
* the name of the resource.
* @return the resource object.
@@ -475,7 +475,7 @@
/**
* Returns the named string resource from this {@code ResourceBundle}.
- *
+ *
* @param key
* the name of the resource.
* @return the resource string.
@@ -491,7 +491,7 @@
/**
* Returns the named resource from this {@code ResourceBundle}.
- *
+ *
* @param key
* the name of the resource.
* @return the resource string array.
@@ -509,7 +509,7 @@
boolean loadBase, final ClassLoader loader) {
ResourceBundle bundle = null;
String bundleName = base + locale;
- Object cacheKey = loader != null ? (Object) loader : (Object) "null";
+ Object cacheKey = loader != null ? (Object) loader : (Object) "null";
Hashtable<String, ResourceBundle> loaderCache;
synchronized (cache) {
loaderCache = cache.get(cacheKey);
@@ -555,9 +555,9 @@
public InputStream run() {
return loader == null ? ClassLoader
.getSystemResourceAsStream(fileName
- + ".properties") : loader
+ + ".properties") : loader
.getResourceAsStream(fileName
- + ".properties");
+ + ".properties");
}
});
if (stream != null) {
@@ -601,7 +601,7 @@
/**
* Returns the named resource from this {@code ResourceBundle}, or null if the
* resource is not found.
- *
+ *
* @param key
* the name of the resource.
* @return the resource object.
@@ -611,7 +611,7 @@
/**
* Sets the parent resource bundle of this {@code ResourceBundle}. The parent is
* searched for resources which are not found in this {@code ResourceBundle}.
- *
+ *
* @param bundle
* the parent {@code ResourceBundle}.
*/
@@ -719,7 +719,7 @@
* ResourceBundle.Control is a static utility class defines ResourceBundle
* load access methods, its default access order is as the same as before.
* However users can implement their own control.
- *
+ *
* @since 1.6
* @hide
*/
@@ -781,7 +781,7 @@
/**
* default constructor
- *
+ *
*/
protected Control() {
super();
@@ -886,7 +886,7 @@
/**
* Returns a new ResourceBundle.
- *
+ *
* @param baseName
* the base name to use
* @param locale
@@ -997,7 +997,7 @@
/**
* Returns true if the ResourceBundle needs to reload.
- *
+ *
* @param baseName
* the base name of the ResourceBundle
* @param locale
@@ -1042,7 +1042,7 @@
/**
* a utility method to answer the name of a resource bundle according to
* the given base name and locale
- *
+ *
* @param baseName
* the given base name
* @param locale
@@ -1085,7 +1085,7 @@
/**
* a utility method to answer the name of a resource according to the
* given bundleName and suffix
- *
+ *
* @param bundleName
* the given bundle name
* @param suffix
diff --git a/luni/src/main/java/java/util/Scanner.java b/luni/src/main/java/java/util/Scanner.java
index 26a44cd..1138b22 100644
--- a/luni/src/main/java/java/util/Scanner.java
+++ b/luni/src/main/java/java/util/Scanner.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -62,11 +62,11 @@
// Default delimiting pattern.
private static final Pattern DEFAULT_DELIMITER = Pattern
- .compile("\\p{javaWhitespace}+");
+ .compile("\\p{javaWhitespace}+");
// The boolean's pattern.
private static final Pattern BOOLEAN_PATTERN = Pattern.compile(
- "true|false", Pattern.CASE_INSENSITIVE);
+ "true|false", Pattern.CASE_INSENSITIVE);
// Pattern used to recognize line terminator.
private static final Pattern LINE_TERMINATOR;
@@ -78,7 +78,7 @@
private static final Pattern LINE_PATTERN;
static {
- String terminator = "\n|\r\n|\r|\u0085|\u2028|\u2029";
+ String terminator = "\n|\r\n|\r|\u0085|\u2028|\u2029";
LINE_TERMINATOR = Pattern.compile(terminator);
@@ -86,16 +86,16 @@
// consider plain old string concatenation for better performance
// END android-note
StringBuilder multiTerminator = new StringBuilder();
- MULTI_LINE_TERMINATOR = Pattern.compile(multiTerminator.append("(")
- .append(terminator).append(")+").toString());
+ MULTI_LINE_TERMINATOR = Pattern.compile(multiTerminator.append("(")
+ .append(terminator).append(")+").toString());
StringBuilder line = new StringBuilder();
- LINE_PATTERN = Pattern.compile(line.append(".*(")
- .append(terminator).append(")|.+(")
- .append(terminator).append(")?").toString());
+ LINE_PATTERN = Pattern.compile(line.append(".*(")
+ .append(terminator).append(")|.+(")
+ .append(terminator).append(")?").toString());
}
// The pattern matches anything.
- private static final Pattern ANY_PATTERN = Pattern.compile("(?s).*");
+ private static final Pattern ANY_PATTERN = Pattern.compile("(?s).*");
private static final int DIPLOID = 2;
@@ -183,12 +183,12 @@
public Scanner(File src, String charsetName) throws FileNotFoundException {
if (null == src) {
throw new NullPointerException(org.apache.harmony.luni.util.Msg
- .getString("KA00a"));
+ .getString("KA00a"));
}
FileInputStream fis = new FileInputStream(src);
if (null == charsetName) {
throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
- .getString("KA009"));
+ .getString("KA009"));
}
try {
input = new InputStreamReader(fis, charsetName);
@@ -239,7 +239,7 @@
public Scanner(InputStream src, String charsetName) {
if (null == src) {
throw new NullPointerException(org.apache.harmony.luni.util.Msg
- .getString("KA00b"));
+ .getString("KA00b"));
}
try {
input = new InputStreamReader(src, charsetName);
@@ -288,11 +288,11 @@
public Scanner(ReadableByteChannel src, String charsetName) {
if (null == src) {
throw new NullPointerException(org.apache.harmony.luni.util.Msg
- .getString("KA00d"));
+ .getString("KA00d"));
}
if (null == charsetName) {
throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
- .getString("KA009"));
+ .getString("KA009"));
}
input = Channels.newReader(src, charsetName);
initialization();
@@ -477,7 +477,7 @@
checkNull(pattern);
if (horizon < 0) {
throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
- .getString("KA00e"));
+ .getString("KA00e"));
}
matcher.usePattern(pattern);
@@ -1699,7 +1699,7 @@
public Scanner useRadix(int radix) {
if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
- .getString("KA008", radix));
+ .getString("KA008", radix));
}
this.integerRadix = radix;
return this;
@@ -1776,23 +1776,23 @@
private Pattern getIntegerPattern(int radix) {
if (radix < Character.MIN_RADIX || radix > Character.MAX_RADIX) {
throw new IllegalArgumentException(org.apache.harmony.luni.util.Msg
- .getString("KA00e", radix));
+ .getString("KA00e", radix));
}
decimalFormat = (DecimalFormat) NumberFormat.getInstance(locale);
- String allAvailableDigits = "0123456789abcdefghijklmnopqrstuvwxyz";
+ String allAvailableDigits = "0123456789abcdefghijklmnopqrstuvwxyz";
String ASCIIDigit = allAvailableDigits.substring(0, radix);
String nonZeroASCIIDigit = allAvailableDigits.substring(1, radix);
- StringBuilder digit = new StringBuilder("((?i)[").append(ASCIIDigit)
- .append("]|\\p{javaDigit})");
- StringBuilder nonZeroDigit = new StringBuilder("((?i)[").append(
- nonZeroASCIIDigit).append("]|([\\p{javaDigit}&&[^0]]))");
+ StringBuilder digit = new StringBuilder("((?i)[").append(ASCIIDigit)
+ .append("]|\\p{javaDigit})");
+ StringBuilder nonZeroDigit = new StringBuilder("((?i)[").append(
+ nonZeroASCIIDigit).append("]|([\\p{javaDigit}&&[^0]]))");
StringBuilder numeral = getNumeral(digit, nonZeroDigit);
- StringBuilder integer = new StringBuilder("(([-+]?(").append(numeral)
- .append(")))|(").append(addPositiveSign(numeral)).append(")|(")
- .append(addNegativeSign(numeral)).append(")");
+ StringBuilder integer = new StringBuilder("(([-+]?(").append(numeral)
+ .append(")))|(").append(addPositiveSign(numeral)).append(")|(")
+ .append(addNegativeSign(numeral)).append(")");
Pattern integerPattern = Pattern.compile(integer.toString());
return integerPattern;
@@ -1804,40 +1804,40 @@
private Pattern getFloatPattern() {
decimalFormat = (DecimalFormat) NumberFormat.getInstance(locale);
- StringBuilder digit = new StringBuilder("([0-9]|(\\p{javaDigit}))");
- StringBuilder nonZeroDigit = new StringBuilder("[\\p{javaDigit}&&[^0]]");
+ StringBuilder digit = new StringBuilder("([0-9]|(\\p{javaDigit}))");
+ StringBuilder nonZeroDigit = new StringBuilder("[\\p{javaDigit}&&[^0]]");
StringBuilder numeral = getNumeral(digit, nonZeroDigit);
String decimalSeparator = "\\" + decimalFormat.getDecimalFormatSymbols()
.getDecimalSeparator();
- StringBuilder decimalNumeral = new StringBuilder("(").append(numeral)
- .append("|").append(numeral)
- .append(decimalSeparator).append(digit).append("*+|").append(
- decimalSeparator).append(digit).append("++)");
- StringBuilder exponent = new StringBuilder("([eE][+-]?").append(digit)
- .append("+)?");
+ StringBuilder decimalNumeral = new StringBuilder("(").append(numeral)
+ .append("|").append(numeral)
+ .append(decimalSeparator).append(digit).append("*+|").append(
+ decimalSeparator).append(digit).append("++)");
+ StringBuilder exponent = new StringBuilder("([eE][+-]?").append(digit)
+ .append("+)?");
- StringBuilder decimal = new StringBuilder("(([-+]?").append(
- decimalNumeral).append("(").append(exponent).append("?)")
- .append(")|(").append(addPositiveSign(decimalNumeral)).append(
- "(").append(exponent).append("?)").append(")|(")
- .append(addNegativeSign(decimalNumeral)).append("(").append(
- exponent).append("?)").append("))");
+ StringBuilder decimal = new StringBuilder("(([-+]?").append(
+ decimalNumeral).append("(").append(exponent).append("?)")
+ .append(")|(").append(addPositiveSign(decimalNumeral)).append(
+ "(").append(exponent).append("?)").append(")|(")
+ .append(addNegativeSign(decimalNumeral)).append("(").append(
+ exponent).append("?)").append("))");
- StringBuilder hexFloat = new StringBuilder("([-+]?0[xX][0-9a-fA-F]*")
+ StringBuilder hexFloat = new StringBuilder("([-+]?0[xX][0-9a-fA-F]*")
.append("\\.").append(
- "[0-9a-fA-F]+([pP][-+]?[0-9]+)?)");
+ "[0-9a-fA-F]+([pP][-+]?[0-9]+)?)");
String localNaN = decimalFormat.getDecimalFormatSymbols().getNaN();
String localeInfinity = decimalFormat.getDecimalFormatSymbols()
.getInfinity();
- StringBuilder nonNumber = new StringBuilder("(NaN|\\Q").append(localNaN)
- .append("\\E|Infinity|\\Q").append(localeInfinity).append("\\E)");
- StringBuilder singedNonNumber = new StringBuilder("((([-+]?(").append(
- nonNumber).append(")))|(").append(addPositiveSign(nonNumber))
- .append(")|(").append(addNegativeSign(nonNumber)).append("))");
+ StringBuilder nonNumber = new StringBuilder("(NaN|\\Q").append(localNaN)
+ .append("\\E|Infinity|\\Q").append(localeInfinity).append("\\E)");
+ StringBuilder singedNonNumber = new StringBuilder("((([-+]?(").append(
+ nonNumber).append(")))|(").append(addPositiveSign(nonNumber))
+ .append(")|(").append(addNegativeSign(nonNumber)).append("))");
StringBuilder floatString = new StringBuilder().append(decimal).append(
- "|").append(hexFloat).append("|").append(singedNonNumber);
+ "|").append(hexFloat).append("|").append(singedNonNumber);
Pattern floatPattern = Pattern.compile(floatString.toString());
return floatPattern;
}
@@ -1847,12 +1847,12 @@
String groupSeparator = "\\"
+ decimalFormat.getDecimalFormatSymbols()
.getGroupingSeparator();
- StringBuilder groupedNumeral = new StringBuilder("(").append(
- nonZeroDigit).append(digit).append("?").append(digit).append(
- "?(").append(groupSeparator).append(digit).append(digit)
- .append(digit).append(")+)");
- StringBuilder numeral = new StringBuilder("((").append(digit).append(
- "++)|").append(groupedNumeral).append(")");
+ StringBuilder groupedNumeral = new StringBuilder("(").append(
+ nonZeroDigit).append(digit).append("?").append(digit).append(
+ "?(").append(groupSeparator).append(digit).append(digit)
+ .append(digit).append(")+)");
+ StringBuilder numeral = new StringBuilder("((").append(digit).append(
+ "++)|").append(groupedNumeral).append(")");
return numeral;
}
@@ -1860,13 +1860,13 @@
* Add the locale specific positive prefixes and suffixes to the pattern
*/
private StringBuilder addPositiveSign(StringBuilder unSignNumeral) {
- String positivePrefix = "";
- String positiveSuffix = "";
- if (!decimalFormat.getPositivePrefix().equals("")) {
- positivePrefix = "\\Q" + decimalFormat.getPositivePrefix() + "\\E";
+ String positivePrefix = "";
+ String positiveSuffix = "";
+ if (!decimalFormat.getPositivePrefix().equals("")) {
+ positivePrefix = "\\Q" + decimalFormat.getPositivePrefix() + "\\E";
}
- if (!decimalFormat.getPositiveSuffix().equals("")) {
- positiveSuffix = "\\Q" + decimalFormat.getPositiveSuffix() + "\\E";
+ if (!decimalFormat.getPositiveSuffix().equals("")) {
+ positiveSuffix = "\\Q" + decimalFormat.getPositiveSuffix() + "\\E";
}
StringBuilder signedNumeral = new StringBuilder()
.append(positivePrefix).append(unSignNumeral).append(
@@ -1878,13 +1878,13 @@
* Add the locale specific negative prefixes and suffixes to the pattern
*/
private StringBuilder addNegativeSign(StringBuilder unSignNumeral) {
- String negativePrefix = "";
- String negativeSuffix = "";
- if (!decimalFormat.getNegativePrefix().equals("")) {
- negativePrefix = "\\Q" + decimalFormat.getNegativePrefix() + "\\E";
+ String negativePrefix = "";
+ String negativeSuffix = "";
+ if (!decimalFormat.getNegativePrefix().equals("")) {
+ negativePrefix = "\\Q" + decimalFormat.getNegativePrefix() + "\\E";
}
- if (!decimalFormat.getNegativeSuffix().equals("")) {
- negativeSuffix = "\\Q" + decimalFormat.getNegativeSuffix() + "\\E";
+ if (!decimalFormat.getNegativeSuffix().equals("")) {
+ negativeSuffix = "\\Q" + decimalFormat.getNegativeSuffix() + "\\E";
}
StringBuilder signedNumeral = new StringBuilder()
.append(negativePrefix).append(unSignNumeral).append(
@@ -1912,7 +1912,7 @@
floatString.length());
decimalNumeralString = removeLocaleInfo(decimalNumeralString,
DataType.FLOAT);
- return decimalNumeralString + "e" + exponentString;
+ return decimalNumeralString + "e" + exponentString;
}
return removeLocaleInfo(floatString, DataType.FLOAT);
}
@@ -1935,7 +1935,7 @@
String decimalSeparator = String.valueOf(decimalFormat
.getDecimalFormatSymbols().getDecimalSeparator());
separatorIndex = tokenBuilder.indexOf(decimalSeparator);
- StringBuilder result = new StringBuilder("");
+ StringBuilder result = new StringBuilder("");
if (DataType.INT == type) {
for (int i = 0; i < tokenBuilder.length(); i++) {
if (-1 != Character.digit(tokenBuilder.charAt(i),
@@ -1965,7 +1965,7 @@
result = tokenBuilder;
}
if (-1 != separatorIndex) {
- result.insert(separatorIndex, ".");
+ result.insert(separatorIndex, ".");
}
// If input is negative
if (negative) {
@@ -1984,30 +1984,30 @@
String negativePrefix = decimalFormat.getNegativePrefix();
String negativeSuffix = decimalFormat.getNegativeSuffix();
- if (0 == tokenBuilder.indexOf("+")) {
+ if (0 == tokenBuilder.indexOf("+")) {
tokenBuilder.delete(0, 1);
}
- if (!positivePrefix.equals("")
+ if (!positivePrefix.equals("")
&& 0 == tokenBuilder.indexOf(positivePrefix)) {
tokenBuilder.delete(0, positivePrefix.length());
}
- if (!positiveSuffix.equals("")
+ if (!positiveSuffix.equals("")
&& -1 != tokenBuilder.indexOf(positiveSuffix)) {
tokenBuilder.delete(
tokenBuilder.length() - positiveSuffix.length(),
tokenBuilder.length());
}
boolean negative = false;
- if (0 == tokenBuilder.indexOf("-")) {
+ if (0 == tokenBuilder.indexOf("-")) {
tokenBuilder.delete(0, 1);
negative = true;
}
- if (!negativePrefix.equals("")
+ if (!negativePrefix.equals("")
&& 0 == tokenBuilder.indexOf(negativePrefix)) {
tokenBuilder.delete(0, negativePrefix.length());
negative = true;
}
- if (!negativeSuffix.equals("")
+ if (!negativeSuffix.equals("")
&& -1 != tokenBuilder.indexOf(negativeSuffix)) {
tokenBuilder.delete(
tokenBuilder.length() - negativeSuffix.length(),
@@ -2196,7 +2196,7 @@
/**
* Resets this scanner's delimiter, locale, and radix.
- *
+ *
* @return this scanner
* @since 1.6
* @hide
diff --git a/luni/src/main/java/java/util/ServiceLoader.java b/luni/src/main/java/java/util/ServiceLoader.java
index a8e16d5..c43d761 100644
--- a/luni/src/main/java/java/util/ServiceLoader.java
+++ b/luni/src/main/java/java/util/ServiceLoader.java
@@ -25,12 +25,12 @@
/**
* A service-provider loader.
- *
+ *
* <p>A service provider is a factory for creating all known implementations of a particular
* class or interface {@code S}. The known implementations are read from a configuration file in
* {@code META-INF/services/}. The file's name should match the class' binary name (such as
* {@code java.util.Outer$Inner}).
- *
+ *
* <p>The file format is as follows.
* The file's character encoding must be UTF-8.
* Whitespace is ignored, and {@code #} is used to begin a comment that continues to the
@@ -39,7 +39,7 @@
* Otherwise, each line contains the binary name of one implementation class.
* Duplicate entries are ignored, but entries are otherwise returned in order (that is, the file
* is treated as an ordered set).
- *
+ *
* <p>Given these classes:
* <pre>
* package a.b.c;
@@ -61,12 +61,12 @@
* }
* }
* </pre>
- *
+ *
* <p>Note that each iteration creates new instances of the various service implementations, so
* any heavily-used code will likely want to cache the known implementations itself and reuse them.
* Note also that the candidate classes are instantiated lazily as you call {@code next} on the
* iterator: construction of the iterator itself does not instantiate any of the providers.
- *
+ *
* @param <S> the service class or interface
* @since 1.6
* @hide
@@ -98,11 +98,11 @@
/**
* Returns an iterator over all the service providers offered by this service loader.
* Note that {@code hasNext} and {@code next} may throw if the configuration is invalid.
- *
+ *
* <p>Each iterator will return new instances of the classes it iterates over, so callers
* may want to cache the results of a single call to this method rather than call it
* repeatedly.
- *
+ *
* <p>The returned iterator does not support {@code remove}.
*/
public Iterator<S> iterator() {
@@ -112,7 +112,7 @@
/**
* Constructs a service loader. If {@code classLoader} is null, the system class loader
* is used.
- *
+ *
* @param service the service class or interface
* @param classLoader the class loader
* @return a new ServiceLoader
@@ -136,7 +136,7 @@
/**
* Constructs a service loader, using the current thread's context class loader.
- *
+ *
* @param service the service class or interface
* @return a new ServiceLoader
*/
@@ -146,7 +146,7 @@
/**
* Constructs a service loader, using the extension class loader.
- *
+ *
* @param service the service class or interface
* @return a new ServiceLoader
*/
diff --git a/luni/src/main/java/java/util/Set.java b/luni/src/main/java/java/util/Set.java
index 109c8df..d0b07a9 100644
--- a/luni/src/main/java/java/util/Set.java
+++ b/luni/src/main/java/java/util/Set.java
@@ -24,11 +24,11 @@
* @since 1.2
*/
public interface Set<E> extends Collection<E> {
-
+
/**
* Adds the specified object to this set. The set is not modified if it
* already contains the object.
- *
+ *
* @param object
* the object to add.
* @return {@code true} if this set is modified, {@code false} otherwise.
@@ -44,7 +44,7 @@
/**
* Adds the objects in the specified collection which do not exist yet in
* this set.
- *
+ *
* @param collection
* the collection of objects.
* @return {@code true} if this set is modified, {@code false} otherwise.
@@ -59,7 +59,7 @@
/**
* Removes all elements from this set, leaving it empty.
- *
+ *
* @throws UnsupportedOperationException
* when removing from this set is not supported.
* @see #isEmpty
@@ -69,7 +69,7 @@
/**
* Searches this set for the specified object.
- *
+ *
* @param object
* the object to search for.
* @return {@code true} if object is an element of this set, {@code false}
@@ -79,7 +79,7 @@
/**
* Searches this set for all objects in the specified collection.
- *
+ *
* @param collection
* the collection of objects.
* @return {@code true} if all objects in the specified collection are
@@ -92,7 +92,7 @@
* represent the <em>same</em> object using a class specific comparison.
* Equality for a set means that both sets have the same size and the same
* elements.
- *
+ *
* @param object
* the object to compare with this object.
* @return boolean {@code true} if the object is the same as this object,
@@ -104,16 +104,16 @@
/**
* Returns the hash code for this set. Two set which are equal must return
* the same value.
- *
+ *
* @return the hash code of this set.
- *
+ *
* @see #equals
*/
public int hashCode();
/**
* Returns true if this set has no elements.
- *
+ *
* @return {@code true} if this set has no elements, {@code false}
* otherwise.
* @see #size
@@ -123,7 +123,7 @@
/**
* Returns an iterator on the elements of this set. The elements are
* unordered.
- *
+ *
* @return an iterator on the elements of this set.
* @see Iterator
*/
@@ -131,7 +131,7 @@
/**
* Removes the specified object from this set.
- *
+ *
* @param object
* the object to remove.
* @return {@code true} if this set was modified, {@code false} otherwise.
@@ -142,7 +142,7 @@
/**
* Removes all objects in the specified collection from this set.
- *
+ *
* @param collection
* the collection of objects to remove.
* @return {@code true} if this set was modified, {@code false} otherwise.
@@ -154,7 +154,7 @@
/**
* Removes all objects from this set that are not contained in the specified
* collection.
- *
+ *
* @param collection
* the collection of objects to retain.
* @return {@code true} if this set was modified, {@code false} otherwise.
@@ -165,14 +165,14 @@
/**
* Returns the number of elements in this set.
- *
+ *
* @return the number of elements in this set.
*/
public int size();
/**
* Returns an array containing all elements contained in this set.
- *
+ *
* @return an array of the elements from this set.
*/
public Object[] toArray();
@@ -183,7 +183,7 @@
* is used, otherwise an array of the same type is created. If the specified
* array is used and is larger than this set, the array element following
* the collection elements is set to null.
- *
+ *
* @param array
* the array.
* @return an array of the elements from this set.
diff --git a/luni/src/main/java/java/util/SimpleTimeZone.java b/luni/src/main/java/java/util/SimpleTimeZone.java
index c426a25..a0a7947 100644
--- a/luni/src/main/java/java/util/SimpleTimeZone.java
+++ b/luni/src/main/java/java/util/SimpleTimeZone.java
@@ -268,7 +268,7 @@
// END android-changed
if (daylightSavings <= 0) {
throw new IllegalArgumentException(Msg.getString(
- "K00e9", daylightSavings));
+ "K00e9", daylightSavings));
}
dstSavings = daylightSavings;
@@ -392,7 +392,7 @@
public int getOffset(int era, int year, int month, int day, int dayOfWeek,
int time) {
if (era != GregorianCalendar.BC && era != GregorianCalendar.AD) {
- throw new IllegalArgumentException(Msg.getString("K00ea", era));
+ throw new IllegalArgumentException(Msg.getString("K00ea", era));
}
checkRange(month, dayOfWeek, time);
if (month != Calendar.FEBRUARY || day != 29 || !isLeapYear(year)) {
@@ -616,20 +616,20 @@
private void checkRange(int month, int dayOfWeek, int time) {
if (month < Calendar.JANUARY || month > Calendar.DECEMBER) {
- throw new IllegalArgumentException(Msg.getString("K00e5", month));
+ throw new IllegalArgumentException(Msg.getString("K00e5", month));
}
if (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) {
throw new IllegalArgumentException(Msg
- .getString("K00e7", dayOfWeek));
+ .getString("K00e7", dayOfWeek));
}
if (time < 0 || time >= 24 * 3600000) {
- throw new IllegalArgumentException(Msg.getString("K00e8", time));
+ throw new IllegalArgumentException(Msg.getString("K00e8", time));
}
}
private void checkDay(int month, int day) {
if (day <= 0 || day > GregorianCalendar.DaysInMonth[month]) {
- throw new IllegalArgumentException(Msg.getString("K00e6", day));
+ throw new IllegalArgumentException(Msg.getString("K00e6", day));
}
}
@@ -656,7 +656,7 @@
} else {
if (endDay < -5 || endDay > 5) {
throw new IllegalArgumentException(Msg.getString(
- "K00f8", endDay));
+ "K00f8", endDay));
}
}
}
@@ -788,7 +788,7 @@
} else {
if (startDay < -5 || startDay > 5) {
throw new IllegalArgumentException(Msg.getString(
- "K00f8", startDay));
+ "K00f8", startDay));
}
}
}
@@ -903,29 +903,29 @@
@Override
public String toString() {
return getClass().getName()
- + "[id="
+ + "[id="
+ getID()
- + ",offset="
+ + ",offset="
+ rawOffset
- + ",dstSavings="
+ + ",dstSavings="
+ dstSavings
- + ",useDaylight="
+ + ",useDaylight="
+ useDaylight
- + ",startYear="
+ + ",startYear="
+ startYear
- + ",startMode="
+ + ",startMode="
+ startMode
- + ",startMonth="
+ + ",startMonth="
+ startMonth
- + ",startDay="
+ + ",startDay="
+ startDay
- + ",startDayOfWeek="
+ + ",startDayOfWeek="
+ (useDaylight && (startMode != DOM_MODE) ? startDayOfWeek + 1
- : 0) + ",startTime=" + startTime + ",endMode="
- + endMode + ",endMonth=" + endMonth + ",endDay=" + endDay
- + ",endDayOfWeek="
+ : 0) + ",startTime=" + startTime + ",endMode="
+ + endMode + ",endMonth=" + endMonth + ",endDay=" + endDay
+ + ",endDayOfWeek="
+ (useDaylight && (endMode != DOM_MODE) ? endDayOfWeek + 1 : 0)
- + ",endTime=" + endTime + "]";
+ + ",endTime=" + endTime + "]";
}
@Override
@@ -934,22 +934,22 @@
}
private static final ObjectStreamField[] serialPersistentFields = {
- new ObjectStreamField("dstSavings", Integer.TYPE),
- new ObjectStreamField("endDay", Integer.TYPE),
- new ObjectStreamField("endDayOfWeek", Integer.TYPE),
- new ObjectStreamField("endMode", Integer.TYPE),
- new ObjectStreamField("endMonth", Integer.TYPE),
- new ObjectStreamField("endTime", Integer.TYPE),
- new ObjectStreamField("monthLength", byte[].class),
- new ObjectStreamField("rawOffset", Integer.TYPE),
- new ObjectStreamField("serialVersionOnStream", Integer.TYPE),
- new ObjectStreamField("startDay", Integer.TYPE),
- new ObjectStreamField("startDayOfWeek", Integer.TYPE),
- new ObjectStreamField("startMode", Integer.TYPE),
- new ObjectStreamField("startMonth", Integer.TYPE),
- new ObjectStreamField("startTime", Integer.TYPE),
- new ObjectStreamField("startYear", Integer.TYPE),
- new ObjectStreamField("useDaylight", Boolean.TYPE), };
+ new ObjectStreamField("dstSavings", Integer.TYPE),
+ new ObjectStreamField("endDay", Integer.TYPE),
+ new ObjectStreamField("endDayOfWeek", Integer.TYPE),
+ new ObjectStreamField("endMode", Integer.TYPE),
+ new ObjectStreamField("endMonth", Integer.TYPE),
+ new ObjectStreamField("endTime", Integer.TYPE),
+ new ObjectStreamField("monthLength", byte[].class),
+ new ObjectStreamField("rawOffset", Integer.TYPE),
+ new ObjectStreamField("serialVersionOnStream", Integer.TYPE),
+ new ObjectStreamField("startDay", Integer.TYPE),
+ new ObjectStreamField("startDayOfWeek", Integer.TYPE),
+ new ObjectStreamField("startMode", Integer.TYPE),
+ new ObjectStreamField("startMonth", Integer.TYPE),
+ new ObjectStreamField("startTime", Integer.TYPE),
+ new ObjectStreamField("startYear", Integer.TYPE),
+ new ObjectStreamField("useDaylight", Boolean.TYPE), };
private void writeObject(ObjectOutputStream stream) throws IOException {
int sEndDay = endDay, sEndDayOfWeek = endDayOfWeek + 1, sStartDay = startDay, sStartDayOfWeek = startDayOfWeek + 1;
@@ -974,22 +974,22 @@
}
}
ObjectOutputStream.PutField fields = stream.putFields();
- fields.put("dstSavings", dstSavings);
- fields.put("endDay", sEndDay);
- fields.put("endDayOfWeek", sEndDayOfWeek);
- fields.put("endMode", endMode);
- fields.put("endMonth", endMonth);
- fields.put("endTime", endTime);
- fields.put("monthLength", GregorianCalendar.DaysInMonth);
- fields.put("rawOffset", rawOffset);
- fields.put("serialVersionOnStream", 1);
- fields.put("startDay", sStartDay);
- fields.put("startDayOfWeek", sStartDayOfWeek);
- fields.put("startMode", startMode);
- fields.put("startMonth", startMonth);
- fields.put("startTime", startTime);
- fields.put("startYear", startYear);
- fields.put("useDaylight", useDaylight);
+ fields.put("dstSavings", dstSavings);
+ fields.put("endDay", sEndDay);
+ fields.put("endDayOfWeek", sEndDayOfWeek);
+ fields.put("endMode", endMode);
+ fields.put("endMonth", endMonth);
+ fields.put("endTime", endTime);
+ fields.put("monthLength", GregorianCalendar.DaysInMonth);
+ fields.put("rawOffset", rawOffset);
+ fields.put("serialVersionOnStream", 1);
+ fields.put("startDay", sStartDay);
+ fields.put("startDayOfWeek", sStartDayOfWeek);
+ fields.put("startMode", startMode);
+ fields.put("startMonth", startMonth);
+ fields.put("startTime", startTime);
+ fields.put("startYear", startYear);
+ fields.put("useDaylight", useDaylight);
stream.writeFields();
stream.writeInt(4);
byte[] values = new byte[4];
@@ -1003,28 +1003,28 @@
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
ObjectInputStream.GetField fields = stream.readFields();
- rawOffset = fields.get("rawOffset", 0);
- useDaylight = fields.get("useDaylight", false);
+ rawOffset = fields.get("rawOffset", 0);
+ useDaylight = fields.get("useDaylight", false);
if (useDaylight) {
- endMonth = fields.get("endMonth", 0);
- endTime = fields.get("endTime", 0);
- startMonth = fields.get("startMonth", 0);
- startTime = fields.get("startTime", 0);
- startYear = fields.get("startYear", 0);
+ endMonth = fields.get("endMonth", 0);
+ endTime = fields.get("endTime", 0);
+ startMonth = fields.get("startMonth", 0);
+ startTime = fields.get("startTime", 0);
+ startYear = fields.get("startYear", 0);
}
- if (fields.get("serialVersionOnStream", 0) == 0) {
+ if (fields.get("serialVersionOnStream", 0) == 0) {
if (useDaylight) {
startMode = endMode = DOW_IN_MONTH_MODE;
- endDay = fields.get("endDay", 0);
- endDayOfWeek = fields.get("endDayOfWeek", 0) - 1;
- startDay = fields.get("startDay", 0);
- startDayOfWeek = fields.get("startDayOfWeek", 0) - 1;
+ endDay = fields.get("endDay", 0);
+ endDayOfWeek = fields.get("endDayOfWeek", 0) - 1;
+ startDay = fields.get("startDay", 0);
+ startDayOfWeek = fields.get("startDayOfWeek", 0) - 1;
}
} else {
- dstSavings = fields.get("dstSavings", 0);
+ dstSavings = fields.get("dstSavings", 0);
if (useDaylight) {
- endMode = fields.get("endMode", 0);
- startMode = fields.get("startMode", 0);
+ endMode = fields.get("endMode", 0);
+ startMode = fields.get("startMode", 0);
int length = stream.readInt();
byte[] values = new byte[length];
stream.readFully(values);
diff --git a/luni/src/main/java/java/util/SortedMap.java b/luni/src/main/java/java/util/SortedMap.java
index 2fb25fd..aec7adf 100644
--- a/luni/src/main/java/java/util/SortedMap.java
+++ b/luni/src/main/java/java/util/SortedMap.java
@@ -23,17 +23,17 @@
* natural ordering of its keys or the ordering given by a specified comparator.
*/
public interface SortedMap<K,V> extends Map<K,V> {
-
+
/**
* Returns the comparator used to compare keys in this sorted map.
- *
+ *
* @return the comparator or {@code null} if the natural order is used.
*/
public Comparator<? super K> comparator();
/**
* Returns the first key in this sorted map.
- *
+ *
* @return the first key in this sorted map.
* @throws NoSuchElementException
* if this sorted map is empty.
@@ -65,7 +65,7 @@
/**
* Returns the last key in this sorted map.
- *
+ *
* @return the last key in this sorted map.
* @throws NoSuchElementException
* if this sorted map is empty.
@@ -106,7 +106,7 @@
* <p>
* Note: The returned map will not allow an insertion of a key outside the
* specified range.
- *
+ *
* @param startKey
* the low boundary of the range specified.
* @return a sorted map where the keys are greater or equal to
diff --git a/luni/src/main/java/java/util/SortedSet.java b/luni/src/main/java/java/util/SortedSet.java
index d387540..13b8c2e 100644
--- a/luni/src/main/java/java/util/SortedSet.java
+++ b/luni/src/main/java/java/util/SortedSet.java
@@ -24,15 +24,15 @@
* {@link Comparator} which is passed into a concrete implementation at
* construction time. All elements in this set must be mutually comparable. The
* ordering in this set must be consistent with {@code equals} of its elements.
- *
+ *
* @see Comparator
* @see Comparable
*/
public interface SortedSet<E> extends Set<E> {
-
+
/**
* Returns the comparator used to compare elements in this {@code SortedSet}.
- *
+ *
* @return a comparator or null if the natural ordering is used.
*/
public Comparator<? super E> comparator();
@@ -40,7 +40,7 @@
/**
* Returns the first element in this {@code SortedSet}. The first element
* is the lowest element.
- *
+ *
* @return the first element.
* @throws NoSuchElementException
* when this {@code SortedSet} is empty.
@@ -52,7 +52,7 @@
* {@code SortedSet} which contains elements less than the end element. The
* returned {@code SortedSet} is backed by this {@code SortedSet} so changes
* to one set are reflected by the other.
- *
+ *
* @param end
* the end element.
* @return a subset where the elements are less than {@code end}.
@@ -68,7 +68,7 @@
/**
* Returns the last element in this {@code SortedSet}. The last element is
* the highest element.
- *
+ *
* @return the last element.
* @throws NoSuchElementException
* when this {@code SortedSet} is empty.
@@ -81,7 +81,7 @@
* element but less than the end element. The returned {@code SortedSet} is
* backed by this SortedMap so changes to one set are reflected by the
* other.
- *
+ *
* @param start
* the start element.
* @param end
@@ -104,7 +104,7 @@
* {@code SortedSet} which contains elements greater or equal to the start
* element. The returned {@code SortedSet} is backed by this
* {@code SortedSet} so changes to one set are reflected by the other.
- *
+ *
* @param start
* the start element.
* @return a subset where the elements are greater or equal to {@code start} .
diff --git a/luni/src/main/java/java/util/SpecialAccess.java b/luni/src/main/java/java/util/SpecialAccess.java
index 852a978..49a904b 100644
--- a/luni/src/main/java/java/util/SpecialAccess.java
+++ b/luni/src/main/java/java/util/SpecialAccess.java
@@ -39,7 +39,7 @@
// This can only be assigned after the above bootstrap.
LANG = EnumSet.LANG_BOOTSTRAP;
-
+
if (LANG == null) {
throw new AssertionError();
}
diff --git a/luni/src/main/java/java/util/StringTokenizer.java b/luni/src/main/java/java/util/StringTokenizer.java
index ddcc1ff..e581088 100644
--- a/luni/src/main/java/java/util/StringTokenizer.java
+++ b/luni/src/main/java/java/util/StringTokenizer.java
@@ -120,7 +120,7 @@
* the string to be tokenized.
*/
public StringTokenizer(String string) {
- this(string, " \t\n\r\f", false);
+ this(string, " \t\n\r\f", false);
}
/**
diff --git a/luni/src/main/java/java/util/TimSort.java b/luni/src/main/java/java/util/TimSort.java
index 4a9c05bf..79dc377 100644
--- a/luni/src/main/java/java/util/TimSort.java
+++ b/luni/src/main/java/java/util/TimSort.java
@@ -341,7 +341,7 @@
while (lo < hi) {
Object t = a[lo];
a[lo++] = a[hi];
- a[hi--] = t;
+ a[hi--] = t;
}
}
diff --git a/luni/src/main/java/java/util/Timer.java b/luni/src/main/java/java/util/Timer.java
index 105d5e7..5f8c309 100644
--- a/luni/src/main/java/java/util/Timer.java
+++ b/luni/src/main/java/java/util/Timer.java
@@ -184,7 +184,7 @@
/**
* Starts a new timer.
- *
+ *
* @param name thread's name
* @param isDaemon daemon thread or not
*/
@@ -321,15 +321,15 @@
}
}
-
+
private static final class FinalizerHelper {
private final TimerImpl impl;
-
+
FinalizerHelper(TimerImpl impl) {
super();
this.impl = impl;
}
-
+
@Override
protected void finalize() {
synchronized (impl) {
@@ -338,9 +338,9 @@
}
}
}
-
+
private static long timerId;
-
+
private synchronized static long nextId() {
return timerId++;
}
@@ -368,7 +368,7 @@
this.impl = new TimerImpl(name, isDaemon);
this.finalizer = new FinalizerHelper(impl);
}
-
+
/**
* Creates a new named {@code Timer} which does not run as a daemon thread.
*
@@ -378,7 +378,7 @@
public Timer(String name) {
this(name, false);
}
-
+
/**
* Creates a new {@code Timer} which may be specified to be run as a daemon thread.
*
@@ -560,22 +560,22 @@
boolean fixed) {
synchronized (impl) {
if (impl.cancelled) {
- throw new IllegalStateException(Msg.getString("K00f3"));
+ throw new IllegalStateException(Msg.getString("K00f3"));
}
long when = delay + System.currentTimeMillis();
if (when < 0) {
- throw new IllegalArgumentException(Msg.getString("K00f5"));
+ throw new IllegalArgumentException(Msg.getString("K00f5"));
}
synchronized (task.lock) {
if (task.isScheduled()) {
- throw new IllegalStateException(Msg.getString("K00f6"));
+ throw new IllegalStateException(Msg.getString("K00f6"));
}
if (task.cancelled) {
- throw new IllegalStateException(Msg.getString("K00f7"));
+ throw new IllegalStateException(Msg.getString("K00f7"));
}
task.when = when;
diff --git a/luni/src/main/java/java/util/TimerTask.java b/luni/src/main/java/java/util/TimerTask.java
index 319ed58..b3c0f6a 100644
--- a/luni/src/main/java/java/util/TimerTask.java
+++ b/luni/src/main/java/java/util/TimerTask.java
@@ -20,7 +20,7 @@
/**
* The {@code TimerTask} class represents a task to run at a specified time. The task
* may be run once or repeatedly.
- *
+ *
* @see Timer
* @see java.lang.Object#wait(long)
*/
@@ -64,7 +64,7 @@
/*
* Is TimerTask scheduled into any timer?
- *
+ *
* @return {@code true} if the timer task is scheduled, {@code false}
* otherwise.
*/
@@ -85,7 +85,7 @@
* Cancels the {@code TimerTask} and removes it from the {@code Timer}'s queue. Generally, it
* returns {@code false} if the call did not prevent a {@code TimerTask} from running at
* least once. Subsequent calls have no effect.
- *
+ *
* @return {@code true} if the call prevented a scheduled execution
* from taking place, {@code false} otherwise.
*/
@@ -101,7 +101,7 @@
* Returns the scheduled execution time. If the task execution is in
* progress it returns the execution time of the ongoing task. Tasks which
* have not yet run return an undefined value.
- *
+ *
* @return the most recent execution time.
*/
public long scheduledExecutionTime() {
diff --git a/luni/src/main/java/java/util/TooManyListenersException.java b/luni/src/main/java/java/util/TooManyListenersException.java
index 8c044c0..d05c3ce 100644
--- a/luni/src/main/java/java/util/TooManyListenersException.java
+++ b/luni/src/main/java/java/util/TooManyListenersException.java
@@ -38,7 +38,7 @@
/**
* Constructs a new {@code TooManyListenersException} with the stack trace
* and message filled in.
- *
+ *
* @param detailMessage
* the detail message for the exception.
*/
diff --git a/luni/src/main/java/java/util/UUID.java b/luni/src/main/java/java/util/UUID.java
index 5f9a6b7..9c3434f 100644
--- a/luni/src/main/java/java/util/UUID.java
+++ b/luni/src/main/java/java/util/UUID.java
@@ -167,7 +167,7 @@
byte[] hash;
try {
- MessageDigest md = MessageDigest.getInstance("MD5");
+ MessageDigest md = MessageDigest.getInstance("MD5");
hash = md.digest(name);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
@@ -218,14 +218,14 @@
int i = 0;
for (; i < position.length && lastPosition > 0; i++) {
- position[i] = uuid.indexOf("-", startPosition);
+ position[i] = uuid.indexOf("-", startPosition);
lastPosition = position[i];
startPosition = position[i] + 1;
}
// should have and only can have four "-" in UUID
if (i != position.length || lastPosition != -1) {
- throw new IllegalArgumentException(Msg.getString("KA014") + uuid);
+ throw new IllegalArgumentException(Msg.getString("KA014") + uuid);
}
long m1 = Long.parseLong(uuid.substring(0, position[0]), 16);
diff --git a/luni/src/main/java/java/util/UnknownFormatConversionException.java b/luni/src/main/java/java/util/UnknownFormatConversionException.java
index efea9a5..cb98f91 100644
--- a/luni/src/main/java/java/util/UnknownFormatConversionException.java
+++ b/luni/src/main/java/java/util/UnknownFormatConversionException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
/**
* An {@code UnknownFormatConversionException} will be thrown if the format
* conversion is unknown.
- *
+ *
* @see java.lang.RuntimeException
*/
public class UnknownFormatConversionException extends IllegalFormatException {
@@ -31,8 +31,8 @@
/**
* Constructs an {@code UnknownFormatConversionException} with the unknown
* format conversion.
- *
- * @param s
+ *
+ * @param s
* the unknown format conversion.
*/
public UnknownFormatConversionException(String s) {
@@ -44,7 +44,7 @@
/**
* Returns the conversion associated with the exception.
- *
+ *
* @return the conversion associated with the exception.
*/
public String getConversion() {
@@ -53,7 +53,7 @@
/**
* Returns the message of the exception.
- *
+ *
* @return the message of the exception.
*/
@Override
diff --git a/luni/src/main/java/java/util/UnknownFormatFlagsException.java b/luni/src/main/java/java/util/UnknownFormatFlagsException.java
index 43aac04..61ba7f4 100644
--- a/luni/src/main/java/java/util/UnknownFormatFlagsException.java
+++ b/luni/src/main/java/java/util/UnknownFormatFlagsException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
/**
* An {@code UnknownFormatFlagsException} will be thrown if there is
* an unknown flag.
- *
+ *
* @see java.lang.RuntimeException
*/
public class UnknownFormatFlagsException extends IllegalFormatException {
@@ -33,7 +33,7 @@
/**
* Constructs a new {@code UnknownFormatFlagsException} with the specified
* flags.
- *
+ *
* @param f
* the specified flags.
*/
@@ -46,7 +46,7 @@
/**
* Returns the flags associated with the exception.
- *
+ *
* @return the flags associated with the exception.
*/
public String getFlags() {
@@ -55,12 +55,12 @@
/**
* Returns the message associated with the exception.
- *
+ *
* @return the message associated with the exception.
*/
@Override
public String getMessage() {
// K034a=The flags are {0}
- return Msg.getString("K034a", flags);
+ return Msg.getString("K034a", flags);
}
}
diff --git a/luni/src/main/java/java/util/Vector.java b/luni/src/main/java/java/util/Vector.java
index a0d2359..868aff7 100644
--- a/luni/src/main/java/java/util/Vector.java
+++ b/luni/src/main/java/java/util/Vector.java
@@ -25,15 +25,15 @@
/**
* Vector is an implementation of {@link List}, backed by an array and synchronized.
* All optional operations including adding, removing, and replacing elements are supported.
- *
+ *
* <p>All elements are permitted, including null.
- *
+ *
* <p>This class is equivalent to {@link ArrayList} with synchronized operations. This has a
* performance cost, and the synchronization is not necessarily meaningful to your application:
* synchronizing each call to {@code get}, for example, is not equivalent to synchronizing on the
* list and iterating over it (which is probably what you intended). If you do need very highly
* concurrent access, you should also consider {@link java.util.concurrent.CopyOnWriteArrayList}.
- *
+ *
* @param <E> The element type of this list.
*/
public class Vector<E> extends AbstractList<E> implements List<E>,
@@ -1004,21 +1004,21 @@
@Override
public synchronized String toString() {
if (elementCount == 0) {
- return "[]";
+ return "[]";
}
int length = elementCount - 1;
StringBuilder buffer = new StringBuilder(elementCount * 16);
buffer.append('[');
for (int i = 0; i < length; i++) {
if (elementData[i] == this) {
- buffer.append("(this Collection)");
+ buffer.append("(this Collection)");
} else {
buffer.append(elementData[i]);
}
- buffer.append(", ");
+ buffer.append(", ");
}
if (elementData[length] == this) {
- buffer.append("(this Collection)");
+ buffer.append("(this Collection)");
} else {
buffer.append(elementData[length]);
}
diff --git a/luni/src/main/java/java/util/WeakHashMap.java b/luni/src/main/java/java/util/WeakHashMap.java
index 6aa4049..48da8cb 100644
--- a/luni/src/main/java/java/util/WeakHashMap.java
+++ b/luni/src/main/java/java/util/WeakHashMap.java
@@ -108,7 +108,7 @@
@Override
public String toString() {
- return super.get() + "=" + value;
+ return super.get() + "=" + value;
}
}
diff --git a/luni/src/main/java/java/util/jar/Attributes.java b/luni/src/main/java/java/util/jar/Attributes.java
index ec146c7..6970fb9 100644
--- a/luni/src/main/java/java/util/jar/Attributes.java
+++ b/luni/src/main/java/java/util/jar/Attributes.java
@@ -59,94 +59,94 @@
/**
* The class path (a main attribute).
*/
- public static final Name CLASS_PATH = new Name("Class-Path");
+ public static final Name CLASS_PATH = new Name("Class-Path");
/**
* The version of the manifest file (a main attribute).
*/
- public static final Name MANIFEST_VERSION = new Name("Manifest-Version");
+ public static final Name MANIFEST_VERSION = new Name("Manifest-Version");
/**
* The main class's name (for stand-alone applications).
*/
- public static final Name MAIN_CLASS = new Name("Main-Class");
+ public static final Name MAIN_CLASS = new Name("Main-Class");
/**
* Defines the signature version of the JAR file.
*/
public static final Name SIGNATURE_VERSION = new Name(
- "Signature-Version");
+ "Signature-Version");
/**
* The {@code Content-Type} manifest attribute.
*/
- public static final Name CONTENT_TYPE = new Name("Content-Type");
+ public static final Name CONTENT_TYPE = new Name("Content-Type");
/**
* The {@code Sealed} manifest attribute which may have the value
* {@code true} for sealed archives.
*/
- public static final Name SEALED = new Name("Sealed");
+ public static final Name SEALED = new Name("Sealed");
/**
* The {@code Implementation-Title} attribute whose value is a string
* that defines the title of the extension implementation.
*/
public static final Name IMPLEMENTATION_TITLE = new Name(
- "Implementation-Title");
+ "Implementation-Title");
/**
* The {@code Implementation-Version} attribute defining the version of
* the extension implementation.
*/
public static final Name IMPLEMENTATION_VERSION = new Name(
- "Implementation-Version");
+ "Implementation-Version");
/**
* The {@code Implementation-Vendor} attribute defining the organization
* that maintains the extension implementation.
*/
public static final Name IMPLEMENTATION_VENDOR = new Name(
- "Implementation-Vendor");
+ "Implementation-Vendor");
/**
* The {@code Specification-Title} attribute defining the title of the
* extension specification.
*/
public static final Name SPECIFICATION_TITLE = new Name(
- "Specification-Title");
+ "Specification-Title");
/**
* The {@code Specification-Version} attribute defining the version of
* the extension specification.
*/
public static final Name SPECIFICATION_VERSION = new Name(
- "Specification-Version");
+ "Specification-Version");
/**
* The {@code Specification-Vendor} attribute defining the organization
* that maintains the extension specification.
*/
public static final Name SPECIFICATION_VENDOR = new Name(
- "Specification-Vendor");
+ "Specification-Vendor");
/**
* The {@code Extension-List} attribute defining the extensions that are
* needed by the applet.
*/
- public static final Name EXTENSION_LIST = new Name("Extension-List");
+ public static final Name EXTENSION_LIST = new Name("Extension-List");
/**
* The {@code Extension-Name} attribute which defines the unique name of
* the extension.
*/
- public static final Name EXTENSION_NAME = new Name("Extension-Name");
+ public static final Name EXTENSION_NAME = new Name("Extension-Name");
/**
* The {@code Extension-Installation} attribute.
*/
public static final Name EXTENSION_INSTALLATION = new Name(
- "Extension-Installation");
+ "Extension-Installation");
/**
* The {@code Implementation-Vendor-Id} attribute specifies the vendor
@@ -154,7 +154,7 @@
* implementation from a specific vendor.
*/
public static final Name IMPLEMENTATION_VENDOR_ID = new Name(
- "Implementation-Vendor-Id");
+ "Implementation-Vendor-Id");
/**
* The {@code Implementation-URL} attribute specifying a URL that can be
@@ -162,9 +162,9 @@
* required version is not already installed.
*/
public static final Name IMPLEMENTATION_URL = new Name(
- "Implementation-URL");
+ "Implementation-URL");
- static final Name NAME = new Name("Name");
+ static final Name NAME = new Name("Name");
/**
* A String which must satisfy the following EBNF grammar to specify an
@@ -218,7 +218,7 @@
@Override
public String toString() {
try {
- return new String(name, "ISO-8859-1");
+ return new String(name, "ISO-8859-1");
} catch (UnsupportedEncodingException iee) {
throw new InternalError(iee.getLocalizedMessage());
}
diff --git a/luni/src/main/java/java/util/jar/InitManifest.java b/luni/src/main/java/java/util/jar/InitManifest.java
index e31580d..306930b 100644
--- a/luni/src/main/java/java/util/jar/InitManifest.java
+++ b/luni/src/main/java/java/util/jar/InitManifest.java
@@ -48,7 +48,7 @@
// check a version attribute
if (!readHeader() || (ver != null && !name.equals(ver))) {
throw new IOException(Messages.getString(
- "archive.2D", ver));
+ "archive.2D", ver));
}
main.put(name, value);
@@ -63,7 +63,7 @@
int mark = pos;
while (readHeader()) {
if (!Attributes.Name.NAME.equals(name)) {
- throw new IOException(Messages.getString("archive.23"));
+ throw new IOException(Messages.getString("archive.23"));
}
String entryNameValue = value;
@@ -84,7 +84,7 @@
// this: either use a list of chunks, or decide on used
// signature algorithm in advance and reread the chunks while
// updating the signature; for now a defensive error is thrown
- throw new IOException(Messages.getString("archive.34"));
+ throw new IOException(Messages.getString("archive.34"));
}
chunks.put(entryNameValue, new Manifest.Chunk(mark, pos));
mark = pos;
@@ -138,7 +138,7 @@
if (buf[pos++] != ' ') {
throw new IOException(Messages.getString(
- "archive.30", nameBuffer));
+ "archive.30", nameBuffer));
}
name = new Attributes.Name(nameBuffer);
@@ -147,12 +147,12 @@
if (!((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_'
|| b == '-' || (b >= '0' && b <= '9'))) {
- throw new IOException(Messages.getString("archive.30", b));
+ throw new IOException(Messages.getString("archive.30", b));
}
}
if (i > 0) {
throw new IOException(Messages.getString(
- "archive.30", wrap(mark, buf.length)));
+ "archive.30", wrap(mark, buf.length)));
}
}
@@ -170,7 +170,7 @@
switch (next) {
case 0:
- throw new IOException(Messages.getString("archive.2F"));
+ throw new IOException(Messages.getString("archive.2F"));
case '\n':
if (lastCr) {
lastCr = false;
diff --git a/luni/src/main/java/java/util/jar/JarEntry.java b/luni/src/main/java/java/util/jar/JarEntry.java
index ef285f8..55a341f 100644
--- a/luni/src/main/java/java/util/jar/JarEntry.java
+++ b/luni/src/main/java/java/util/jar/JarEntry.java
@@ -197,7 +197,7 @@
CertPath certPath = null;
if (!isFactoryChecked) {
try {
- factory = CertificateFactory.getInstance("X.509");
+ factory = CertificateFactory.getInstance("X.509");
} catch (CertificateException ex) {
// do nothing
} finally {
diff --git a/luni/src/main/java/java/util/jar/JarFile.java b/luni/src/main/java/java/util/jar/JarFile.java
index 5a97282..a7ccafb 100644
--- a/luni/src/main/java/java/util/jar/JarFile.java
+++ b/luni/src/main/java/java/util/jar/JarFile.java
@@ -43,10 +43,10 @@
/**
* The MANIFEST file name.
*/
- public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
+ public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
// The directory containing the manifest.
- static final String META_DIR = "META-INF/";
+ static final String META_DIR = "META-INF/";
// The manifest after it has been read from the JAR.
private Manifest manifest;
@@ -296,7 +296,7 @@
public Manifest getManifest() throws IOException {
if (closed) {
// archive.35=JarFile has been closed
- throw new IllegalStateException(Messages.getString("archive.35"));
+ throw new IllegalStateException(Messages.getString("archive.35"));
}
if (manifest != null) {
return manifest;
@@ -325,7 +325,7 @@
* file's META-INF/ directory and picks out the MANIFEST.MF file and
* verifier signature files if they exist. Any signature files found are
* registered with the verifier.
- *
+ *
* @throws IOException
* if there is a problem reading the jar file entries.
*/
diff --git a/luni/src/main/java/java/util/jar/JarInputStream.java b/luni/src/main/java/java/util/jar/JarInputStream.java
index c5de681..5534eac 100644
--- a/luni/src/main/java/java/util/jar/JarInputStream.java
+++ b/luni/src/main/java/java/util/jar/JarInputStream.java
@@ -63,7 +63,7 @@
throws IOException {
super(stream);
if (verify) {
- verifier = new JarVerifier("JarInputStream");
+ verifier = new JarVerifier("JarInputStream");
}
if ((mEntry = getNextJarEntry()) == null) {
return;
@@ -89,7 +89,7 @@
} else {
Attributes temp = new Attributes(3);
- temp.map.put("hidden", null);
+ temp.map.put("hidden", null);
mEntry.setAttributes(temp);
/*
* if not from the first entry, we will not get enough
diff --git a/luni/src/main/java/java/util/jar/JarVerifier.java b/luni/src/main/java/java/util/jar/JarVerifier.java
index ec45d6e..9117293 100644
--- a/luni/src/main/java/java/util/jar/JarVerifier.java
+++ b/luni/src/main/java/java/util/jar/JarVerifier.java
@@ -127,7 +127,7 @@
byte[] d = digest.digest();
if (!MessageDigest.isEqual(d, Base64.decode(hash))) {
throw new SecurityException(Messages.getString(
- "archive.32", new Object[] {
+ "archive.32", new Object[] {
JarFile.MANIFEST_NAME, name, jarName }));
}
verifiedEntries.put(name, certificates);
@@ -197,20 +197,20 @@
Certificate[] certificatesArray = new Certificate[certs.size()];
certs.toArray(certificatesArray);
- String algorithms = attributes.getValue("Digest-Algorithms");
+ String algorithms = attributes.getValue("Digest-Algorithms");
if (algorithms == null) {
- algorithms = "SHA SHA1";
+ algorithms = "SHA SHA1";
}
StringTokenizer tokens = new StringTokenizer(algorithms);
while (tokens.hasMoreTokens()) {
String algorithm = tokens.nextToken();
- String hash = attributes.getValue(algorithm + "-Digest");
+ String hash = attributes.getValue(algorithm + "-Digest");
if (hash == null) {
continue;
}
byte[] hashBytes;
try {
- hashBytes = hash.getBytes("ISO-8859-1");
+ hashBytes = hash.getBytes("ISO-8859-1");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.toString());
}
@@ -268,7 +268,7 @@
Iterator<String> it = metaEntries.keySet().iterator();
while (it.hasNext()) {
String key = it.next();
- if (key.endsWith(".DSA") || key.endsWith(".RSA")) {
+ if (key.endsWith(".DSA") || key.endsWith(".RSA")) {
verifyCertificate(key);
// Check for recursive class load
if (metaEntries == null) {
@@ -286,7 +286,7 @@
private void verifyCertificate(String certFile) {
// Found Digital Sig, .SF should already have been read
String signatureFile = certFile.substring(0, certFile.lastIndexOf('.'))
- + ".SF";
+ + ".SF";
byte[] sfBytes = metaEntries.get(signatureFile);
if (sfBytes == null) {
return;
@@ -318,7 +318,7 @@
} catch (GeneralSecurityException e) {
/* [MSG "archive.31", "{0} failed verification of {1}"] */
throw new SecurityException(Messages.getString(
- "archive.31", jarName, signatureFile));
+ "archive.31", jarName, signatureFile));
}
// Verify manifest hash in .sf file
@@ -332,9 +332,9 @@
}
boolean createdBySigntool = false;
- String createdBy = attributes.getValue("Created-By");
+ String createdBy = attributes.getValue("Created-By");
if (createdBy != null) {
- createdBySigntool = createdBy.indexOf("signtool") != -1;
+ createdBySigntool = createdBy.indexOf("signtool") != -1;
}
// Use .SF to verify the mainAttributes of the manifest
@@ -342,18 +342,18 @@
// file, such as those created before java 1.5, then we ignore
// such verification.
if (mainAttributesEnd > 0 && !createdBySigntool) {
- String digestAttribute = "-Digest-Manifest-Main-Attributes";
+ String digestAttribute = "-Digest-Manifest-Main-Attributes";
if (!verify(attributes, digestAttribute, manifest, 0,
mainAttributesEnd, false, true)) {
/* [MSG "archive.31", "{0} failed verification of {1}"] */
throw new SecurityException(Messages.getString(
- "archive.31", jarName, signatureFile));
+ "archive.31", jarName, signatureFile));
}
}
// Use .SF to verify the whole manifest.
- String digestAttribute = createdBySigntool ? "-Digest"
- : "-Digest-Manifest";
+ String digestAttribute = createdBySigntool ? "-Digest"
+ : "-Digest-Manifest";
if (!verify(attributes, digestAttribute, manifest, 0, manifest.length,
false, false)) {
Iterator<Map.Entry<String, Attributes>> it = entries.entrySet()
@@ -364,10 +364,10 @@
if (chunk == null) {
return;
}
- if (!verify(entry.getValue(), "-Digest", manifest,
+ if (!verify(entry.getValue(), "-Digest", manifest,
chunk.start, chunk.end, createdBySigntool, false)) {
throw new SecurityException(Messages.getString(
- "archive.32",
+ "archive.32",
new Object[] { signatureFile, entry.getKey(),
jarName }));
}
@@ -400,9 +400,9 @@
private boolean verify(Attributes attributes, String entry, byte[] data,
int start, int end, boolean ignoreSecondEndline, boolean ignorable) {
- String algorithms = attributes.getValue("Digest-Algorithms");
+ String algorithms = attributes.getValue("Digest-Algorithms");
if (algorithms == null) {
- algorithms = "SHA SHA1";
+ algorithms = "SHA SHA1";
}
StringTokenizer tokens = new StringTokenizer(algorithms);
while (tokens.hasMoreTokens()) {
@@ -429,7 +429,7 @@
byte[] b = md.digest();
byte[] hashBytes;
try {
- hashBytes = hash.getBytes("ISO-8859-1");
+ hashBytes = hash.getBytes("ISO-8859-1");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.toString());
}
diff --git a/luni/src/main/java/java/util/jar/Manifest.java b/luni/src/main/java/java/util/jar/Manifest.java
index 108525c..6dd81da 100644
--- a/luni/src/main/java/java/util/jar/Manifest.java
+++ b/luni/src/main/java/java/util/jar/Manifest.java
@@ -45,7 +45,7 @@
private static final byte[] VALUE_SEPARATOR = new byte[] { ':', ' ' };
private static final Attributes.Name NAME_ATTRIBUTE = new Attributes.Name(
- "Name");
+ "Name");
private Attributes mainAttributes = new Attributes();
@@ -257,7 +257,7 @@
// Does it look like a manifest?
if (!containsLine(buffer, count)) {
// archive.2E=Manifest is too long
- throw new IOException(Messages.getString("archive.2E"));
+ throw new IOException(Messages.getString("archive.2E"));
}
// Requires additional reads
@@ -382,7 +382,7 @@
byte[] out = name.getBytes();
if (out.length > LINE_LENGTH_LIMIT) {
throw new IOException(Messages.getString(
- "archive.33", name, Integer.valueOf(LINE_LENGTH_LIMIT)));
+ "archive.33", name, Integer.valueOf(LINE_LENGTH_LIMIT)));
}
os.write(out);
diff --git a/luni/src/main/java/java/util/jar/Pack200.java b/luni/src/main/java/java/util/jar/Pack200.java
index 8840185..881f53c 100644
--- a/luni/src/main/java/java/util/jar/Pack200.java
+++ b/luni/src/main/java/java/util/jar/Pack200.java
@@ -30,9 +30,9 @@
*/
public abstract class Pack200 {
- private static final String SYSTEM_PROPERTY_PACKER = "java.util.jar.Pack200.Packer";
+ private static final String SYSTEM_PROPERTY_PACKER = "java.util.jar.Pack200.Packer";
- private static final String SYSTEM_PROPERTY_UNPACKER = "java.util.jar.Pack200.Unpacker";
+ private static final String SYSTEM_PROPERTY_UNPACKER = "java.util.jar.Pack200.Unpacker";
/**
* Prevent this class from being instantiated.
@@ -57,7 +57,7 @@
public Object run() {
String className = System
.getProperty(SYSTEM_PROPERTY_PACKER,
- "org.apache.harmony.pack200.Pack200PackerAdapter");
+ "org.apache.harmony.pack200.Pack200PackerAdapter");
try {
// TODO Not sure if this will cause problems with
// loading the packer
@@ -107,12 +107,12 @@
/**
* the format of a class attribute name.
*/
- static final String CLASS_ATTRIBUTE_PFX = "pack.class.attribute.";
+ static final String CLASS_ATTRIBUTE_PFX = "pack.class.attribute.";
/**
* the format of a code attribute name.
*/
- static final String CODE_ATTRIBUTE_PFX = "pack.code.attribute.";
+ static final String CODE_ATTRIBUTE_PFX = "pack.code.attribute.";
/**
* the deflation hint to set in the output archive.
diff --git a/luni/src/main/java/java/util/logging/ConsoleHandler.java b/luni/src/main/java/java/util/logging/ConsoleHandler.java
index ef365ca..98b7b24 100644
--- a/luni/src/main/java/java/util/logging/ConsoleHandler.java
+++ b/luni/src/main/java/java/util/logging/ConsoleHandler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/ErrorManager.java b/luni/src/main/java/java/util/logging/ErrorManager.java
index 6570fa7..d0516ea 100644
--- a/luni/src/main/java/java/util/logging/ErrorManager.java
+++ b/luni/src/main/java/java/util/logging/ErrorManager.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -79,7 +79,7 @@
* implementation will write out the message to {@link System#err} on the
* first call and all subsequent calls are ignored. A subclass of this class
* should override this method.
- *
+ *
* @param message
* the error message, which may be {@code null}.
* @param exception
diff --git a/luni/src/main/java/java/util/logging/FileHandler.java b/luni/src/main/java/java/util/logging/FileHandler.java
index 355fab1..bc12b8d 100644
--- a/luni/src/main/java/java/util/logging/FileHandler.java
+++ b/luni/src/main/java/java/util/logging/FileHandler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -95,7 +95,7 @@
*/
public class FileHandler extends StreamHandler {
- private static final String LCK_EXT = ".lck";
+ private static final String LCK_EXT = ".lck";
private static final int DEFAULT_COUNT = 1;
@@ -103,7 +103,7 @@
private static final boolean DEFAULT_APPEND = false;
- private static final String DEFAULT_PATTERN = "%h/java%u.log";
+ private static final String DEFAULT_PATTERN = "%h/java%u.log";
// maintain all file locks hold by this process
private static final Hashtable<String, FileLock> allLocks = new Hashtable<String, FileLock>();
@@ -273,11 +273,11 @@
// TODO privilege code?
- String tempPath = System.getProperty("java.io.tmpdir");
+ String tempPath = System.getProperty("java.io.tmpdir");
boolean tempPathHasSepEnd = (tempPath == null ? false : tempPath
.endsWith(File.separator));
- String homePath = System.getProperty("user.home");
+ String homePath = System.getProperty("user.home");
boolean homePathHasSepEnd = (homePath == null ? false : homePath
.endsWith(File.separator));
@@ -327,11 +327,11 @@
sb.append(value, cur, value.length - cur);
if (!hasGeneration && count > 1) {
- sb.append(".").append(gen);
+ sb.append(".").append(gen);
}
if (!hasUniqueID && uniqueID > 0) {
- sb.append(".").append(uniqueID);
+ sb.append(".").append(uniqueID);
}
return sb.toString();
@@ -345,9 +345,9 @@
return defaultValue;
}
boolean result = defaultValue;
- if ("true".equalsIgnoreCase(property)) {
+ if ("true".equalsIgnoreCase(property)) {
result = true;
- } else if ("false".equalsIgnoreCase(property)) {
+ } else if ("false".equalsIgnoreCase(property)) {
result = false;
}
return result;
diff --git a/luni/src/main/java/java/util/logging/Filter.java b/luni/src/main/java/java/util/logging/Filter.java
index f5dbd9f..c296ddb 100644
--- a/luni/src/main/java/java/util/logging/Filter.java
+++ b/luni/src/main/java/java/util/logging/Filter.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
/**
* Checks {@code record} to determine if it should be logged.
- *
+ *
* @param record
* the {@link LogRecord} to be checked.
* @return {@code true} if the supplied log record needs to be logged,
diff --git a/luni/src/main/java/java/util/logging/Formatter.java b/luni/src/main/java/java/util/logging/Formatter.java
index 60a69ca..2ad4b4f 100644
--- a/luni/src/main/java/java/util/logging/Formatter.java
+++ b/luni/src/main/java/java/util/logging/Formatter.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -78,7 +78,7 @@
* if the message contains "{0", use java.text.MessageFormat to
* format the string
*/
- if (pattern.indexOf("{0") >= 0 && null != params
+ if (pattern.indexOf("{0") >= 0 && null != params
&& params.length > 0) {
try {
pattern = MessageFormat.format(pattern, params);
@@ -100,7 +100,7 @@
* implementation.
*/
public String getHead(Handler h) {
- return "";
+ return "";
}
/**
@@ -113,6 +113,6 @@
* implementation.
*/
public String getTail(Handler h) {
- return "";
+ return "";
}
}
diff --git a/luni/src/main/java/java/util/logging/Handler.java b/luni/src/main/java/java/util/logging/Handler.java
index 8e0424a..5a3937d 100644
--- a/luni/src/main/java/java/util/logging/Handler.java
+++ b/luni/src/main/java/java/util/logging/Handler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -109,12 +109,12 @@
LogManager manager = LogManager.getLogManager();
// set filter
- final String filterName = manager.getProperty(prefix + ".filter");
+ final String filterName = manager.getProperty(prefix + ".filter");
if (null != filterName) {
try {
filter = (Filter) getCustomizeInstance(filterName);
} catch (Exception e1) {
- printInvalidPropMessage("filter", filterName, e1);
+ printInvalidPropMessage("filter", filterName, e1);
filter = (Filter) getDefaultInstance(defaultFilter);
}
} else {
@@ -122,12 +122,12 @@
}
// set level
- String levelName = manager.getProperty(prefix + ".level");
+ String levelName = manager.getProperty(prefix + ".level");
if (null != levelName) {
try {
level = Level.parse(levelName);
} catch (Exception e) {
- printInvalidPropMessage("level", levelName, e);
+ printInvalidPropMessage("level", levelName, e);
level = Level.parse(defaultLevel);
}
} else {
@@ -135,12 +135,12 @@
}
// set formatter
- final String formatterName = manager.getProperty(prefix + ".formatter");
+ final String formatterName = manager.getProperty(prefix + ".formatter");
if (null != formatterName) {
try {
formatter = (Formatter) getCustomizeInstance(formatterName);
} catch (Exception e) {
- printInvalidPropMessage("formatter", formatterName, e);
+ printInvalidPropMessage("formatter", formatterName, e);
formatter = (Formatter) getDefaultInstance(defaultFormatter);
}
} else {
@@ -148,11 +148,11 @@
}
// set encoding
- final String encodingName = manager.getProperty(prefix + ".encoding");
+ final String encodingName = manager.getProperty(prefix + ".encoding");
try {
internalSetEncoding(encodingName);
} catch (UnsupportedEncodingException e) {
- printInvalidPropMessage("encoding", encodingName, e);
+ printInvalidPropMessage("encoding", encodingName, e);
}
}
diff --git a/luni/src/main/java/java/util/logging/Level.java b/luni/src/main/java/java/util/logging/Level.java
index fb55670..b84bbbd 100644
--- a/luni/src/main/java/java/util/logging/Level.java
+++ b/luni/src/main/java/java/util/logging/Level.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,47 +47,47 @@
/**
* The OFF level provides no logging messages.
*/
- public static final Level OFF = new Level("OFF", Integer.MAX_VALUE);
+ public static final Level OFF = new Level("OFF", Integer.MAX_VALUE);
/**
* The SEVERE level provides severe failure messages.
*/
- public static final Level SEVERE = new Level("SEVERE", 1000);
+ public static final Level SEVERE = new Level("SEVERE", 1000);
/**
* The WARNING level provides warnings.
*/
- public static final Level WARNING = new Level("WARNING", 900);
+ public static final Level WARNING = new Level("WARNING", 900);
/**
* The INFO level provides informative messages.
*/
- public static final Level INFO = new Level("INFO", 800);
+ public static final Level INFO = new Level("INFO", 800);
/**
* The CONFIG level provides static configuration messages.
*/
- public static final Level CONFIG = new Level("CONFIG", 700);
+ public static final Level CONFIG = new Level("CONFIG", 700);
/**
* The FINE level provides tracing messages.
*/
- public static final Level FINE = new Level("FINE", 500);
+ public static final Level FINE = new Level("FINE", 500);
/**
* The FINER level provides more detailed tracing messages.
*/
- public static final Level FINER = new Level("FINER", 400);
+ public static final Level FINER = new Level("FINER", 400);
/**
* The FINEST level provides highly detailed tracing messages.
*/
- public static final Level FINEST = new Level("FINEST", 300);
+ public static final Level FINEST = new Level("FINEST", 300);
/**
* The ALL level provides all logging messages.
*/
- public static final Level ALL = new Level("ALL", Integer.MIN_VALUE);
+ public static final Level ALL = new Level("ALL", Integer.MIN_VALUE);
/**
* Parses a level name into a {@code Level} object.
diff --git a/luni/src/main/java/java/util/logging/LogManager.java b/luni/src/main/java/java/util/logging/LogManager.java
index c07f6bf..d4c96fb 100644
--- a/luni/src/main/java/java/util/logging/LogManager.java
+++ b/luni/src/main/java/java/util/logging/LogManager.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/LogRecord.java b/luni/src/main/java/java/util/logging/LogRecord.java
index d4466bf..0a9e2fb 100644
--- a/luni/src/main/java/java/util/logging/LogRecord.java
+++ b/luni/src/main/java/java/util/logging/LogRecord.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/Logger.java b/luni/src/main/java/java/util/logging/Logger.java
index 4de2614..707c8f6 100644
--- a/luni/src/main/java/java/util/logging/Logger.java
+++ b/luni/src/main/java/java/util/logging/Logger.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -748,7 +748,7 @@
return;
}
- LogRecord record = new LogRecord(Level.FINER, "ENTRY");
+ LogRecord record = new LogRecord(Level.FINER, "ENTRY");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
@@ -774,7 +774,7 @@
return;
}
- LogRecord record = new LogRecord(Level.FINER, "ENTRY" + " {0}");
+ LogRecord record = new LogRecord(Level.FINER, "ENTRY" + " {0}");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
@@ -835,7 +835,7 @@
return;
}
- LogRecord record = new LogRecord(Level.FINER, "RETURN");
+ LogRecord record = new LogRecord(Level.FINER, "RETURN");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
@@ -860,7 +860,7 @@
return;
}
- LogRecord record = new LogRecord(Level.FINER, "RETURN" + " {0}");
+ LogRecord record = new LogRecord(Level.FINER, "RETURN" + " {0}");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
@@ -888,7 +888,7 @@
return;
}
- LogRecord record = new LogRecord(Level.FINER, "THROW");
+ LogRecord record = new LogRecord(Level.FINER, "THROW");
record.setLoggerName(this.name);
record.setSourceClassName(sourceClass);
record.setSourceMethodName(sourceMethod);
diff --git a/luni/src/main/java/java/util/logging/LoggingMXBean.java b/luni/src/main/java/java/util/logging/LoggingMXBean.java
index 18cc4cc..f2e9554 100644
--- a/luni/src/main/java/java/util/logging/LoggingMXBean.java
+++ b/luni/src/main/java/java/util/logging/LoggingMXBean.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/LoggingPermission.java b/luni/src/main/java/java/util/logging/LoggingPermission.java
index 5ca9cc9..ec53956 100644
--- a/luni/src/main/java/java/util/logging/LoggingPermission.java
+++ b/luni/src/main/java/java/util/logging/LoggingPermission.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/MemoryHandler.java b/luni/src/main/java/java/util/logging/MemoryHandler.java
index c1b36c8..08c36c9 100644
--- a/luni/src/main/java/java/util/logging/MemoryHandler.java
+++ b/luni/src/main/java/java/util/logging/MemoryHandler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/SimpleFormatter.java b/luni/src/main/java/java/util/logging/SimpleFormatter.java
index 5544276..d93742c 100644
--- a/luni/src/main/java/java/util/logging/SimpleFormatter.java
+++ b/luni/src/main/java/java/util/logging/SimpleFormatter.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -45,15 +45,15 @@
@Override
public String format(LogRecord r) {
StringBuilder sb = new StringBuilder();
- sb.append(MessageFormat.format("{0, date} {0, time} ",
+ sb.append(MessageFormat.format("{0, date} {0, time} ",
new Object[] { new Date(r.getMillis()) }));
- sb.append(r.getSourceClassName()).append(" ");
+ sb.append(r.getSourceClassName()).append(" ");
sb.append(r.getSourceMethodName()).append(
LogManager.getSystemLineSeparator());
- sb.append(r.getLevel().getName()).append(": ");
+ sb.append(r.getLevel().getName()).append(": ");
sb.append(formatMessage(r)).append(LogManager.getSystemLineSeparator());
if (null != r.getThrown()) {
- sb.append("Throwable occurred: ");
+ sb.append("Throwable occurred: ");
Throwable t = r.getThrown();
PrintWriter pw = null;
try {
diff --git a/luni/src/main/java/java/util/logging/SocketHandler.java b/luni/src/main/java/java/util/logging/SocketHandler.java
index 15ebe53..f227bc2 100644
--- a/luni/src/main/java/java/util/logging/SocketHandler.java
+++ b/luni/src/main/java/java/util/logging/SocketHandler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -54,10 +54,10 @@
public class SocketHandler extends StreamHandler {
// default level
- private static final String DEFAULT_LEVEL = "ALL";
+ private static final String DEFAULT_LEVEL = "ALL";
// default formatter
- private static final String DEFAULT_FORMATTER = "java.util.logging.XMLFormatter";
+ private static final String DEFAULT_FORMATTER = "java.util.logging.XMLFormatter";
// the socket connection
private Socket socket;
@@ -78,9 +78,9 @@
public SocketHandler() throws IOException {
super(DEFAULT_LEVEL, null, DEFAULT_FORMATTER, null);
initSocket(LogManager.getLogManager().getProperty(
- "java.util.logging.SocketHandler.host"), LogManager
+ "java.util.logging.SocketHandler.host"), LogManager
.getLogManager().getProperty(
- "java.util.logging.SocketHandler.port"));
+ "java.util.logging.SocketHandler.port"));
}
/**
diff --git a/luni/src/main/java/java/util/logging/StreamHandler.java b/luni/src/main/java/java/util/logging/StreamHandler.java
index 2a67b98..eec3e38 100644
--- a/luni/src/main/java/java/util/logging/StreamHandler.java
+++ b/luni/src/main/java/java/util/logging/StreamHandler.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/logging/XMLFormatter.java b/luni/src/main/java/java/util/logging/XMLFormatter.java
index 9b97b8a..b83eeba 100644
--- a/luni/src/main/java/java/util/logging/XMLFormatter.java
+++ b/luni/src/main/java/java/util/logging/XMLFormatter.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
private static final String lineSeperator = LogManager
.getSystemLineSeparator();
- private static final String indent = " ";
+ private static final String indent = " ";
/**
* Constructs a new {@code XMLFormatter}.
@@ -199,7 +199,7 @@
*/
@Override
public String getTail(Handler h) {
- return "</log>";
+ return "</log>";
}
// use privilege code to get system property
diff --git a/luni/src/main/java/java/util/prefs/AbstractPreferences.java b/luni/src/main/java/java/util/prefs/AbstractPreferences.java
index 26faeea..c947fbb 100644
--- a/luni/src/main/java/java/util/prefs/AbstractPreferences.java
+++ b/luni/src/main/java/java/util/prefs/AbstractPreferences.java
@@ -78,7 +78,7 @@
}
});
}
-
+
/*
* -----------------------------------------------------------
* Instance fields (package-private)
@@ -99,7 +99,7 @@
* The object used to lock this node.
*/
protected final Object lock;
-
+
/**
* This field is true if this node is created while it doesn't exist in the
* backing store. This field's default value is false, and it is checked
@@ -168,7 +168,7 @@
*/
/**
* Returns an array of all cached child nodes.
- *
+ *
* @return the array of cached child nodes.
*/
protected final AbstractPreferences[] cachedChildren() {
@@ -181,7 +181,7 @@
* method will be a valid node name string (conforming to the node naming
* format) and will not correspond to a node that has been cached or
* removed.
- *
+ *
* @param name
* the name of the desired child node.
* @return the child node with the given name or {@code null} if it doesn't
@@ -231,7 +231,7 @@
* failure.
*/
protected abstract void flushSpi() throws BackingStoreException;
-
+
/**
* Returns the names of all of the child nodes of this node or an empty
* array if this node has no children. The names of cached children are not
@@ -255,7 +255,7 @@
* The new creation is not required to be persisted immediately until the
* flush method will be invoked.
* </p>
- *
+ *
* @param name
* the name of the child preference to be returned.
* @return the child preference node.
@@ -318,7 +318,7 @@
* Removes the preference with the specified key. The caller of this method
* should ensure that the given key is valid and that this node has not been
* removed.
- *
+ *
* @param key
* the key of the preference that is to be removed.
*/
@@ -329,7 +329,7 @@
* synchronize this node and should not include the descendant nodes. An
* implementation that wants to provide functionality to synchronize all
* nodes at once should override the method {@link #sync() sync()}.
- *
+ *
* @throws BackingStoreException
* if the backing store is unavailable or causes an operation
* failure.
@@ -442,7 +442,7 @@
if (svalue == null) {
return deflt;
}
- if (svalue.length() == 0) {
+ if (svalue.length() == 0) {
return new byte[0];
}
try {
@@ -729,7 +729,7 @@
cachedNode.put(childrenNames[i], child);
}
}
-
+
final Collection<AbstractPreferences> values = cachedNode.values();
final AbstractPreferences[] children = values.toArray(new AbstractPreferences[values.size()]);
for (AbstractPreferences child : children) {
@@ -838,7 +838,7 @@
EventDispatcher(String name){
super(name);
}
-
+
@Override
public void run() {
while (true) {
@@ -922,7 +922,7 @@
private static class NodeRemoveEvent extends NodeChangeEvent {
//The base class is NOT serializable, so this class isn't either.
private static final long serialVersionUID = 1L;
-
+
public NodeRemoveEvent(Preferences p, Preferences c) {
super(p, c);
}
diff --git a/luni/src/main/java/java/util/prefs/BackingStoreException.java b/luni/src/main/java/java/util/prefs/BackingStoreException.java
index 553d7ab..174e2d0 100644
--- a/luni/src/main/java/java/util/prefs/BackingStoreException.java
+++ b/luni/src/main/java/java/util/prefs/BackingStoreException.java
@@ -30,7 +30,7 @@
/**
* Constructs a new {@code BackingStoreException} instance with a detailed
* exception message.
- *
+ *
* @param s
* the detailed exception message.
*/
diff --git a/luni/src/main/java/java/util/prefs/FilePreferencesFactoryImpl.java b/luni/src/main/java/java/util/prefs/FilePreferencesFactoryImpl.java
index 69eaa01..a7b138a 100644
--- a/luni/src/main/java/java/util/prefs/FilePreferencesFactoryImpl.java
+++ b/luni/src/main/java/java/util/prefs/FilePreferencesFactoryImpl.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/prefs/FilePreferencesImpl.java b/luni/src/main/java/java/util/prefs/FilePreferencesImpl.java
index f394f7c..5c10dca 100644
--- a/luni/src/main/java/java/util/prefs/FilePreferencesImpl.java
+++ b/luni/src/main/java/java/util/prefs/FilePreferencesImpl.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,7 +58,7 @@
static {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
- USER_HOME = System.getProperty("user.home") + "/.java/.userPrefs";
+ USER_HOME = System.getProperty("user.home") + "/.java/.userPrefs";
SYSTEM_HOME = System.getProperty("java.home") + "/.systemPrefs";
return null;
}
diff --git a/luni/src/main/java/java/util/prefs/InvalidPreferencesFormatException.java b/luni/src/main/java/java/util/prefs/InvalidPreferencesFormatException.java
index ba8940b..15af082 100644
--- a/luni/src/main/java/java/util/prefs/InvalidPreferencesFormatException.java
+++ b/luni/src/main/java/java/util/prefs/InvalidPreferencesFormatException.java
@@ -29,7 +29,7 @@
/**
* Constructs a new {@code InvalidPreferencesFormatException} instance with
* a detailed exception message.
- *
+ *
* @param s
* the detailed exception message.
*/
@@ -40,7 +40,7 @@
/**
* Constructs a new {@code InvalidPreferencesFormatException} instance with
* a detailed exception message and a nested {@code Throwable}.
- *
+ *
* @param s
* the detailed exception message.
* @param t
diff --git a/luni/src/main/java/java/util/prefs/NodeChangeEvent.java b/luni/src/main/java/java/util/prefs/NodeChangeEvent.java
index 3e23f5a..efde846 100644
--- a/luni/src/main/java/java/util/prefs/NodeChangeEvent.java
+++ b/luni/src/main/java/java/util/prefs/NodeChangeEvent.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,10 +30,10 @@
* Please note that although the class is marked as {@code Serializable} by
* inheritance from {@code EventObject}, this type is not intended to be serialized
* so the serialization methods do nothing but throw a {@code NotSerializableException}.
- *
+ *
* @see java.util.prefs.Preferences
* @see java.util.prefs.NodeChangeListener
- *
+ *
* @since 1.4
*/
public class NodeChangeEvent extends EventObject implements Serializable {
@@ -45,7 +45,7 @@
/**
* Constructs a new {@code NodeChangeEvent} instance.
- *
+ *
* @param p
* the {@code Preferences} instance that fired this event; this object is
* considered as the event source.
@@ -60,7 +60,7 @@
/**
* Gets the {@code Preferences} instance that fired this event.
- *
+ *
* @return the {@code Preferences} instance that fired this event.
*/
public Preferences getParent() {
@@ -69,7 +69,7 @@
/**
* Gets the child {@code Preferences} node that was added or removed.
- *
+ *
* @return the added or removed child {@code Preferences} node.
*/
public Preferences getChild() {
diff --git a/luni/src/main/java/java/util/prefs/NodeChangeListener.java b/luni/src/main/java/java/util/prefs/NodeChangeListener.java
index 41da23e..5e22769 100644
--- a/luni/src/main/java/java/util/prefs/NodeChangeListener.java
+++ b/luni/src/main/java/java/util/prefs/NodeChangeListener.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,16 +23,16 @@
* This interface is used to handle preference node change events. The
* implementation of this interface can be installed by the {@code Preferences}
* instance.
- *
+ *
* @see Preferences
* @see NodeChangeEvent
- *
+ *
* @since 1.4
*/
public interface NodeChangeListener extends EventListener {
/**
* This method gets called whenever a child node is added to another node.
- *
+ *
* @param e
* the node change event.
*/
@@ -41,7 +41,7 @@
/**
* This method gets called whenever a child node is removed from another
* node.
- *
+ *
* @param e
* the node change event.
*/
diff --git a/luni/src/main/java/java/util/prefs/NodeSet.java b/luni/src/main/java/java/util/prefs/NodeSet.java
index 202b90b..9e3ab1d 100644
--- a/luni/src/main/java/java/util/prefs/NodeSet.java
+++ b/luni/src/main/java/java/util/prefs/NodeSet.java
@@ -9,7 +9,7 @@
class NodeSet implements NodeList {
ArrayList<Node> list = new ArrayList<Node>();
-
+
public NodeSet(Iterator<Node> nodes) {
while(nodes.hasNext()) {
list.add(nodes.next());
@@ -28,7 +28,7 @@
// TODO log this event?
return null;
}
-
+
return result;
}
}
diff --git a/luni/src/main/java/java/util/prefs/PreferenceChangeEvent.java b/luni/src/main/java/java/util/prefs/PreferenceChangeEvent.java
index d355f4e..89e5807 100644
--- a/luni/src/main/java/java/util/prefs/PreferenceChangeEvent.java
+++ b/luni/src/main/java/java/util/prefs/PreferenceChangeEvent.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,10 +30,10 @@
* Please note that although the class is marked as {@code Serializable} by
* inheritance from {@code EventObject}, this type is not intended to be serialized
* so the serialization methods do nothing but throw a {@code NotSerializableException}.
- *
+ *
* @see java.util.prefs.Preferences
* @see java.util.prefs.PreferenceChangeListener
- *
+ *
* @since 1.4
*/
public class PreferenceChangeEvent extends EventObject implements Serializable {
@@ -48,7 +48,7 @@
/**
* Construct a new {@code PreferenceChangeEvent} instance.
- *
+ *
* @param p
* the {@code Preferences} instance that fired this event; this object is
* considered as the event's source.
@@ -67,7 +67,7 @@
/**
* Gets the key of the changed preference.
- *
+ *
* @return the changed preference's key.
*/
public String getKey() {
@@ -77,7 +77,7 @@
/**
* Gets the new value of the changed preference or {@code null} if the
* preference has been removed.
- *
+ *
* @return the new value of the changed preference or {@code null} if the
* preference has been removed.
*/
@@ -87,7 +87,7 @@
/**
* Gets the {@code Preferences} instance that fired this event.
- *
+ *
* @return the {@code Preferences} instance that fired this event.
*/
public Preferences getNode() {
diff --git a/luni/src/main/java/java/util/prefs/PreferenceChangeListener.java b/luni/src/main/java/java/util/prefs/PreferenceChangeListener.java
index 97aeced..ee1af83 100644
--- a/luni/src/main/java/java/util/prefs/PreferenceChangeListener.java
+++ b/luni/src/main/java/java/util/prefs/PreferenceChangeListener.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,11 +22,11 @@
* This interface is used to handle preferences change events. The
* implementation of this interface can be installed by the {@code Preferences}
* instance.
- *
+ *
* @see Preferences
* @see PreferenceChangeEvent
*
- *
+ *
* @since 1.4
*/
public interface PreferenceChangeListener extends EventListener {
@@ -34,7 +34,7 @@
/**
* This method gets invoked whenever a preference is added, deleted or
* updated.
- *
+ *
* @param pce
* the event instance which describes the changed {@code Preferences}
* instance and the preference value.
diff --git a/luni/src/main/java/java/util/prefs/Preferences.java b/luni/src/main/java/java/util/prefs/Preferences.java
index 9a1d9e6..dc43bf5 100644
--- a/luni/src/main/java/java/util/prefs/Preferences.java
+++ b/luni/src/main/java/java/util/prefs/Preferences.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -82,7 +82,7 @@
* behavior guarantees are made.
*
* @see PreferencesFactory
- *
+ *
* @since 1.4
*/
public abstract class Preferences {
@@ -130,7 +130,7 @@
/**
* Gets the absolute path string of this preference node.
- *
+ *
* @return the preference node's absolute path string.
*/
public abstract String absolutePath();
@@ -138,7 +138,7 @@
/**
* Returns the names of all children of this node or an empty array if this
* node has no children.
- *
+ *
* @return the names of all children of this node.
* @throws BackingStoreException
* if backing store is unavailable or causes an operation
@@ -150,7 +150,7 @@
/**
* Removes all preferences of this node.
- *
+ *
* @throws BackingStoreException
* if backing store is unavailable or causes an operation
* failure.
@@ -165,15 +165,15 @@
* <p>
* This XML document uses the UTF-8 encoding and is written according to the
* DTD in its DOCTYPE declaration, which is the following:
- *
+ *
* <pre>
* <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre>
- *
+ *
* <i>Please note that (unlike the methods of this class that don't concern
* serialization), this call is not thread-safe.</i>
* </p>
- *
+ *
* @param ostream
* the output stream to write the XML-formatted data to.
* @throws IOException
@@ -192,15 +192,15 @@
* <p>
* This XML document uses the UTF-8 encoding and is written according to the
* DTD in its DOCTYPE declaration, which is the following:
- *
+ *
* <pre>
* <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre>
- *
+ *
* <i>Please note that (unlike the methods of this class that don't concern
* serialization), this call is not thread-safe.</i>
* </p>
- *
+ *
* @param ostream
* the output stream to write the XML-formatted data to.
* @throws IOException
@@ -221,7 +221,7 @@
* If this node has been removed, the invocation of this method only flushes
* this node, not its descendants.
* </p>
- *
+ *
* @throws BackingStoreException
* if the backing store is unavailable or causes an operation
* failure.
@@ -236,7 +236,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -263,7 +263,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -292,7 +292,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -320,7 +320,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -349,7 +349,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -378,7 +378,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -406,7 +406,7 @@
* case, if there is no value mapped to the given key, the stored default
* value is returned.
* </p>
- *
+ *
* @param key
* the preference key.
* @param deflt
@@ -427,15 +427,15 @@
* <p>
* This XML document uses the UTF-8 encoding and must be written according
* to the DTD in its DOCTYPE declaration, which must be the following:
- *
+ *
* <pre>
* <!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd">
* </pre>
- *
+ *
* <i>Please note that (unlike the methods of this class that don't concern
* serialization), this call is not thread-safe.</i>
* </p>
- *
+ *
* @param istream
* the input stream to read the data from.
* @throws InvalidPreferencesFormatException
@@ -457,7 +457,7 @@
/**
* Returns whether this is a user preference node.
- *
+ *
* @return {@code true}, if this is a user preference node, {@code false} if
* this is a system preference node.
*/
@@ -466,7 +466,7 @@
/**
* Returns all preference keys stored in this node or an empty array if no
* key was found.
- *
+ *
* @return the list of all preference keys of this node.
* @throws BackingStoreException
* if the backing store is unavailable or causes an operation
@@ -478,7 +478,7 @@
/**
* Returns the name of this node.
- *
+ *
* @return the name of this node.
*/
public abstract String name();
@@ -491,7 +491,7 @@
* The path is treated as relative to this node if it doesn't start with a
* slash, otherwise it will be treated as an absolute path.
* </p>
- *
+ *
* @param path
* the path name of the requested preference node.
* @return the requested preference node.
@@ -513,7 +513,7 @@
* node will throw an {@code IllegalStateException} unless the given path is
* an empty string, which will return {@code false}.
* </p>
- *
+ *
* @param path
* the path name of the preference node to query.
* @return {@code true}, if the queried preference node exists, {@code false}
@@ -534,7 +534,7 @@
/**
* Returns the parent preference node of this node or {@code null} if this
* node is the root node.
- *
+ *
* @return the parent preference node of this node.
* @throws IllegalStateException
* if this node has been removed.
@@ -544,7 +544,7 @@
/**
* Adds a new preference to this node using the given key and value or
* updates the value if a preference with the given key already exists.
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -564,7 +564,7 @@
* Adds a new preference with a {@code boolean} value to this node using the
* given key and value or updates the value if a preference with the given
* key already exists.
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -588,7 +588,7 @@
* given byte array. The Base64 encoding is as defined in <a
* href="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</a>, section 6.8.
* </p>
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -612,7 +612,7 @@
* The value is stored in its string form, which is the result of invoking
* {@link Double#toString(double) Double.toString(double)}.
* </p>
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -635,7 +635,7 @@
* The value is stored in its string form, which is the result of invoking
* {@link Float#toString(float) Float.toString(float)}.
* </p>
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -658,7 +658,7 @@
* The value is stored in its string form, which is the result of invoking
* {@link Integer#toString(int) Integer.toString(int)}.
* </p>
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -681,7 +681,7 @@
* The value is stored in its string form, which is the result of invoking
* {@link Long#toString(long) Long.toString(long)}.
* </p>
- *
+ *
* @param key
* the preference key to be added or updated.
* @param value
@@ -698,7 +698,7 @@
/**
* Removes the preference mapped to the given key from this node.
- *
+ *
* @param key
* the key of the preference to be removed.
* @throws NullPointerException
@@ -711,7 +711,7 @@
/**
* Removes this preference node with all its descendants. The removal won't
* necessarily be persisted until the method {@code flush()} is invoked.
- *
+ *
* @throws BackingStoreException
* if the backing store is unavailable or causes an operation
* failure.
@@ -726,7 +726,7 @@
* Registers a {@code NodeChangeListener} instance for this node, which will
* handle {@code NodeChangeEvent}s. {@code NodeChangeEvent}s will be fired
* when a child node has been added to or removed from this node.
- *
+ *
* @param ncl
* the listener to be registered.
* @throws NullPointerException
@@ -753,7 +753,7 @@
/**
* Removes the given {@code NodeChangeListener} instance from this node.
- *
+ *
* @param ncl
* the listener to be removed.
* @throws IllegalArgumentException
@@ -766,7 +766,7 @@
/**
* Removes the given {@code PreferenceChangeListener} instance from this
* node.
- *
+ *
* @param pcl
* the listener to be removed.
* @throws IllegalArgumentException
@@ -781,7 +781,7 @@
* the back-end preference store. Any changes found in the back-end data
* should be reflected in this node and its descendants, and at the same
* time any local changes to this node and descendants should be persisted.
- *
+ *
* @throws BackingStoreException
* if the backing store is unavailable or causes an operation
* failure.
@@ -817,7 +817,7 @@
/**
* Returns the root node of the system preference hierarchy.
- *
+ *
* @return the system preference hierarchy root node.
* @throws SecurityException
* if the {@code RuntimePermission("preferences")} is denied by
@@ -873,7 +873,7 @@
/**
* Returns the root node of the user preference hierarchy.
- *
+ *
* @return the user preference hierarchy root node.
* @throws SecurityException
* if the {@code RuntimePermission("preferences")} is denied by
@@ -887,7 +887,7 @@
/**
* Returns a string representation of this node. The format is "User/System
* Preference Node: " followed by this node's absolute path.
- *
+ *
* @return the string representation of this node.
*/
@Override
diff --git a/luni/src/main/java/java/util/prefs/PreferencesFactory.java b/luni/src/main/java/java/util/prefs/PreferencesFactory.java
index 3ac13e4..1e26419 100644
--- a/luni/src/main/java/java/util/prefs/PreferencesFactory.java
+++ b/luni/src/main/java/java/util/prefs/PreferencesFactory.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,23 +20,23 @@
* This interface is used by the {@link Preferences} class as factory class to
* create {@code Preferences} instances. This interface can be implemented and
* installed to replace the default preferences implementation.
- *
+ *
* @see java.util.prefs.Preferences
- *
+ *
* @since 1.4
*/
public interface PreferencesFactory {
/**
* Returns the root node of the preferences hierarchy for the calling user
* context.
- *
+ *
* @return the user preferences hierarchy root node.
*/
Preferences userRoot();
/**
* Returns the root node of the system preferences hierarchy.
- *
+ *
* @return the system preferences hierarchy root node.
*/
Preferences systemRoot();
diff --git a/luni/src/main/java/java/util/prefs/XMLParser.java b/luni/src/main/java/java/util/prefs/XMLParser.java
index 25d9556..85b6d73 100644
--- a/luni/src/main/java/java/util/prefs/XMLParser.java
+++ b/luni/src/main/java/java/util/prefs/XMLParser.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/regex/MatchResultImpl.java b/luni/src/main/java/java/util/regex/MatchResultImpl.java
index 795f2f6..b685757 100644
--- a/luni/src/main/java/java/util/regex/MatchResultImpl.java
+++ b/luni/src/main/java/java/util/regex/MatchResultImpl.java
@@ -20,7 +20,7 @@
* Holds the results of a successful match of a regular expression against a
* given string. Only used internally, thus sparsely documented (though the
* defining public interface has full documentation).
- *
+ *
* @see java.util.regex.MatchResult
*/
class MatchResultImpl implements MatchResult {
diff --git a/luni/src/main/java/java/util/regex/Matcher.java b/luni/src/main/java/java/util/regex/Matcher.java
index 5abbbd5..f6d2e45 100644
--- a/luni/src/main/java/java/util/regex/Matcher.java
+++ b/luni/src/main/java/java/util/regex/Matcher.java
@@ -25,20 +25,20 @@
* Pattern} instance and an input text. A typical use case is to
* iteratively find all occurrences of the {@code Pattern}, until the end of
* the input is reached, as the following example illustrates:
- *
+ *
* <p/>
- *
+ *
* <pre>
* Pattern p = Pattern.compile("[A-Za-z]+");
- *
+ *
* Matcher m = p.matcher("Hello, Android!");
* while (m.find()) {
* System.out.println(m.group()); // prints "Hello" and "Android"
* }
* </pre>
- *
+ *
* <p/>
- *
+ *
* The {@code Matcher} has a state that results from the previous operations.
* For example, it knows whether the most recent attempt to find the
* {@code Pattern} was successful and at which position the next attempt would
@@ -56,7 +56,7 @@
* Holds the handle for the native version of the pattern.
*/
private int nativePattern;
-
+
/**
* Holds the input text.
*/
@@ -67,7 +67,7 @@
* beginning of the text.
*/
private int regionStart;
-
+
/**
* Holds the end of the region, or input.length() if the matching should
* go until the end of the input.
@@ -79,17 +79,17 @@
* started some find/replace operations.
*/
private boolean searching;
-
+
/**
- * Holds the position where the next find operation will take place.
+ * Holds the position where the next find operation will take place.
*/
private int findPos;
-
+
/**
- * Holds the position where the next append operation will take place.
+ * Holds the position where the next append operation will take place.
*/
private int appendPos;
-
+
/**
* Reflects whether a match has been found during the most recent find
* operation.
@@ -105,7 +105,7 @@
* Reflects whether the bounds of the region are anchoring.
*/
private boolean anchoringBounds = true;
-
+
/**
* Reflects whether the bounds of the region are transparent.
*/
@@ -114,7 +114,7 @@
/**
* Creates a matcher for a given combination of pattern and input. Both
* elements can be changed later on.
- *
+ *
* @param pattern
* the pattern to use.
* @param input
@@ -242,10 +242,10 @@
* region being set to the whole input. Results of a previous find get lost.
* The next attempt to find an occurrence of the {@link Pattern} in the
* string will start at the beginning of the input.
- *
+ *
* @param input
* the new input sequence.
- *
+ *
* @return the {@code Matcher} itself.
*/
public Matcher reset(CharSequence input) {
@@ -267,7 +267,7 @@
/**
* Resets this matcher and sets a region. Only characters inside the region
* are considered for a match.
- *
+ *
* @param start
* the first character of the region.
* @param end
@@ -422,7 +422,7 @@
* previous match was successful, the method continues the search from the
* first character following that match in the input. Otherwise it searches
* either from the region start (if one has been set), or from position 0.
- *
+ *
* @return true if (and only if) a match has been found.
*/
public boolean find() {
@@ -437,7 +437,7 @@
NativeRegEx.startEnd(nativePattern, matchOffsets);
findPos = matchOffsets[1];
}
-
+
return matchFound;
}
@@ -476,17 +476,17 @@
/**
* Tries to match the {@link Pattern} against the entire region (or the
* entire input, if no region has been set).
- *
+ *
* @return true if (and only if) the {@code Pattern} matches the entire
* region.
*/
public boolean matches() {
- matchFound = NativeRegEx.matches(nativePattern, -1);
+ matchFound = NativeRegEx.matches(nativePattern, -1);
if (matchFound) {
NativeRegEx.startEnd(nativePattern, matchOffsets);
findPos = matchOffsets[1];
}
-
+
return matchFound;
}
@@ -517,23 +517,23 @@
* Tries to match the {@link Pattern}, starting from the beginning of the
* region (or the beginning of the input, if no region has been set).
* Doesn't require the {@code Pattern} to match against the whole region.
- *
+ *
* @return true if (and only if) the {@code Pattern} matches.
*/
public boolean lookingAt() {
- matchFound = NativeRegEx.lookingAt(nativePattern, -1);
+ matchFound = NativeRegEx.lookingAt(nativePattern, -1);
if (matchFound) {
NativeRegEx.startEnd(nativePattern, matchOffsets);
findPos = matchOffsets[1];
}
-
+
return matchFound;
}
/**
* Returns the index of the first character of the text that matched the
* whole regular expression.
- *
+ *
* @return the character index.
* @throws IllegalStateException
* if no successful match has been made.
@@ -555,7 +555,7 @@
/**
* Returns the index of the first character following the text that matched
* the whole regular expression.
- *
+ *
* @return the character index.
* @throws IllegalStateException
* if no successful match has been made.
@@ -670,7 +670,7 @@
/**
* Indicates whether more input might change a successful match into an
* unsuccessful one.
- *
+ *
* @return true if (and only if) more input might change a successful match
* into an unsuccessful one.
*/
@@ -732,5 +732,5 @@
super.finalize();
}
}
-
+
}
diff --git a/luni/src/main/java/java/util/regex/Pattern.java b/luni/src/main/java/java/util/regex/Pattern.java
index 49edd40..7733b72 100644
--- a/luni/src/main/java/java/util/regex/Pattern.java
+++ b/luni/src/main/java/java/util/regex/Pattern.java
@@ -29,13 +29,13 @@
* with the same regular expression, it may be more efficient to compile it once and reuse it.
* The {@code Pattern} class and its companion, {@link Matcher}, are also a lot more powerful
* than the small amount of functionality exposed by {@code String}.
- *
+ *
* <pre>
* // String convenience methods:
* boolean sawFailures = s.matches("Failures: \d+");
* String farewell = s.replaceAll("Hello, (\S+)", "Goodbye, $1");
* String[] fields = s.split(":");
- *
+ *
* // Direct use of Pattern:
* Pattern p = Pattern.compile("Hello, (\S+)");
* Matcher m = p.matcher(inputString);
@@ -43,18 +43,18 @@
* String name = m.group(1); // Access a submatch group; String can't do this.
* }
* </pre>
- *
+ *
* <h3>Regular expression syntax</h3>
* <span class="datatable">
* <style type="text/css">
* .datatable td { padding-right: 20px; }
* </style>
- *
+ *
* <p>Java supports a subset of Perl 5 regular expression syntax. An important gotcha is that Java
* has no regular expression literals, and uses plain old string literals instead. This means that
* you need an extra level of escaping. For example, the regular expression {@code \s+} has to
* be represented as the string {@code "\\s+"}.
- *
+ *
* <h3>Escape sequences</h3>
* <p><table>
* <tr> <td> \ </td> <td>Quote the following metacharacter (so {@code \.} matches a literal {@code .}).</td> </tr>
@@ -63,7 +63,7 @@
* <tr> <td> \\ </td> <td>A literal backslash.</td> </tr>
* <tr> <td> \<i>hhhh</i> </td> <td>The Unicode character U+hhhh (in hex).</td> </tr>
* <tr> <td> \c<i>x</i> </td> <td>The ASCII control character <i>x</i> (so {@code \cI} would be U+0009).</td> </tr>
- *
+ *
* <tr> <td> \a </td> <td>The ASCII bell character (U+0007).</td> </tr>
* <tr> <td> \e </td> <td>The ASCII ESC character (U+001b).</td> </tr>
* <tr> <td> \f </td> <td>The ASCII form feed character (U+000c).</td> </tr>
@@ -71,7 +71,7 @@
* <tr> <td> \r </td> <td>The ASCII carriage return character (U+000d).</td> </tr>
* <tr> <td> \t </td> <td>The ASCII tab character (U+0009).</td> </tr>
* </table>
- *
+ *
* <h3>Character classes</h3>
* <p>It's possible to construct arbitrary character classes using set operations:
* <table>
@@ -104,7 +104,7 @@
* whose name starts with {@code is}, but with the {@code is} replaced by {@code java}.
* For example, {@code \p{javaLowerCase}}.
* </ul>
- *
+ *
* <h3>Quantifiers</h3>
* <p>Quantifiers match some number of instances of the preceding regular expression.
* <table>
@@ -136,7 +136,7 @@
* <tr> <td> {<i>n,</i>}+ </td> <td>At least <i>n</i> (possessive).</td> </tr>
* <tr> <td> {<i>n</i>,<i>m</i>}+ </td> <td>At least <i>n</i> but not more than <i>m</i> (possessive).</td> </tr>
* </table>
- *
+ *
* <h3>Zero-width assertions</h3>
* <p><table>
* <tr> <td> ^ </td> <td>At beginning of line.</td> </tr>
@@ -148,7 +148,7 @@
* <tr> <td> \z </td> <td>At end of input.</td> </tr>
* <tr> <td> \Z </td> <td>At end of input, or before newline at end.</td> </tr>
* </table>
- *
+ *
* <h3>Look-around assertions</h3>
* <p>Look-around assertions assert that the subpattern does (positive) or doesn't (negative) match
* after (look-ahead) or before (look-behind) the current position, without including the matched
@@ -160,9 +160,9 @@
* <tr> <td> (?<=<i>a</i>) </td> <td>Zero-width positive look-behind.</td> </tr>
* <tr> <td> (?<!<i>a</i>) </td> <td>Zero-width negative look-behind.</td> </tr>
* </table>
- *
+ *
* <h3>Groups</h3>
- *
+ *
* <p><table>
* <tr> <td> (<i>a</i>) </td> <td>A capturing group.</td> </tr>
* <tr> <td> (?:<i>a</i>) </td> <td>A non-capturing group.</td> </tr>
@@ -171,19 +171,19 @@
* </table>
* <p>Explicit capturing groups are numbered from 1, and available via {@link Matcher#group}.
* Group 0 represents the whole match.
- *
+ *
* <h3>Operators</h3>
* <p><table>
* <tr> <td> <i>ab</i> </td> <td>Expression <i>a</i> followed by expression <i>b</i>.</td> </tr>
* <tr> <td> <i>a</i>|<i>b</i> </td> <td>Either expression <i>a</i> or expression <i>b</i>.</td> </tr>
* </table>
- *
+ *
* <a name="flags"><h3>Flags</h3></a>
* <p><table>
* <tr> <td> (?dimsux-dimsux:<i>a</i>) </td> <td>Evaluates the expression <i>a</i> with the given flags enabled/disabled.</td> </tr>
* <tr> <td> (?dimsux-dimsux) </td> <td>Evaluates the rest of the pattern with the given flags enabled/disabled.</td> </tr>
* </table>
- *
+ *
* <p>The flags are:
* <table>
* <tr><td>{@code i}</td> <td>{@link #CASE_INSENSITIVE}</td> <td>case insensitive matching</td></tr>
@@ -201,26 +201,26 @@
* <p>There are two other flags not settable via this mechanism: {@link #CANON_EQ} and
* {@link #LITERAL}. Attempts to use {@link #CANON_EQ} on Android will throw an exception.
* </span>
- *
+ *
* <h3>Implementation notes</h3>
- *
+ *
* The regular expression implementation used in Android is provided by
* <a href="http://www.icu-project.org">ICU</a>. The notation for the regular
* expressions is mostly a superset of those used in other Java language
* implementations. This means that existing applications will normally work as
* expected, but in rare cases Android may accept a regular expression that is
* not accepted by other implementations.
- *
+ *
* <p>In some cases, Android will recognize that a regular expression is a simple
* special case that can be handled more efficiently. This is true of both the convenience methods
* in {@code String} and the methods in {@code Pattern}.
- *
+ *
* @see Matcher
*/
public final class Pattern implements Serializable {
-
+
private static final long serialVersionUID = 5073258162644648461L;
-
+
/**
* This constant specifies that a pattern matches Unix line endings ('\n')
* only against the '.', '^', and '$' meta characters. Corresponds to {@code (?d)}.
@@ -284,7 +284,7 @@
* Holds a handle (a pointer, actually) for the native ICU pattern.
*/
transient int mNativePattern;
-
+
/**
* Holds the number of groups in the pattern.
*/
@@ -361,9 +361,9 @@
/**
* Returns a compiled form of the given {@code regularExpression}, as modified by the
* given {@code flags}. See the <a href="#flags">flags overview</a> for more on flags.
- *
+ *
* @throws PatternSyntaxException if the regular expression is syntactically incorrect.
- *
+ *
* @see #CANON_EQ
* @see #CASE_INSENSITIVE
* @see #COMMENTS
@@ -397,15 +397,15 @@
if (pattern == null) {
throw new NullPointerException();
}
-
+
if ((flags & LITERAL) != 0) {
pattern = quote(pattern);
}
-
+
// These are the flags natively supported by ICU.
// They even have the same value in native code.
flags = flags & (CASE_INSENSITIVE | COMMENTS | MULTILINE | DOTALL | UNIX_LINES);
-
+
mNativePattern = NativeRegEx.open(pattern, flags);
mGroupCount = NativeRegEx.groupCount(mNativePattern);
}
@@ -415,7 +415,7 @@
* Equivalent to {@code Pattern.compile(regularExpression).matcher(input).matches()}.
* If the same regular expression is to be used for multiple operations, it may be more
* efficient to reuse a compiled {@code Pattern}.
- *
+ *
* @see Pattern#compile(java.lang.String, int)
* @see Matcher#matches()
*/
@@ -441,7 +441,7 @@
}
return sb.append(string.substring(apos)).append("\\E").toString();
}
-
+
@Override
protected void finalize() throws Throwable {
try {
diff --git a/luni/src/main/java/java/util/regex/PatternSyntaxException.java b/luni/src/main/java/java/util/regex/PatternSyntaxException.java
index d59bdd4..2bbdb46 100644
--- a/luni/src/main/java/java/util/regex/PatternSyntaxException.java
+++ b/luni/src/main/java/java/util/regex/PatternSyntaxException.java
@@ -23,12 +23,12 @@
* Encapsulates a syntax error that occurred during the compilation of a
* {@link Pattern}. Might include a detailed description, the original regular
* expression, and the index at which the error occurred.
- *
+ *
* @see Pattern#compile(String)
* @see Pattern#compile(java.lang.String,int)
*/
public class PatternSyntaxException extends IllegalArgumentException {
-
+
private static final long serialVersionUID = -3864639126226059218L;
/**
@@ -52,7 +52,7 @@
/**
* Creates a new PatternSyntaxException for a given message, pattern, and
* error index.
- *
+ *
* @param description
* the description of the syntax error, or {@code null} if the
* description is not known.
@@ -71,9 +71,9 @@
/**
* Returns the syntactically incorrect regular expression.
- *
+ *
* @return the regular expression.
- *
+ *
*/
public String getPattern() {
return pattern;
@@ -83,14 +83,14 @@
* Returns a detailed error message for the exception. The message is
* potentially multi-line, and it might include a detailed description, the
* original regular expression, and the index at which the error occured.
- *
+ *
* @return the error message.
*/
@Override
public String getMessage() {
// BEGIN android-changed
StringBuilder builder = new StringBuilder("Syntax error");
-
+
if (desc != null) {
builder.append(' ');
builder.append(desc);
@@ -99,11 +99,11 @@
if (index >= 0) {
builder.append(" near index " + index + ":");
}
-
+
if (pattern != null) {
builder.append('\n');
builder.append(pattern);
-
+
if (index >= 0) {
char[] spaces = new char[index];
Arrays.fill(spaces, ' ');
@@ -112,7 +112,7 @@
builder.append('^');
}
}
-
+
return builder.toString();
// END android-changed
}
@@ -120,7 +120,7 @@
/**
* Returns the description of the syntax error, or {@code null} if the
* description is not known.
- *
+ *
* @return the description.
*/
public String getDescription() {
@@ -130,9 +130,9 @@
/**
* Returns the character index around which the error occurred, or -1 if the
* index is not known.
- *
+ *
* @return the index.
- *
+ *
*/
public int getIndex() {
return index;
diff --git a/luni/src/main/java/java/util/zip/DeflaterInputStream.java b/luni/src/main/java/java/util/zip/DeflaterInputStream.java
index 13d65e4..d1d12a3 100644
--- a/luni/src/main/java/java/util/zip/DeflaterInputStream.java
+++ b/luni/src/main/java/java/util/zip/DeflaterInputStream.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,7 +41,7 @@
* Constructs a {@code DeflaterInputStream} with a new {@code Deflater} and an
* implementation-defined default internal buffer size. {@code in} is a source of
* uncompressed data, and this stream will be a source of compressed data.
- *
+ *
* @param in the source {@code InputStream}
*/
public DeflaterInputStream(InputStream in) {
@@ -52,7 +52,7 @@
* Constructs a {@code DeflaterInputStream} with the given {@code Deflater} and an
* implementation-defined default internal buffer size. {@code in} is a source of
* uncompressed data, and this stream will be a source of compressed data.
- *
+ *
* @param in the source {@code InputStream}
* @param deflater the {@code Deflater} to be used for compression
*/
@@ -64,7 +64,7 @@
* Constructs a {@code DeflaterInputStream} with the given {@code Deflater} and
* given internal buffer size. {@code in} is a source of
* uncompressed data, and this stream will be a source of compressed data.
- *
+ *
* @param in the source {@code InputStream}
* @param deflater the {@code Deflater} to be used for compression
* @param bufferSize the length in bytes of the internal buffer
@@ -95,7 +95,7 @@
/**
* Reads a byte from the compressed input stream. The result will be a byte of compressed
* data corresponding to an uncompressed byte or bytes read from the underlying stream.
- *
+ *
* @return the byte or -1 if the end of the stream has been reached.
*/
@Override
@@ -110,7 +110,7 @@
/**
* Reads compressed data into a byte buffer. The result will be bytes of compressed
* data corresponding to an uncompressed byte or bytes read from the underlying stream.
- *
+ *
* @param b
* the byte buffer that compressed data will be read into.
* @param off
@@ -194,12 +194,12 @@
* Returns 0 when when this stream has exhausted its input; and 1 otherwise.
* A result of 1 does not guarantee that further bytes can be returned,
* with or without blocking.
- *
+ *
* <p>Although consistent with the RI, this behavior is inconsistent with
* {@link InputStream#available()}, and violates the <a
* href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov
* Substitution Principle</a>. This method should not be used.
- *
+ *
* @return 0 if no further bytes are available. Otherwise returns 1,
* which suggests (but does not guarantee) that additional bytes are
* available.
diff --git a/luni/src/main/java/java/util/zip/DeflaterOutputStream.java b/luni/src/main/java/java/util/zip/DeflaterOutputStream.java
index db911ce..4fadfe0 100644
--- a/luni/src/main/java/java/util/zip/DeflaterOutputStream.java
+++ b/luni/src/main/java/java/util/zip/DeflaterOutputStream.java
@@ -205,7 +205,7 @@
@Override
public void write(byte[] buffer, int off, int nbytes) throws IOException {
if (done) {
- throw new IOException(Messages.getString("archive.26"));
+ throw new IOException(Messages.getString("archive.26"));
}
// avoid int overflow, check null buf
if (off <= buffer.length && nbytes >= 0 && off >= 0
diff --git a/luni/src/main/java/java/util/zip/GZIPInputStream.java b/luni/src/main/java/java/util/zip/GZIPInputStream.java
index 8ba3f46..198f26e 100644
--- a/luni/src/main/java/java/util/zip/GZIPInputStream.java
+++ b/luni/src/main/java/java/util/zip/GZIPInputStream.java
@@ -117,7 +117,7 @@
readFully(header, 0, 2);
int crc16 = getShort(header, 0);
if ((crc.getValue() & 0xffff) != crc16) {
- throw new IOException(Messages.getString("archive.20"));
+ throw new IOException(Messages.getString("archive.20"));
}
crc.reset();
}
@@ -199,10 +199,10 @@
readFully(b, copySize, trailerSize - copySize);
if (getLong(b, 0) != crc.getValue()) {
- throw new IOException(Messages.getString("archive.20"));
+ throw new IOException(Messages.getString("archive.20"));
}
if ((int) getLong(b, 4) != inf.getTotalOut()) {
- throw new IOException(Messages.getString("archive.21"));
+ throw new IOException(Messages.getString("archive.21"));
}
}
diff --git a/luni/src/main/java/java/util/zip/Inflater.java b/luni/src/main/java/java/util/zip/Inflater.java
index 462f3aa..cd7b829 100644
--- a/luni/src/main/java/java/util/zip/Inflater.java
+++ b/luni/src/main/java/java/util/zip/Inflater.java
@@ -247,7 +247,7 @@
int result = inflateImpl(buf, off, nbytes, streamHandle);
if (needsDictionary && neededDict) {
throw new DataFormatException(
- Messages.getString("archive.27"));
+ Messages.getString("archive.27"));
}
return result;
diff --git a/luni/src/main/java/java/util/zip/InflaterOutputStream.java b/luni/src/main/java/java/util/zip/InflaterOutputStream.java
index 1329393..9167419 100644
--- a/luni/src/main/java/java/util/zip/InflaterOutputStream.java
+++ b/luni/src/main/java/java/util/zip/InflaterOutputStream.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,7 +40,7 @@
* Constructs an {@code InflaterOutputStream} with a new {@code Inflater} and an
* implementation-defined default internal buffer size. {@code out} is a destination
* for uncompressed data, and compressed data will be written to this stream.
- *
+ *
* @param out the destination {@code OutputStream}
*/
public InflaterOutputStream(OutputStream out) {
@@ -51,7 +51,7 @@
* Constructs an {@code InflaterOutputStream} with the given {@code Inflater} and an
* implementation-defined default internal buffer size. {@code out} is a destination
* for uncompressed data, and compressed data will be written to this stream.
- *
+ *
* @param out the destination {@code OutputStream}
* @param inflater the {@code Inflater} to be used for decompression
*/
@@ -63,7 +63,7 @@
* Constructs an {@code InflaterOutputStream} with the given {@code Inflater} and
* given internal buffer size. {@code out} is a destination
* for uncompressed data, and compressed data will be written to this stream.
- *
+ *
* @param out the destination {@code OutputStream}
* @param inflater the {@code Inflater} to be used for decompression
* @param bufferSize the length in bytes of the internal buffer
@@ -103,7 +103,7 @@
/**
* Finishes writing current uncompressed data into the InflaterOutputStream
* without closing it.
- *
+ *
* @throws IOException if an I/O error occurs, or the stream has been closed
*/
public void finish() throws IOException {
@@ -115,7 +115,7 @@
* Writes a byte to the decompressing output stream. {@code b} should be a byte of
* compressed input. The corresponding uncompressed data will be written to the underlying
* stream.
- *
+ *
* @param b the byte
* @throws IOException if an I/O error occurs, or the stream has been closed
* @throws ZipException if a zip exception occurs.
@@ -129,7 +129,7 @@
* Writes bytes to the decompressing output stream. {@code b} should be an array of
* compressed input. The corresponding uncompressed data will be written to the underlying
* stream.
- *
+ *
* @param b the byte array
* @param off the start offset in the byte array
* @param len the number of the bytes to take from the byte array
diff --git a/luni/src/main/java/java/util/zip/ZipError.java b/luni/src/main/java/java/util/zip/ZipError.java
index a244d80..fa0218a 100644
--- a/luni/src/main/java/java/util/zip/ZipError.java
+++ b/luni/src/main/java/java/util/zip/ZipError.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/java/util/zip/ZipFile.java b/luni/src/main/java/java/util/zip/ZipFile.java
index a2ca35a..b1e20f9 100644
--- a/luni/src/main/java/java/util/zip/ZipFile.java
+++ b/luni/src/main/java/java/util/zip/ZipFile.java
@@ -436,7 +436,7 @@
return n;
}
}
-
+
static class ZipInflaterInputStream extends InflaterInputStream {
ZipEntry entry;
diff --git a/luni/src/main/java/java/util/zip/ZipInputStream.java b/luni/src/main/java/java/util/zip/ZipInputStream.java
index de46a32..e49ced1 100644
--- a/luni/src/main/java/java/util/zip/ZipInputStream.java
+++ b/luni/src/main/java/java/util/zip/ZipInputStream.java
@@ -174,17 +174,17 @@
if (hasDD) {
in.read(hdrBuf, 0, EXTHDR);
if (getLong(hdrBuf, 0) != EXTSIG) {
- throw new ZipException(Messages.getString("archive.1F"));
+ throw new ZipException(Messages.getString("archive.1F"));
}
currentEntry.crc = getLong(hdrBuf, EXTCRC);
currentEntry.compressedSize = getLong(hdrBuf, EXTSIZ);
currentEntry.size = getLong(hdrBuf, EXTLEN);
}
if (currentEntry.crc != crc.getValue()) {
- throw new ZipException(Messages.getString("archive.20"));
+ throw new ZipException(Messages.getString("archive.20"));
}
if (currentEntry.compressedSize != inB || currentEntry.size != out) {
- throw new ZipException(Messages.getString("archive.21"));
+ throw new ZipException(Messages.getString("archive.21"));
}
}
@@ -229,7 +229,7 @@
}
int version = getShort(hdrBuf, 0) & 0xff;
if (version > ZIPLocalHeaderVersionNeeded) {
- throw new ZipException(Messages.getString("archive.22"));
+ throw new ZipException(Messages.getString("archive.22"));
}
int flags = getShort(hdrBuf, LOCFLG - LOCVER);
hasDD = ((flags & ZipFile.GPBF_DATA_DESCRIPTOR_FLAG) != 0);
@@ -244,7 +244,7 @@
}
int flen = getShort(hdrBuf, LOCNAM - LOCVER);
if (flen == 0) {
- throw new ZipException(Messages.getString("archive.23"));
+ throw new ZipException(Messages.getString("archive.23"));
}
int elen = getShort(hdrBuf, LOCEXT - LOCVER);
diff --git a/luni/src/main/java/java/util/zip/ZipOutputStream.java b/luni/src/main/java/java/util/zip/ZipOutputStream.java
index 0c9231f..57e2f96 100644
--- a/luni/src/main/java/java/util/zip/ZipOutputStream.java
+++ b/luni/src/main/java/java/util/zip/ZipOutputStream.java
@@ -120,10 +120,10 @@
// Verify values for STORED types
if (currentEntry.getMethod() == STORED) {
if (crc.getValue() != currentEntry.crc) {
- throw new ZipException(Messages.getString("archive.20"));
+ throw new ZipException(Messages.getString("archive.20"));
}
if (currentEntry.size != crc.tbytes) {
- throw new ZipException(Messages.getString("archive.21"));
+ throw new ZipException(Messages.getString("archive.21"));
}
}
curOffset = LOCHDR;
@@ -248,28 +248,28 @@
|| (compressMethod == STORED && ze.getMethod() == -1)) {
if (ze.crc == -1) {
/* [MSG "archive.20", "Crc mismatch"] */
- throw new ZipException(Messages.getString("archive.20"));
+ throw new ZipException(Messages.getString("archive.20"));
}
if (ze.size == -1 && ze.compressedSize == -1) {
/* [MSG "archive.21", "Size mismatch"] */
- throw new ZipException(Messages.getString("archive.21"));
+ throw new ZipException(Messages.getString("archive.21"));
}
if (ze.size != ze.compressedSize && ze.compressedSize != -1
&& ze.size != -1) {
/* [MSG "archive.21", "Size mismatch"] */
- throw new ZipException(Messages.getString("archive.21"));
+ throw new ZipException(Messages.getString("archive.21"));
}
}
checkClosed();
if (entries.contains(ze.name)) {
/* [MSG "archive.29", "Entry already exists: {0}"] */
- throw new ZipException(Messages.getString("archive.29", ze.name));
+ throw new ZipException(Messages.getString("archive.29", ze.name));
}
nameLength = utf8Count(ze.name);
if (nameLength > 0xffff) {
/* [MSG "archive.2A", "Name too long: {0}"] */
throw new IllegalArgumentException(Messages.getString(
- "archive.2A", ze.name));
+ "archive.2A", ze.name));
}
def.setLevel(compressLevel);
@@ -331,7 +331,7 @@
*/
public void setComment(String comment) {
if (comment.length() > 0xFFFF) {
- throw new IllegalArgumentException(Messages.getString("archive.2B"));
+ throw new IllegalArgumentException(Messages.getString("archive.2B"));
}
this.comment = comment;
}
@@ -402,7 +402,7 @@
if (currentEntry == null) {
/* [MSG "archive.2C", "No active entry"] */
- throw new ZipException(Messages.getString("archive.2C"));
+ throw new ZipException(Messages.getString("archive.2C"));
}
if (currentEntry.getMethod() == STORED) {
diff --git a/luni/src/main/java/javax/crypto/BadPaddingException.java b/luni/src/main/java/javax/crypto/BadPaddingException.java
index 5e2dd38..9288f47 100644
--- a/luni/src/main/java/javax/crypto/BadPaddingException.java
+++ b/luni/src/main/java/javax/crypto/BadPaddingException.java
@@ -32,7 +32,7 @@
/**
* Creates a new instance of {@code BadPaddingException} with a message.
- *
+ *
* @param msg
* the message
*/
diff --git a/luni/src/main/java/javax/crypto/Cipher.java b/luni/src/main/java/javax/crypto/Cipher.java
index bb2b0e1..40a71e0 100644
--- a/luni/src/main/java/javax/crypto/Cipher.java
+++ b/luni/src/main/java/javax/crypto/Cipher.java
@@ -104,7 +104,7 @@
/**
* The service name.
*/
- private static final String SERVICE = "Cipher";
+ private static final String SERVICE = "Cipher";
/**
* Used to access common engine functionality.
@@ -203,12 +203,12 @@
NoSuchProviderException, NoSuchPaddingException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
- throw new NoSuchProviderException(Messages.getString("crypto.16", provider));
+ throw new NoSuchProviderException(Messages.getString("crypto.16", provider));
}
return getInstance(transformation, p);
}
@@ -235,7 +235,7 @@
Provider provider) throws NoSuchAlgorithmException,
NoSuchPaddingException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
Cipher c = getCipher(transformation, provider);
return c;
@@ -243,7 +243,7 @@
/**
* Find appropriate Cipher according the specification rules
- *
+ *
* @param transformation
* @param provider
* @return
@@ -253,8 +253,8 @@
private static synchronized Cipher getCipher(String transformation, Provider provider)
throws NoSuchAlgorithmException, NoSuchPaddingException {
- if (transformation == null || "".equals(transformation)) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
+ if (transformation == null || "".equals(transformation)) {
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
transformation));
}
@@ -270,9 +270,9 @@
}
} else {
String[] searhOrder = {
- transf[0] + "/" + transf[1] + "/" + transf[2], // "algorithm/mode/padding"
- transf[0] + "/" + transf[1], // "algorithm/mode"
- transf[0] + "//" + transf[2], // "algorithm//padding"
+ transf[0] + "/" + transf[1] + "/" + transf[2], // "algorithm/mode/padding"
+ transf[0] + "/" + transf[1], // "algorithm/mode"
+ transf[0] + "//" + transf[2], // "algorithm//padding"
transf[0] // "algorithm"
};
int i;
@@ -323,28 +323,28 @@
String[] transf = { null, null, null };
StringTokenizer st;
int i = 0;
- for (st = new StringTokenizer(transformation, "/"); st
+ for (st = new StringTokenizer(transformation, "/"); st
.hasMoreElements();) {
if (i > 2) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
transformation));
}
transf[i] = st.nextToken();
if (transf[i] != null) {
transf[i] = transf[i].trim();
- if ("".equals(transf[i])) {
+ if ("".equals(transf[i])) {
transf[i] = null;
}
i++;
}
}
if (transf[0] == null) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
transformation));
}
if (!(transf[1] == null && transf[2] == null)
&& (transf[1] == null || transf[2] == null)) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.17",
transformation));
}
return transf;
@@ -393,7 +393,7 @@
public final int getOutputSize(int inputLen) {
if (mode == 0) {
throw new IllegalStateException(
- Messages.getString("crypto.18"));
+ Messages.getString("crypto.18"));
}
return spiImpl.engineGetOutputSize(inputLen);
}
@@ -511,7 +511,7 @@
throws InvalidKeyException {
if (opmode != ENCRYPT_MODE && opmode != DECRYPT_MODE
&& opmode != UNWRAP_MODE && opmode != WRAP_MODE) {
- throw new InvalidParameterException(Messages.getString("crypto.19"));
+ throw new InvalidParameterException(Messages.getString("crypto.19"));
}
// FIXME InvalidKeyException
// if keysize exceeds the maximum allowable keysize
@@ -601,7 +601,7 @@
InvalidAlgorithmParameterException {
if (opmode != ENCRYPT_MODE && opmode != DECRYPT_MODE
&& opmode != UNWRAP_MODE && opmode != WRAP_MODE) {
- throw new InvalidParameterException(Messages.getString("crypto.19"));
+ throw new InvalidParameterException(Messages.getString("crypto.19"));
}
// FIXME InvalidKeyException
// if keysize exceeds the maximum allowable keysize
@@ -695,7 +695,7 @@
InvalidAlgorithmParameterException {
if (opmode != ENCRYPT_MODE && opmode != DECRYPT_MODE
&& opmode != UNWRAP_MODE && opmode != WRAP_MODE) {
- throw new InvalidParameterException(Messages.getString("crypto.19"));
+ throw new InvalidParameterException(Messages.getString("crypto.19"));
}
// FIXME InvalidKeyException
// if keysize exceeds the maximum allowable keysize
@@ -786,14 +786,14 @@
SecureRandom random) throws InvalidKeyException {
if (opmode != ENCRYPT_MODE && opmode != DECRYPT_MODE
&& opmode != UNWRAP_MODE && opmode != WRAP_MODE) {
- throw new InvalidParameterException(Messages.getString("crypto.19"));
+ throw new InvalidParameterException(Messages.getString("crypto.19"));
}
if (certificate instanceof X509Certificate) {
Set<String> ce = ((X509Certificate) certificate).getCriticalExtensionOIDs();
boolean critical = false;
if (ce != null && !ce.isEmpty()) {
for (String oid : ce) {
- if (oid.equals("2.5.29.15")) { //KeyUsage OID = 2.5.29.15
+ if (oid.equals("2.5.29.15")) { //KeyUsage OID = 2.5.29.15
critical = true;
break;
}
@@ -813,10 +813,10 @@
if (keyUsage != null) {
if (opmode == ENCRYPT_MODE && (!keyUsage[7])) {
throw new InvalidKeyException(
- Messages.getString("crypto.1A"));
+ Messages.getString("crypto.1A"));
} else if (opmode == DECRYPT_MODE && (!keyUsage[8])) {
throw new InvalidKeyException(
- Messages.getString("crypto.1B"));
+ Messages.getString("crypto.1B"));
}
}
}
@@ -846,10 +846,10 @@
public final byte[] update(byte[] input) {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (input == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.1D"));
+ throw new IllegalArgumentException(Messages.getString("crypto.1D"));
}
if (input.length == 0) {
return null;
@@ -880,16 +880,16 @@
public final byte[] update(byte[] input, int inputOffset, int inputLen) {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (input == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.1D"));
+ throw new IllegalArgumentException(Messages.getString("crypto.1D"));
}
if (inputOffset < 0 || inputLen < 0
- || inputLen > input.length
+ || inputLen > input.length
|| inputOffset > input.length - inputLen) {
throw new IllegalArgumentException(
- Messages.getString("crypto.1E"));
+ Messages.getString("crypto.1E"));
}
if (input.length == 0) {
return null;
@@ -964,23 +964,23 @@
byte[] output, int outputOffset) throws ShortBufferException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (input == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.1D"));
+ throw new IllegalArgumentException(Messages.getString("crypto.1D"));
}
if (output == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.1F"));
+ throw new IllegalArgumentException(Messages.getString("crypto.1F"));
}
if (outputOffset < 0) {
throw new IllegalArgumentException(
- Messages.getString("crypto.20"));
+ Messages.getString("crypto.20"));
}
if (inputOffset < 0 || inputLen < 0
|| inputLen > input.length
|| inputOffset > input.length - inputLen) {
throw new IllegalArgumentException(
- Messages.getString("crypto.21"));
+ Messages.getString("crypto.21"));
}
if (input.length == 0) {
return 0;
@@ -1017,11 +1017,11 @@
throws ShortBufferException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (input == output) {
throw new IllegalArgumentException(
- Messages.getString("crypto.22"));
+ Messages.getString("crypto.22"));
}
return spiImpl.engineUpdate(input, output);
}
@@ -1046,7 +1046,7 @@
BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
return spiImpl.engineDoFinal(null, 0, 0);
}
@@ -1080,11 +1080,11 @@
BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (outputOffset < 0) {
throw new IllegalArgumentException(
- Messages.getString("crypto.20"));
+ Messages.getString("crypto.20"));
}
return spiImpl.engineDoFinal(null, 0, 0, output, outputOffset);
}
@@ -1111,7 +1111,7 @@
BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
return spiImpl.engineDoFinal(input, 0, input.length);
}
@@ -1146,12 +1146,12 @@
throws IllegalBlockSizeException, BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (inputOffset < 0 || inputLen < 0
|| inputOffset + inputLen > input.length) {
throw new IllegalArgumentException(
- Messages.getString("crypto.1E"));
+ Messages.getString("crypto.1E"));
}
return spiImpl.engineDoFinal(input, inputOffset, inputLen);
}
@@ -1229,12 +1229,12 @@
IllegalBlockSizeException, BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (inputOffset < 0 || inputLen < 0
|| inputOffset + inputLen > input.length) {
throw new IllegalArgumentException(
- Messages.getString("crypto.1E"));
+ Messages.getString("crypto.1E"));
}
return spiImpl.engineDoFinal(input, inputOffset, inputLen, output,
outputOffset);
@@ -1272,11 +1272,11 @@
BadPaddingException {
if (mode != ENCRYPT_MODE && mode != DECRYPT_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
if (input == output) {
throw new IllegalArgumentException(
- Messages.getString("crypto.2E"));
+ Messages.getString("crypto.2E"));
}
return spiImpl.engineDoFinal(input, output);
}
@@ -1299,7 +1299,7 @@
InvalidKeyException {
if (mode != WRAP_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
return spiImpl.engineWrap(key);
}
@@ -1330,7 +1330,7 @@
NoSuchAlgorithmException {
if (mode != UNWRAP_MODE) {
throw new IllegalStateException(
- Messages.getString("crypto.1C"));
+ Messages.getString("crypto.1C"));
}
return spiImpl.engineUnwrap(wrappedKey, wrappedKeyAlgorithm,
wrappedKeyType);
diff --git a/luni/src/main/java/javax/crypto/CipherInputStream.java b/luni/src/main/java/javax/crypto/CipherInputStream.java
index fb1ef27..a4c5ab7 100644
--- a/luni/src/main/java/javax/crypto/CipherInputStream.java
+++ b/luni/src/main/java/javax/crypto/CipherInputStream.java
@@ -79,8 +79,8 @@
@Override
public int read() throws IOException {
if (finished) {
- return ((o_buffer == null) || (index == o_buffer.length))
- ? -1
+ return ((o_buffer == null) || (index == o_buffer.length))
+ ? -1
: o_buffer[index++] & 0xFF;
}
if ((o_buffer != null) && (index < o_buffer.length)) {
@@ -150,7 +150,7 @@
int i;
for (i=0; i<len; i++) {
if ((read_b = read()) == -1) {
- return (i == 0) ? -1 : i;
+ return (i == 0) ? -1 : i;
}
if (b != null) {
b[off+i] = (byte) read_b;
diff --git a/luni/src/main/java/javax/crypto/CipherSpi.java b/luni/src/main/java/javax/crypto/CipherSpi.java
index 6dd7d7d..faca1e3 100644
--- a/luni/src/main/java/javax/crypto/CipherSpi.java
+++ b/luni/src/main/java/javax/crypto/CipherSpi.java
@@ -333,10 +333,10 @@
protected int engineUpdate(ByteBuffer input, ByteBuffer output)
throws ShortBufferException {
if (input == null) {
- throw new NullPointerException(Messages.getString("crypto.0C"));
+ throw new NullPointerException(Messages.getString("crypto.0C"));
}
if (output == null) {
- throw new NullPointerException(Messages.getString("crypto.0D"));
+ throw new NullPointerException(Messages.getString("crypto.0D"));
}
int position = input.position();
int limit = input.limit();
@@ -356,12 +356,12 @@
bOutput = engineUpdate(bInput, 0, limit - position);
}
if (output.remaining() < bOutput.length) {
- throw new ShortBufferException(Messages.getString("crypto.0E"));
+ throw new ShortBufferException(Messages.getString("crypto.0E"));
}
try {
output.put(bOutput);
} catch (java.nio.BufferOverflowException e) {
- throw new ShortBufferException(Messages.getString("crypto.0F", e));
+ throw new ShortBufferException(Messages.getString("crypto.0F", e));
}
return bOutput.length;
}
@@ -451,10 +451,10 @@
throws ShortBufferException, IllegalBlockSizeException,
BadPaddingException {
if (input == null) {
- throw new NullPointerException(Messages.getString("crypto.0C"));
+ throw new NullPointerException(Messages.getString("crypto.0C"));
}
if (output == null) {
- throw new NullPointerException(Messages.getString("crypto.0D"));
+ throw new NullPointerException(Messages.getString("crypto.0D"));
}
int position = input.position();
int limit = input.limit();
@@ -476,12 +476,12 @@
bOutput = engineDoFinal(bInput, 0, limit - position);
}
if (output.remaining() < bOutput.length) {
- throw new ShortBufferException(Messages.getString("crypto.0E"));
+ throw new ShortBufferException(Messages.getString("crypto.0E"));
}
try {
output.put(bOutput);
} catch (java.nio.BufferOverflowException e) {
- throw new ShortBufferException(Messages.getString("crypto.0F", e));
+ throw new ShortBufferException(Messages.getString("crypto.0F", e));
}
return bOutput.length;
}
@@ -504,7 +504,7 @@
protected byte[] engineWrap(Key key) throws IllegalBlockSizeException,
InvalidKeyException {
throw new UnsupportedOperationException(
- Messages.getString("crypto.10"));
+ Messages.getString("crypto.10"));
}
/**
@@ -534,7 +534,7 @@
int wrappedKeyType) throws InvalidKeyException,
NoSuchAlgorithmException {
throw new UnsupportedOperationException(
- Messages.getString("crypto.11"));
+ Messages.getString("crypto.11"));
}
/**
@@ -552,6 +552,6 @@
*/
protected int engineGetKeySize(Key key) throws InvalidKeyException {
throw new UnsupportedOperationException(
- Messages.getString("crypto.12"));
+ Messages.getString("crypto.12"));
}
}
\ No newline at end of file
diff --git a/luni/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java b/luni/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java
index 1ddab92..5476c98 100644
--- a/luni/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java
+++ b/luni/src/main/java/javax/crypto/EncryptedPrivateKeyInfo.java
@@ -83,12 +83,12 @@
public EncryptedPrivateKeyInfo(byte[] encoded)
throws IOException {
if (encoded == null) {
- throw new NullPointerException(Messages.getString("crypto.22"));
+ throw new NullPointerException(Messages.getString("crypto.22"));
}
this.encoded = new byte[encoded.length];
System.arraycopy(encoded, 0, this.encoded, 0, encoded.length);
Object[] values;
-
+
values = (Object[])asn1.decode(encoded);
AlgorithmIdentifier aId = (AlgorithmIdentifier) values[0];
@@ -139,18 +139,18 @@
public EncryptedPrivateKeyInfo(String encrAlgName, byte[] encryptedData)
throws NoSuchAlgorithmException {
if (encrAlgName == null) {
- throw new NullPointerException(Messages.getString("crypto.23"));
+ throw new NullPointerException(Messages.getString("crypto.23"));
}
this.algName = encrAlgName;
if (!mapAlgName()) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.24", this.algName));
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.24", this.algName));
}
if (encryptedData == null) {
throw new NullPointerException(
- Messages.getString("crypto.25"));
+ Messages.getString("crypto.25"));
}
if (encryptedData.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.26"));
+ throw new IllegalArgumentException(Messages.getString("crypto.26"));
}
this.encryptedData = new byte[encryptedData.length];
System.arraycopy(encryptedData, 0,
@@ -177,22 +177,22 @@
byte[] encryptedData)
throws NoSuchAlgorithmException {
if (algParams == null) {
- throw new NullPointerException(Messages.getString("crypto.27"));
+ throw new NullPointerException(Messages.getString("crypto.27"));
}
this.algParameters = algParams;
if (encryptedData == null) {
throw new NullPointerException(
- Messages.getString("crypto.25"));
+ Messages.getString("crypto.25"));
}
if (encryptedData.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.26"));
+ throw new IllegalArgumentException(Messages.getString("crypto.26"));
}
this.encryptedData = new byte[encryptedData.length];
System.arraycopy(encryptedData, 0,
this.encryptedData, 0, encryptedData.length);
this.algName = this.algParameters.getAlgorithm();
if (!mapAlgName()) {
- throw new NoSuchAlgorithmException(Messages.getString("crypto.24", this.algName));
+ throw new NoSuchAlgorithmException(Messages.getString("crypto.24", this.algName));
}
}
@@ -246,7 +246,7 @@
public PKCS8EncodedKeySpec getKeySpec(Cipher cipher)
throws InvalidKeySpecException {
if (cipher == null) {
- throw new NullPointerException(Messages.getString("crypto.28"));
+ throw new NullPointerException(Messages.getString("crypto.28"));
}
try {
byte[] decryptedData = cipher.doFinal(encryptedData);
@@ -254,7 +254,7 @@
ASN1PrivateKeyInfo.verify(decryptedData);
} catch (IOException e1) {
throw new InvalidKeySpecException(
- Messages.getString("crypto.29"));
+ Messages.getString("crypto.29"));
}
return new PKCS8EncodedKeySpec(decryptedData);
} catch (IllegalStateException e) {
@@ -286,7 +286,7 @@
throws NoSuchAlgorithmException,
InvalidKeyException {
if (decryptKey == null) {
- throw new NullPointerException(Messages.getString("crypto.2A"));
+ throw new NullPointerException(Messages.getString("crypto.2A"));
}
try {
Cipher cipher = Cipher.getInstance(algName);
@@ -300,7 +300,7 @@
ASN1PrivateKeyInfo.verify(decryptedData);
} catch (IOException e1) {
throw new InvalidKeyException(
- Messages.getString("crypto.29"));
+ Messages.getString("crypto.29"));
}
return new PKCS8EncodedKeySpec(decryptedData);
} catch (NoSuchPaddingException e) {
@@ -339,15 +339,15 @@
* .
*/
public PKCS8EncodedKeySpec getKeySpec(Key decryptKey, String providerName)
- throws NoSuchProviderException,
+ throws NoSuchProviderException,
NoSuchAlgorithmException,
InvalidKeyException {
if (decryptKey == null) {
- throw new NullPointerException(Messages.getString("crypto.2A"));
+ throw new NullPointerException(Messages.getString("crypto.2A"));
}
if (providerName == null) {
throw new NullPointerException(
- Messages.getString("crypto.2B"));
+ Messages.getString("crypto.2B"));
}
try {
Cipher cipher = Cipher.getInstance(algName, providerName);
@@ -361,7 +361,7 @@
ASN1PrivateKeyInfo.verify(decryptedData);
} catch (IOException e1) {
throw new InvalidKeyException(
- Messages.getString("crypto.29"));
+ Messages.getString("crypto.29"));
}
return new PKCS8EncodedKeySpec(decryptedData);
} catch (NoSuchPaddingException e) {
@@ -399,10 +399,10 @@
throws NoSuchAlgorithmException,
InvalidKeyException {
if (decryptKey == null) {
- throw new NullPointerException(Messages.getString("crypto.2A"));
+ throw new NullPointerException(Messages.getString("crypto.2A"));
}
if (provider == null) {
- throw new NullPointerException(Messages.getString("crypto.2C"));
+ throw new NullPointerException(Messages.getString("crypto.2C"));
}
try {
Cipher cipher = Cipher.getInstance(algName, provider);
@@ -416,7 +416,7 @@
ASN1PrivateKeyInfo.verify(decryptedData);
} catch (IOException e1) {
throw new InvalidKeyException(
- Messages.getString("crypto.29"));
+ Messages.getString("crypto.29"));
}
return new PKCS8EncodedKeySpec(decryptedData);
} catch (NoSuchPaddingException e) {
@@ -498,15 +498,15 @@
//
private static final byte[] nullParam = new byte[] { 5, 0 };
-
+
private static final ASN1Sequence asn1 = new ASN1Sequence(new ASN1Type[] {
AlgorithmIdentifier.ASN1, ASN1OctetString.getInstance() }) {
@Override
protected void getValues(Object object, Object[] values) {
-
+
EncryptedPrivateKeyInfo epki = (EncryptedPrivateKeyInfo) object;
-
+
try {
byte[] algParmsEncoded = (epki.algParameters == null) ? nullParam
: epki.algParameters.getEncoded();
@@ -523,7 +523,7 @@
// (as defined in PKCS #8: Private-Key Information Syntax Standard
// http://www.ietf.org/rfc/rfc2313.txt)
//
- //
+ //
// PrivateKeyInfo ::= SEQUENCE {
// version Version,
// privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
diff --git a/luni/src/main/java/javax/crypto/ExemptionMechanism.java b/luni/src/main/java/javax/crypto/ExemptionMechanism.java
index a746d6e..394bcc5 100644
--- a/luni/src/main/java/javax/crypto/ExemptionMechanism.java
+++ b/luni/src/main/java/javax/crypto/ExemptionMechanism.java
@@ -100,7 +100,7 @@
public static final ExemptionMechanism getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -132,14 +132,14 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
throw new NoSuchProviderException(provider);
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
return getInstance(algorithm, impProvider);
}
@@ -164,10 +164,10 @@
public static final ExemptionMechanism getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/javax/crypto/ExemptionMechanismException.java b/luni/src/main/java/javax/crypto/ExemptionMechanismException.java
index d094ac3..6be90d7 100644
--- a/luni/src/main/java/javax/crypto/ExemptionMechanismException.java
+++ b/luni/src/main/java/javax/crypto/ExemptionMechanismException.java
@@ -32,7 +32,7 @@
/**
* Creates a new {@code ExemptionMechanismException} with the specified
* message.
- *
+ *
* @param msg
* the exception message.
*/
diff --git a/luni/src/main/java/javax/crypto/IllegalBlockSizeException.java b/luni/src/main/java/javax/crypto/IllegalBlockSizeException.java
index 0766b7c..0fd5a83 100644
--- a/luni/src/main/java/javax/crypto/IllegalBlockSizeException.java
+++ b/luni/src/main/java/javax/crypto/IllegalBlockSizeException.java
@@ -33,7 +33,7 @@
/**
* Creates a new {@code IllegalBlockSizeException} with the specified
* message.
- *
+ *
* @param msg
* the message
*/
diff --git a/luni/src/main/java/javax/crypto/KeyAgreement.java b/luni/src/main/java/javax/crypto/KeyAgreement.java
index ee561a9..ac3d56c 100644
--- a/luni/src/main/java/javax/crypto/KeyAgreement.java
+++ b/luni/src/main/java/javax/crypto/KeyAgreement.java
@@ -38,7 +38,7 @@
public class KeyAgreement {
// Used to access common engine functionality
- private static final Engine engine = new Engine("KeyAgreement");
+ private static final Engine engine = new Engine("KeyAgreement");
// Store SecureRandom
private static final SecureRandom rndm = new SecureRandom();
@@ -101,7 +101,7 @@
public static final KeyAgreement getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -133,7 +133,7 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("crypto.03"));
+ throw new IllegalArgumentException(Messages.getString("crypto.03"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -163,10 +163,10 @@
public static final KeyAgreement getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/javax/crypto/KeyGenerator.java b/luni/src/main/java/javax/crypto/KeyGenerator.java
index c15b1ca..e1ab725 100644
--- a/luni/src/main/java/javax/crypto/KeyGenerator.java
+++ b/luni/src/main/java/javax/crypto/KeyGenerator.java
@@ -36,7 +36,7 @@
public class KeyGenerator {
// Used to access common engine functionality
- private static final Engine engine = new Engine("KeyGenerator");
+ private static final Engine engine = new Engine("KeyGenerator");
// Store SecureRandom
private static final SecureRandom rndm = new SecureRandom();
@@ -100,7 +100,7 @@
public static final KeyGenerator getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -132,7 +132,7 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("crypto.03"));
+ throw new IllegalArgumentException(Messages.getString("crypto.03"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -161,10 +161,10 @@
public static final KeyGenerator getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/javax/crypto/KeyGeneratorSpi.java b/luni/src/main/java/javax/crypto/KeyGeneratorSpi.java
index edbbe43..b7cfe32 100644
--- a/luni/src/main/java/javax/crypto/KeyGeneratorSpi.java
+++ b/luni/src/main/java/javax/crypto/KeyGeneratorSpi.java
@@ -24,7 +24,7 @@
/**
* The <i>Service Provider Interface</i> (<b>SPI</b>) definition for the
* {@code KeyGenerator} class.
- *
+ *
* @see KeyGenerator
*/
public abstract class KeyGeneratorSpi {
diff --git a/luni/src/main/java/javax/crypto/Mac.java b/luni/src/main/java/javax/crypto/Mac.java
index 873c6b6..24552f9 100644
--- a/luni/src/main/java/javax/crypto/Mac.java
+++ b/luni/src/main/java/javax/crypto/Mac.java
@@ -38,7 +38,7 @@
public class Mac implements Cloneable {
//Used to access common engine functionality
- private static final Engine engine = new Engine("Mac");
+ private static final Engine engine = new Engine("Mac");
// Store used provider
private final Provider provider;
@@ -71,7 +71,7 @@
/**
* Returns the name of the MAC algorithm.
- *
+ *
* @return the name of the MAC algorithm.
*/
public final String getAlgorithm() {
@@ -90,7 +90,7 @@
/**
* Creates a new {@code Mac} instance that provides the specified MAC
* algorithm.
- *
+ *
* @param algorithm
* the name of the requested MAC algorithm.
* @return the new {@code Mac} instance.
@@ -103,7 +103,7 @@
public static final Mac getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -114,7 +114,7 @@
/**
* Creates a new {@code Mac} instance that provides the specified MAC
* algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the requested MAC algorithm.
* @param provider
@@ -134,7 +134,7 @@
public static final Mac getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("crypto.03"));
+ throw new IllegalArgumentException(Messages.getString("crypto.03"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -146,7 +146,7 @@
/**
* Creates a new {@code Mac} instance that provides the specified MAC
* algorithm from the specified provider.
- *
+ *
* @param algorithm
* the name of the requested MAC algorithm.
* @param provider
@@ -164,10 +164,10 @@
public static final Mac getInstance(String algorithm, Provider provider)
throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
@@ -202,7 +202,7 @@
public final void init(Key key, AlgorithmParameterSpec params)
throws InvalidKeyException, InvalidAlgorithmParameterException {
if (key == null) {
- throw new InvalidKeyException(Messages.getString("crypto.05"));
+ throw new InvalidKeyException(Messages.getString("crypto.05"));
}
spiImpl.engineInit(key, params);
isInitMac = true;
@@ -222,7 +222,7 @@
*/
public final void init(Key key) throws InvalidKeyException {
if (key == null) {
- throw new InvalidKeyException(Messages.getString("crypto.05"));
+ throw new InvalidKeyException(Messages.getString("crypto.05"));
}
try {
spiImpl.engineInit(key, null);
@@ -272,7 +272,7 @@
return;
}
if ((offset < 0) || (len < 0) || ((offset + len) > input.length)) {
- throw new IllegalArgumentException(Messages.getString("crypto.06"));
+ throw new IllegalArgumentException(Messages.getString("crypto.06"));
}
spiImpl.engineUpdate(input, offset, len);
}
@@ -311,7 +311,7 @@
if (input != null) {
spiImpl.engineUpdate(input);
} else {
- throw new IllegalArgumentException(Messages.getString("crypto.07"));
+ throw new IllegalArgumentException(Messages.getString("crypto.07"));
}
}
@@ -361,17 +361,17 @@
throw new IllegalStateException(Messages.getString("crypto.01"));
}
if (output == null) {
- throw new ShortBufferException(Messages.getString("crypto.08"));
+ throw new ShortBufferException(Messages.getString("crypto.08"));
}
if ((outOffset < 0) || (outOffset >= output.length)) {
- throw new ShortBufferException(Messages.getString("crypto.09",
+ throw new ShortBufferException(Messages.getString("crypto.09",
Integer.toString(outOffset)));
}
int t = spiImpl.engineGetMacLength();
if (t > (output.length - outOffset)) {
throw new ShortBufferException(
- Messages.getString("crypto.0A",
- Integer.toString(t)));
+ Messages.getString("crypto.0A",
+ Integer.toString(t)));
}
byte[] result = spiImpl.engineDoFinal();
System.arraycopy(result, 0, output, outOffset, result.length);
@@ -395,7 +395,7 @@
*/
public final byte[] doFinal(byte[] input) throws IllegalStateException {
if (!isInitMac) {
- throw new IllegalStateException(Messages.getString("crypto.0B"));
+ throw new IllegalStateException(Messages.getString("crypto.0B"));
}
if (input != null) {
spiImpl.engineUpdate(input, 0, input.length);
@@ -423,9 +423,9 @@
*/
@Override
public final Object clone() throws CloneNotSupportedException {
- MacSpi newSpiImpl = (MacSpi)spiImpl.clone();
+ MacSpi newSpiImpl = (MacSpi)spiImpl.clone();
Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm);
- mac.isInitMac = this.isInitMac;
+ mac.isInitMac = this.isInitMac;
return mac;
}
}
\ No newline at end of file
diff --git a/luni/src/main/java/javax/crypto/MacSpi.java b/luni/src/main/java/javax/crypto/MacSpi.java
index b2683d2..4e78a45 100644
--- a/luni/src/main/java/javax/crypto/MacSpi.java
+++ b/luni/src/main/java/javax/crypto/MacSpi.java
@@ -26,7 +26,7 @@
/**
* The <i>Service-Provider Interface</i> (<b>SPI</b>) definition for the {@code
* Mac} class.
- *
+ *
* @see Mac
*/
public abstract class MacSpi {
diff --git a/luni/src/main/java/javax/crypto/NoSuchPaddingException.java b/luni/src/main/java/javax/crypto/NoSuchPaddingException.java
index 55e1f1e..0abb181 100644
--- a/luni/src/main/java/javax/crypto/NoSuchPaddingException.java
+++ b/luni/src/main/java/javax/crypto/NoSuchPaddingException.java
@@ -33,7 +33,7 @@
/**
* Creates a new {@code NoSuchPaddingException} with the specified
* message.
- *
+ *
* @param msg
* the message.
*/
diff --git a/luni/src/main/java/javax/crypto/NullCipher.java b/luni/src/main/java/javax/crypto/NullCipher.java
index fadf3ae..3695617 100644
--- a/luni/src/main/java/javax/crypto/NullCipher.java
+++ b/luni/src/main/java/javax/crypto/NullCipher.java
@@ -41,9 +41,9 @@
public NullCipher() {
super(new NullCipherSpi(), null, null);
try {
- this.init(Cipher.ENCRYPT_MODE, (Key)null, (SecureRandom)null);
- } catch (InvalidKeyException e) {
+ this.init(Cipher.ENCRYPT_MODE, (Key)null, (SecureRandom)null);
+ } catch (InvalidKeyException e) {
}
}
-
+
}
diff --git a/luni/src/main/java/javax/crypto/SealedObject.java b/luni/src/main/java/javax/crypto/SealedObject.java
index 1f1ced8..e99fbd0 100644
--- a/luni/src/main/java/javax/crypto/SealedObject.java
+++ b/luni/src/main/java/javax/crypto/SealedObject.java
@@ -87,7 +87,7 @@
public SealedObject(Serializable object, Cipher c)
throws IOException, IllegalBlockSizeException {
if (c == null) {
- throw new NullPointerException(Messages.getString("crypto.13"));
+ throw new NullPointerException(Messages.getString("crypto.13"));
}
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -115,7 +115,7 @@
*/
protected SealedObject(SealedObject so) {
if (so == null) {
- throw new NullPointerException(Messages.getString("crypto.14"));
+ throw new NullPointerException(Messages.getString("crypto.14"));
}
this.encryptedContent = so.encryptedContent;
this.encodedParams = so.encodedParams;
@@ -215,7 +215,7 @@
throws IOException, ClassNotFoundException,
IllegalBlockSizeException, BadPaddingException {
if (c == null) {
- throw new NullPointerException(Messages.getString("crypto.13"));
+ throw new NullPointerException(Messages.getString("crypto.13"));
}
byte[] serialized = c.doFinal(encryptedContent);
ObjectInputStream ois =
@@ -250,7 +250,7 @@
InvalidKeyException {
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(
- Messages.getString("crypto.15"));
+ Messages.getString("crypto.15"));
}
try {
Cipher cipher = Cipher.getInstance(sealAlg, provider);
diff --git a/luni/src/main/java/javax/crypto/SecretKeyFactory.java b/luni/src/main/java/javax/crypto/SecretKeyFactory.java
index 9621bcb..1284143 100644
--- a/luni/src/main/java/javax/crypto/SecretKeyFactory.java
+++ b/luni/src/main/java/javax/crypto/SecretKeyFactory.java
@@ -44,7 +44,7 @@
public class SecretKeyFactory {
// Used to access common engine functionality
- private static final Engine engine = new Engine("SecretKeyFactory");
+ private static final Engine engine = new Engine("SecretKeyFactory");
// Store used provider
private final Provider provider;
@@ -105,7 +105,7 @@
public static final SecretKeyFactory getInstance(String algorithm)
throws NoSuchAlgorithmException {
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, null);
@@ -137,7 +137,7 @@
String provider) throws NoSuchAlgorithmException,
NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("crypto.03"));
+ throw new IllegalArgumentException(Messages.getString("crypto.03"));
}
Provider impProvider = Security.getProvider(provider);
if (impProvider == null) {
@@ -167,10 +167,10 @@
public static final SecretKeyFactory getInstance(String algorithm,
Provider provider) throws NoSuchAlgorithmException {
if (provider == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.04"));
+ throw new IllegalArgumentException(Messages.getString("crypto.04"));
}
if (algorithm == null) {
- throw new NullPointerException(Messages.getString("crypto.02"));
+ throw new NullPointerException(Messages.getString("crypto.02"));
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
diff --git a/luni/src/main/java/javax/crypto/ShortBufferException.java b/luni/src/main/java/javax/crypto/ShortBufferException.java
index 56480a8..1fdfc07 100644
--- a/luni/src/main/java/javax/crypto/ShortBufferException.java
+++ b/luni/src/main/java/javax/crypto/ShortBufferException.java
@@ -38,7 +38,7 @@
/**
* Creates a new instance of {@code ShortBufferException} with the
* specified message
- *
+ *
* @param msg
* the exception message.
*/
diff --git a/luni/src/main/java/javax/crypto/spec/DESKeySpec.java b/luni/src/main/java/javax/crypto/spec/DESKeySpec.java
index f20d268..4306aad 100644
--- a/luni/src/main/java/javax/crypto/spec/DESKeySpec.java
+++ b/luni/src/main/java/javax/crypto/spec/DESKeySpec.java
@@ -38,7 +38,7 @@
// Got from:
// FIP PUB 74
// FEDERAL INFORMATION PROCESSING STANDARDS PUBLICATION 1981
- // GUIDELINES FOR IMPLEMENTING AND USING THE NBS DATA ENCRYPTION STANDARD
+ // GUIDELINES FOR IMPLEMENTING AND USING THE NBS DATA ENCRYPTION STANDARD
// http://www.dice.ucl.ac.be/crypto/standards/fips/fip74/fip74-1.pdf
private static final byte[][] SEMIWEAKS = {
{(byte) 0xE0, (byte) 0x01, (byte) 0xE0, (byte) 0x01,
@@ -77,7 +77,7 @@
{(byte) 0xFE, (byte) 0xE0, (byte) 0xFE, (byte) 0xE0,
(byte) 0xFE, (byte) 0xF1, (byte) 0xFE, (byte) 0xF1},
- {(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
+ {(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01,
(byte) 0x01, (byte) 0x01, (byte) 0x01, (byte) 0x01},
{(byte) 0xFE, (byte) 0xFE, (byte) 0xFE, (byte) 0xFE,
@@ -119,11 +119,11 @@
public DESKeySpec(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
- throw new NullPointerException(Messages.getString("crypto.2F"));
+ throw new NullPointerException(Messages.getString("crypto.2F"));
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.40"));
+ Messages.getString("crypto.40"));
}
this.key = new byte[DES_KEY_LEN];
System.arraycopy(key, offset, this.key, 0, DES_KEY_LEN);
@@ -157,11 +157,11 @@
public static boolean isParityAdjusted(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
- throw new InvalidKeyException(Messages.getString("crypto.2F"));
+ throw new InvalidKeyException(Messages.getString("crypto.2F"));
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.40"));
+ Messages.getString("crypto.40"));
}
int byteKey = 0;
@@ -196,11 +196,11 @@
public static boolean isWeak(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
- throw new InvalidKeyException(Messages.getString("crypto.2F"));
+ throw new InvalidKeyException(Messages.getString("crypto.2F"));
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.40"));
+ Messages.getString("crypto.40"));
}
I:
for (int i=0; i<SEMIWEAKS.length; i++) {
diff --git a/luni/src/main/java/javax/crypto/spec/DESedeKeySpec.java b/luni/src/main/java/javax/crypto/spec/DESedeKeySpec.java
index 8cca4b9..8b68798 100644
--- a/luni/src/main/java/javax/crypto/spec/DESedeKeySpec.java
+++ b/luni/src/main/java/javax/crypto/spec/DESedeKeySpec.java
@@ -48,11 +48,11 @@
public DESedeKeySpec(byte[] key)
throws InvalidKeyException {
if (key == null) {
- throw new NullPointerException(Messages.getString("crypto.2F"));
+ throw new NullPointerException(Messages.getString("crypto.2F"));
}
if (key.length < DES_EDE_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.30"));
+ Messages.getString("crypto.30"));
}
this.key = new byte[DES_EDE_KEY_LEN];
System.arraycopy(key, 0, this.key, 0, DES_EDE_KEY_LEN);
@@ -76,11 +76,11 @@
public DESedeKeySpec(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
- throw new NullPointerException(Messages.getString("crypto.2F"));
+ throw new NullPointerException(Messages.getString("crypto.2F"));
}
if (key.length - offset < DES_EDE_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.30"));
+ Messages.getString("crypto.30"));
}
this.key = new byte[DES_EDE_KEY_LEN];
System.arraycopy(key, offset, this.key, 0, DES_EDE_KEY_LEN);
@@ -115,7 +115,7 @@
throws InvalidKeyException {
if (key.length - offset < DES_EDE_KEY_LEN) {
throw new InvalidKeyException(
- Messages.getString("crypto.30"));
+ Messages.getString("crypto.30"));
}
for (int i=offset; i<DES_EDE_KEY_LEN+offset; i++) {
int b = key[i];
diff --git a/luni/src/main/java/javax/crypto/spec/IvParameterSpec.java b/luni/src/main/java/javax/crypto/spec/IvParameterSpec.java
index a55a77b..5b066ce 100644
--- a/luni/src/main/java/javax/crypto/spec/IvParameterSpec.java
+++ b/luni/src/main/java/javax/crypto/spec/IvParameterSpec.java
@@ -43,7 +43,7 @@
*/
public IvParameterSpec(byte[] iv) {
if (iv == null) {
- throw new NullPointerException(Messages.getString("crypto.38"));
+ throw new NullPointerException(Messages.getString("crypto.38"));
}
this.iv = new byte[iv.length];
System.arraycopy(iv, 0, this.iv, 0, iv.length);
@@ -70,10 +70,10 @@
public IvParameterSpec(byte[] iv, int offset, int len) {
if ((iv == null) || (iv.length - offset < len)) {
throw new IllegalArgumentException(
- Messages.getString("crypto.39"));
+ Messages.getString("crypto.39"));
}
if (offset < 0 || len < 0) {
- throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.3A"));
+ throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.3A"));
}
this.iv = new byte[len];
System.arraycopy(iv, offset, this.iv, 0, len);
diff --git a/luni/src/main/java/javax/crypto/spec/OAEPParameterSpec.java b/luni/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
index d500b81..7881834 100644
--- a/luni/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
+++ b/luni/src/main/java/javax/crypto/spec/OAEPParameterSpec.java
@@ -47,8 +47,8 @@
public static final OAEPParameterSpec DEFAULT = new OAEPParameterSpec();
private OAEPParameterSpec() {
- this.mdName = "SHA-1";
- this.mgfName = "MGF1";
+ this.mdName = "SHA-1";
+ this.mgfName = "MGF1";
this.mgfSpec = MGF1ParameterSpec.SHA1;
this.pSrc = PSource.PSpecified.DEFAULT;
}
diff --git a/luni/src/main/java/javax/crypto/spec/PBEKeySpec.java b/luni/src/main/java/javax/crypto/spec/PBEKeySpec.java
index a86aed3..cc2ab08 100644
--- a/luni/src/main/java/javax/crypto/spec/PBEKeySpec.java
+++ b/luni/src/main/java/javax/crypto/spec/PBEKeySpec.java
@@ -74,17 +74,17 @@
public PBEKeySpec(char[] password, byte[] salt, int iterationCount,
int keyLength) {
if (salt == null) {
- throw new NullPointerException(Messages.getString("crypto.3B"));
+ throw new NullPointerException(Messages.getString("crypto.3B"));
}
if (salt.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.3C"));
+ throw new IllegalArgumentException(Messages.getString("crypto.3C"));
}
if (iterationCount <= 0) {
throw new IllegalArgumentException(
- Messages.getString("crypto.3D"));
+ Messages.getString("crypto.3D"));
}
if (keyLength <= 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.3E"));
+ throw new IllegalArgumentException(Messages.getString("crypto.3E"));
}
if (password == null) {
@@ -116,14 +116,14 @@
*/
public PBEKeySpec(char[] password, byte[] salt, int iterationCount) {
if (salt == null) {
- throw new NullPointerException(Messages.getString("crypto.3B"));
+ throw new NullPointerException(Messages.getString("crypto.3B"));
}
if (salt.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.3C"));
+ throw new IllegalArgumentException(Messages.getString("crypto.3C"));
}
if (iterationCount <= 0) {
throw new IllegalArgumentException(
- Messages.getString("crypto.3D"));
+ Messages.getString("crypto.3D"));
}
if (password == null) {
@@ -155,7 +155,7 @@
*/
public final char[] getPassword() {
if (password == null) {
- throw new IllegalStateException(Messages.getString("crypto.3F"));
+ throw new IllegalStateException(Messages.getString("crypto.3F"));
}
char[] result = new char[password.length];
System.arraycopy(password, 0, result, 0, password.length);
diff --git a/luni/src/main/java/javax/crypto/spec/PBEParameterSpec.java b/luni/src/main/java/javax/crypto/spec/PBEParameterSpec.java
index eaa2034..f91961e 100644
--- a/luni/src/main/java/javax/crypto/spec/PBEParameterSpec.java
+++ b/luni/src/main/java/javax/crypto/spec/PBEParameterSpec.java
@@ -47,7 +47,7 @@
*/
public PBEParameterSpec(byte[] salt, int iterationCount) {
if (salt == null) {
- throw new NullPointerException(Messages.getString("crypto.3B"));
+ throw new NullPointerException(Messages.getString("crypto.3B"));
}
this.salt = new byte[salt.length];
System.arraycopy(salt, 0, this.salt, 0, salt.length);
diff --git a/luni/src/main/java/javax/crypto/spec/PSource.java b/luni/src/main/java/javax/crypto/spec/PSource.java
index 339cda5..2671e22 100644
--- a/luni/src/main/java/javax/crypto/spec/PSource.java
+++ b/luni/src/main/java/javax/crypto/spec/PSource.java
@@ -40,7 +40,7 @@
*/
protected PSource(String pSrcName) {
if (pSrcName == null) {
- throw new NullPointerException(Messages.getString("crypto.42"));
+ throw new NullPointerException(Messages.getString("crypto.42"));
}
this.pSrcName = pSrcName;
}
@@ -69,7 +69,7 @@
public static final PSpecified DEFAULT = new PSpecified();
private PSpecified() {
- super("PSpecified");
+ super("PSpecified");
p = new byte[0];
}
@@ -83,9 +83,9 @@
* if <code>p</code> is null.
*/
public PSpecified(byte[] p) {
- super("PSpecified");
+ super("PSpecified");
if (p == null) {
- throw new NullPointerException(Messages.getString("crypto.43"));
+ throw new NullPointerException(Messages.getString("crypto.43"));
}
//TODO: It is unknown which name should be used!
//super("");
diff --git a/luni/src/main/java/javax/crypto/spec/RC2ParameterSpec.java b/luni/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
index c5e55c2..aa28d56 100644
--- a/luni/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
+++ b/luni/src/main/java/javax/crypto/spec/RC2ParameterSpec.java
@@ -59,10 +59,10 @@
*/
public RC2ParameterSpec(int effectiveKeyBits, byte[] iv) {
if (iv == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.31"));
+ throw new IllegalArgumentException(Messages.getString("crypto.31"));
}
if (iv.length < 8) {
- throw new IllegalArgumentException(Messages.getString("crypto.41"));
+ throw new IllegalArgumentException(Messages.getString("crypto.41"));
}
this.effectiveKeyBits = effectiveKeyBits;
this.iv = new byte[8];
@@ -89,10 +89,10 @@
*/
public RC2ParameterSpec(int effectiveKeyBits, byte[] iv, int offset) {
if (iv == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.31"));
+ throw new IllegalArgumentException(Messages.getString("crypto.31"));
}
if (iv.length - offset < 8) {
- throw new IllegalArgumentException(Messages.getString("crypto.41"));
+ throw new IllegalArgumentException(Messages.getString("crypto.41"));
}
this.effectiveKeyBits = effectiveKeyBits;
this.iv = new byte[8];
diff --git a/luni/src/main/java/javax/crypto/spec/RC5ParameterSpec.java b/luni/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
index 3813ac2..ba0f128 100644
--- a/luni/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
+++ b/luni/src/main/java/javax/crypto/spec/RC5ParameterSpec.java
@@ -74,11 +74,11 @@
*/
public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) {
if (iv == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.31"));
+ throw new IllegalArgumentException(Messages.getString("crypto.31"));
}
if (iv.length < 2 * (wordSize / 8)) {
throw new IllegalArgumentException(
- Messages.getString("crypto.32"));
+ Messages.getString("crypto.32"));
}
this.version = version;
this.rounds = rounds;
@@ -115,14 +115,14 @@
public RC5ParameterSpec(int version, int rounds,
int wordSize, byte[] iv, int offset) {
if (iv == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.31"));
+ throw new IllegalArgumentException(Messages.getString("crypto.31"));
}
if (offset < 0) {
- throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.33"));
+ throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.33"));
}
if (iv.length - offset < 2 * (wordSize / 8)) {
throw new IllegalArgumentException(
- Messages.getString("crypto.34"));
+ Messages.getString("crypto.34"));
}
this.version = version;
this.rounds = rounds;
diff --git a/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java b/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
index 14dd978..b70ce48 100644
--- a/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
+++ b/luni/src/main/java/javax/crypto/spec/SecretKeySpec.java
@@ -43,7 +43,7 @@
private final byte[] key;
private final String algorithm;
- private final String format = "RAW";
+ private final String format = "RAW";
/**
* Creates a new <code>SecretKeySpec</code> for the specified key data and
@@ -59,13 +59,13 @@
*/
public SecretKeySpec(byte[] key, String algorithm) {
if (key == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.05"));
+ throw new IllegalArgumentException(Messages.getString("crypto.05"));
}
if (key.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.35"));
+ throw new IllegalArgumentException(Messages.getString("crypto.35"));
}
if (algorithm == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.02"));
+ throw new IllegalArgumentException(Messages.getString("crypto.02"));
}
this.algorithm = algorithm;
@@ -95,21 +95,21 @@
*/
public SecretKeySpec(byte[] key, int offset, int len, String algorithm) {
if (key == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.05"));
+ throw new IllegalArgumentException(Messages.getString("crypto.05"));
}
if (key.length == 0) {
- throw new IllegalArgumentException(Messages.getString("crypto.35"));
+ throw new IllegalArgumentException(Messages.getString("crypto.35"));
}
// BEGIN android-changed
if (len < 0 || offset < 0) {
- throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.36"));
+ throw new ArrayIndexOutOfBoundsException(Messages.getString("crypto.36"));
}
// END android-changed
if ((key.length - offset < len)) {
- throw new IllegalArgumentException(Messages.getString("crypto.37"));
+ throw new IllegalArgumentException(Messages.getString("crypto.37"));
}
if (algorithm == null) {
- throw new IllegalArgumentException(Messages.getString("crypto.02"));
+ throw new IllegalArgumentException(Messages.getString("crypto.02"));
}
this.algorithm = algorithm;
this.key = new byte[len];
diff --git a/luni/src/main/java/javax/net/ssl/CertPathTrustManagerParameters.java b/luni/src/main/java/javax/net/ssl/CertPathTrustManagerParameters.java
index dcf7a4d..6207088 100644
--- a/luni/src/main/java/javax/net/ssl/CertPathTrustManagerParameters.java
+++ b/luni/src/main/java/javax/net/ssl/CertPathTrustManagerParameters.java
@@ -32,7 +32,7 @@
/**
* Creates a new {@code CertPathTrustManagerParameters} with the specified
* certification path parameters.
- *
+ *
* @param parameters
* the certification path parameters.
*/
@@ -42,7 +42,7 @@
/**
* Returns a copy of the certification path parameters.
- *
+ *
* @return a copy of the certification path parameters.
*/
public CertPathParameters getParameters() {
diff --git a/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java b/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
index 779c46a..fb495a6 100644
--- a/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
+++ b/luni/src/main/java/javax/net/ssl/DefaultHostnameVerifier.java
@@ -52,10 +52,10 @@
* The hostname must match either the first CN, or any of the subject-alts.
* A wildcard can occur in the CN, and in any of the subject-alts.
* <p/>
- * The only difference between BROWSER_COMPATIBLE and STRICT is that a wildcard
- * (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains,
+ * The only difference between BROWSER_COMPATIBLE and STRICT is that a wildcard
+ * (such as "*.foo.com") with BROWSER_COMPATIBLE matches all subdomains,
* including "a.b.foo.com".
- *
+ *
* @author Julius Davies
*/
class DefaultHostnameVerifier implements HostnameVerifier {
@@ -183,7 +183,7 @@
}
}
if(!match) {
- throw new SSLException("hostname in certificate didn't match: <" +
+ throw new SSLException("hostname in certificate didn't match: <" +
host + "> !=" + buf);
}
}
@@ -320,10 +320,10 @@
* @throws SSLException If verification failed.
*/
public final void verify(
- final String host,
+ final String host,
final String[] cns,
final String[] subjectAlts) throws SSLException {
verify(host, cns, subjectAlts, false);
}
-
+
}
diff --git a/luni/src/main/java/javax/net/ssl/DefaultSSLContext.java b/luni/src/main/java/javax/net/ssl/DefaultSSLContext.java
index a12d385..bcb51ff 100644
--- a/luni/src/main/java/javax/net/ssl/DefaultSSLContext.java
+++ b/luni/src/main/java/javax/net/ssl/DefaultSSLContext.java
@@ -54,12 +54,12 @@
SSLContext con = new SSLContext((SSLContextSpi) service.newInstance(null),
service.getProvider(), service.getAlgorithm());
- /*
- * TODO
- * javax.net.ssl.keyStoreProvider,
+ /*
+ * TODO
+ * javax.net.ssl.keyStoreProvider,
* javax.net.ssl.trustStoreProvider system property
*/
-
+
// find KeyStore, KeyManagers
KeyManager[] keyManagers = null;
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
diff --git a/luni/src/main/java/javax/net/ssl/DefaultSSLSocketFactory.java b/luni/src/main/java/javax/net/ssl/DefaultSSLSocketFactory.java
index 4035a0e..a44404fc 100644
--- a/luni/src/main/java/javax/net/ssl/DefaultSSLSocketFactory.java
+++ b/luni/src/main/java/javax/net/ssl/DefaultSSLSocketFactory.java
@@ -25,7 +25,7 @@
/**
* Default inoperative implementation of javax.net.ssl.SSLSocketFactory
- *
+ *
*/
class DefaultSSLSocketFactory extends SSLSocketFactory {
diff --git a/luni/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java b/luni/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
index 39925f9..cc66d9b 100644
--- a/luni/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
+++ b/luni/src/main/java/javax/net/ssl/KeyManagerFactorySpi.java
@@ -28,7 +28,7 @@
* {@code KeyManagerFactory} class.
*/
public abstract class KeyManagerFactorySpi {
-
+
/**
* Creates a new {@code KeyManagerFactorySpi} instance.
*/
diff --git a/luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java b/luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java
index d30cc8a..899da70 100644
--- a/luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java
+++ b/luni/src/main/java/javax/net/ssl/KeyStoreBuilderParameters.java
@@ -36,7 +36,7 @@
/**
* Creates a new {@code KeyStoreBuilderParameters} with the specified key
* store builder.
- *
+ *
* @param builder
* the key store builder.
*/
@@ -48,7 +48,7 @@
/**
* Creates a new {@code KeyStoreBuilderParameters} with the specified list
* of {@code KeyStore.Builder}s.
- *
+ *
* @param parameters
* the list of key store builders
* @throws IllegalArgumentException
@@ -69,7 +69,7 @@
/**
* Returns the unmodifiable list of {@code KeyStore.Builder}s associated
* with this parameters instance.
- *
+ *
* @return the unmodifiable list of {@code KeyStore.Builder}s.
*/
@SuppressWarnings("unchecked")
diff --git a/luni/src/main/java/javax/net/ssl/SSLEngine.java b/luni/src/main/java/javax/net/ssl/SSLEngine.java
index 46e11a4..21a956c 100644
--- a/luni/src/main/java/javax/net/ssl/SSLEngine.java
+++ b/luni/src/main/java/javax/net/ssl/SSLEngine.java
@@ -363,7 +363,7 @@
* Decodes the incoming network data buffer into the application data
* buffer. If a handshake has not been started yet, it will automatically be
* started.
- *
+ *
* @param src
* the buffer with incoming network data
* @param dst
@@ -415,7 +415,7 @@
* Encodes the outgoing application data buffers into the network data
* buffer. If a handshake has not been started yet, it will automatically be
* started.
- *
+ *
* @param srcs
* the array of source buffers of outgoing application data.
* @param dst
@@ -442,7 +442,7 @@
* Encodes the outgoing application data buffer into the network data
* buffer. If a handshake has not been started yet, it will automatically be
* started.
- *
+ *
* @param src
* the source buffers of outgoing application data.
* @param dst
diff --git a/luni/src/main/java/javax/security/auth/AuthPermission.java b/luni/src/main/java/javax/security/auth/AuthPermission.java
index 84db4bf..124c57f 100644
--- a/luni/src/main/java/javax/security/auth/AuthPermission.java
+++ b/luni/src/main/java/javax/security/auth/AuthPermission.java
@@ -56,15 +56,15 @@
private static final long serialVersionUID = 5806031445061587174L;
- private static final String CREATE_LOGIN_CONTEXT = "createLoginContext";
+ private static final String CREATE_LOGIN_CONTEXT = "createLoginContext";
- private static final String CREATE_LOGIN_CONTEXT_ANY = "createLoginContext.*";
+ private static final String CREATE_LOGIN_CONTEXT_ANY = "createLoginContext.*";
// inits permission name.
private static String init(String name) {
if (name == null) {
- throw new NullPointerException(Messages.getString("auth.13"));
+ throw new NullPointerException(Messages.getString("auth.13"));
}
if (CREATE_LOGIN_CONTEXT.equals(name)) {
diff --git a/luni/src/main/java/javax/security/auth/PrivateCredentialPermission.java b/luni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
index b947590..77a1d97 100644
--- a/luni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
+++ b/luni/src/main/java/javax/security/auth/PrivateCredentialPermission.java
@@ -54,16 +54,16 @@
private static final long serialVersionUID = 5284372143517237068L;
// allowed action
- private static final String READ = "read";
+ private static final String READ = "read";
private String credentialClass;
- // current offset
+ // current offset
private transient int offset;
// owners set
private transient CredOwner[] set;
-
+
/**
* Creates a new permission for private credentials specified by the target
* name {@code name} and an {@code action}. The action is always
@@ -79,14 +79,14 @@
if (READ.equalsIgnoreCase(action)) {
initTargetName(name);
} else {
- throw new IllegalArgumentException(Messages.getString("auth.11"));
+ throw new IllegalArgumentException(Messages.getString("auth.11"));
}
}
/**
* Creates a {@code PrivateCredentialPermission} from the {@code Credential}
* class and set of principals.
- *
+ *
* @param credentialClass
* the credential class name.
* @param principals
@@ -121,19 +121,19 @@
private void initTargetName(String name) {
if (name == null) {
- throw new NullPointerException(Messages.getString("auth.0E"));
+ throw new NullPointerException(Messages.getString("auth.0E"));
}
// check empty string
name = name.trim();
if (name.length() == 0) {
- throw new IllegalArgumentException(Messages.getString("auth.0F"));
+ throw new IllegalArgumentException(Messages.getString("auth.0F"));
}
// get CredentialClass
int beg = name.indexOf(' ');
if (beg == -1) {
- throw new IllegalArgumentException(Messages.getString("auth.10"));
+ throw new IllegalArgumentException(Messages.getString("auth.10"));
}
credentialClass = name.substring(0, beg);
@@ -146,13 +146,13 @@
j = name.indexOf('"', i + 2);
if (i == -1 || j == -1 || name.charAt(i + 1) != '"') {
- throw new IllegalArgumentException(Messages.getString("auth.10"));
+ throw new IllegalArgumentException(Messages.getString("auth.10"));
}
}
// name MUST have one pair at least
if (count < 1) {
- throw new IllegalArgumentException(Messages.getString("auth.10"));
+ throw new IllegalArgumentException(Messages.getString("auth.10"));
}
beg = name.indexOf(' ');
@@ -265,7 +265,7 @@
PrivateCredentialPermission that = (PrivateCredentialPermission) permission;
- if (!("*".equals(credentialClass) || credentialClass
+ if (!("*".equals(credentialClass) || credentialClass
.equals(that.getCredentialClass()))) {
return false;
}
@@ -337,26 +337,26 @@
// whether pname contains wildcards
private transient boolean isPNameWildcard;
- // Creates a new CredOwner with the specified Principal Class and Principal Name
+ // Creates a new CredOwner with the specified Principal Class and Principal Name
CredOwner(String principalClass, String principalName) {
super();
- if ("*".equals(principalClass)) {
+ if ("*".equals(principalClass)) {
isClassWildcard = true;
}
- if ("*".equals(principalName)) {
+ if ("*".equals(principalName)) {
isPNameWildcard = true;
}
if (isClassWildcard && !isPNameWildcard) {
- throw new IllegalArgumentException(Messages.getString("auth.12"));
+ throw new IllegalArgumentException(Messages.getString("auth.12"));
}
this.principalClass = principalClass;
this.principalName = principalName;
}
- // Checks if this CredOwner implies the specified Object.
+ // Checks if this CredOwner implies the specified Object.
boolean implies(Object obj) {
if (obj == this) {
return true;
@@ -372,7 +372,7 @@
return false;
}
- // Checks two CredOwner objects for equality.
+ // Checks two CredOwner objects for equality.
@Override
public boolean equals(Object obj) {
return principalClass.equals(((CredOwner) obj).principalClass)
diff --git a/luni/src/main/java/javax/security/auth/Subject.java b/luni/src/main/java/javax/security/auth/Subject.java
index b0632d4..29a46ca 100644
--- a/luni/src/main/java/javax/security/auth/Subject.java
+++ b/luni/src/main/java/javax/security/auth/Subject.java
@@ -55,37 +55,37 @@
public final class Subject implements Serializable {
private static final long serialVersionUID = -8308522755600156056L;
-
- private static final AuthPermission _AS = new AuthPermission("doAs");
+
+ private static final AuthPermission _AS = new AuthPermission("doAs");
private static final AuthPermission _AS_PRIVILEGED = new AuthPermission(
- "doAsPrivileged");
+ "doAsPrivileged");
private static final AuthPermission _SUBJECT = new AuthPermission(
- "getSubject");
+ "getSubject");
private static final AuthPermission _PRINCIPALS = new AuthPermission(
- "modifyPrincipals");
+ "modifyPrincipals");
private static final AuthPermission _PRIVATE_CREDENTIALS = new AuthPermission(
- "modifyPrivateCredentials");
+ "modifyPrivateCredentials");
private static final AuthPermission _PUBLIC_CREDENTIALS = new AuthPermission(
- "modifyPublicCredentials");
+ "modifyPublicCredentials");
private static final AuthPermission _READ_ONLY = new AuthPermission(
- "setReadOnly");
+ "setReadOnly");
private final Set<Principal> principals;
private boolean readOnly;
-
+
// set of private credentials
private transient SecureSet<Object> privateCredentials;
// set of public credentials
private transient SecureSet<Object> publicCredentials;
-
+
/**
* The default constructor initializing the sets of public and private
* credentials and principals with the empty set.
@@ -430,18 +430,18 @@
@Override
public String toString() {
- StringBuffer buf = new StringBuffer("Subject:\n");
+ StringBuffer buf = new StringBuffer("Subject:\n");
Iterator<?> it = principals.iterator();
while (it.hasNext()) {
- buf.append("\tPrincipal: ");
+ buf.append("\tPrincipal: ");
buf.append(it.next());
buf.append('\n');
}
it = publicCredentials.iterator();
while (it.hasNext()) {
- buf.append("\tPublic Credential: ");
+ buf.append("\tPublic Credential: ");
buf.append(it.next());
buf.append('\n');
}
@@ -450,13 +450,13 @@
it = privateCredentials.iterator();
try {
while (it.hasNext()) {
- buf.append("\tPrivate Credential: ");
+ buf.append("\tPrivate Credential: ");
buf.append(it.next());
buf.append('\n');
}
} catch (SecurityException e) {
buf.delete(offset, buf.length());
- buf.append("\tPrivate Credentials: no accessible information\n");
+ buf.append("\tPrivate Credentials: no accessible information\n");
}
return buf.toString();
}
@@ -487,7 +487,7 @@
public static Subject getSubject(final AccessControlContext context) {
checkPermission(_SUBJECT);
if (context == null) {
- throw new NullPointerException(Messages.getString("auth.09"));
+ throw new NullPointerException(Messages.getString("auth.09"));
}
PrivilegedAction<DomainCombiner> action = new PrivilegedAction<DomainCombiner>() {
public DomainCombiner run() {
@@ -513,7 +513,7 @@
// FIXME is used only in two places. remove?
private void checkState() {
if (readOnly) {
- throw new IllegalStateException(Messages.getString("auth.0A"));
+ throw new IllegalStateException(Messages.getString("auth.0A"));
}
}
@@ -528,14 +528,14 @@
/*
* Is used to define a set type for serialization.
- *
+ *
* A type can be principal, priv. or pub. credential set. The spec.
* doesn't clearly says that priv. and pub. credential sets can be
* serialized and what classes they are. It is only possible to figure
* out from writeObject method comments that priv. credential set is
* serializable and it is an instance of SecureSet class. So pub.
* credential was implemented by analogy
- *
+ *
* Compatibility issue: the class follows its specified serial form.
* Also according to the serialization spec. adding new field is a
* compatible change. So is ok for principal set (because the default
@@ -569,8 +569,8 @@
// Subject's constructor receives a Set, we can trusts if a set is from bootclasspath,
// and not to check whether it contains duplicates or not
- boolean trust = s.getClass().getClassLoader() == null;
-
+ boolean trust = s.getClass().getClassLoader() == null;
+
Iterator<? extends SST> it = s.iterator();
while (it.hasNext()) {
SST o = it.next();
@@ -588,7 +588,7 @@
throw new NullPointerException();
}
if (permission == _PRINCIPALS && !(Principal.class.isAssignableFrom(o.getClass()))) {
- throw new IllegalArgumentException(Messages.getString("auth.0B"));
+ throw new IllegalArgumentException(Messages.getString("auth.0B"));
}
}
@@ -669,7 +669,7 @@
if (!c.isAssignableFrom(o.getClass())) {
throw new IllegalArgumentException(
- Messages.getString("auth.0C", c.getName()));
+ Messages.getString("auth.0C", c.getName()));
}
if (elements.contains(o)) {
diff --git a/luni/src/main/java/javax/security/auth/SubjectDomainCombiner.java b/luni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
index cd24927..7d990a1 100644
--- a/luni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
+++ b/luni/src/main/java/javax/security/auth/SubjectDomainCombiner.java
@@ -33,7 +33,7 @@
// permission required to get a subject object
private static final AuthPermission _GET = new AuthPermission(
- "getSubjectFromDomainCombiner");
+ "getSubjectFromDomainCombiner");
/**
* Creates a domain combiner for the entity provided in {@code subject}.
diff --git a/luni/src/main/java/javax/security/auth/callback/PasswordCallback.java b/luni/src/main/java/javax/security/auth/callback/PasswordCallback.java
index 3be2626..451a19f 100644
--- a/luni/src/main/java/javax/security/auth/callback/PasswordCallback.java
+++ b/luni/src/main/java/javax/security/auth/callback/PasswordCallback.java
@@ -38,7 +38,7 @@
private void setPrompt(String prompt) throws IllegalArgumentException {
if (prompt == null || prompt.length() == 0) {
- throw new IllegalArgumentException(Messages.getString("auth.14"));
+ throw new IllegalArgumentException(Messages.getString("auth.14"));
}
this.prompt = prompt;
}
diff --git a/luni/src/main/java/javax/security/auth/x500/X500Principal.java b/luni/src/main/java/javax/security/auth/x500/X500Principal.java
index 3a8eaa5..e4bdf19 100644
--- a/luni/src/main/java/javax/security/auth/x500/X500Principal.java
+++ b/luni/src/main/java/javax/security/auth/x500/X500Principal.java
@@ -43,19 +43,19 @@
* Defines a constant for the canonical string format of distinguished
* names.
*/
- public static final String CANONICAL = "CANONICAL";
+ public static final String CANONICAL = "CANONICAL";
/**
* Defines a constant for the RFC 1779 string format of distinguished
* names.
*/
- public static final String RFC1779 = "RFC1779";
+ public static final String RFC1779 = "RFC1779";
/**
* Defines a constant for the RFC 2253 string format of distinguished
* names.
*/
- public static final String RFC2253 = "RFC2253";
+ public static final String RFC2253 = "RFC2253";
//Distinguished Name
private transient Name dn;
@@ -73,14 +73,14 @@
public X500Principal(byte[] name) {
super();
if (name == null) {
- throw new IllegalArgumentException(Messages.getString("auth.00"));
+ throw new IllegalArgumentException(Messages.getString("auth.00"));
}
try {
// FIXME dn = new Name(name);
dn = (Name) Name.ASN1.decode(name);
} catch (IOException e) {
IllegalArgumentException iae = new IllegalArgumentException(Messages
- .getString("auth.2B"));
+ .getString("auth.2B"));
iae.initCause(e);
throw iae;
}
@@ -100,14 +100,14 @@
public X500Principal(InputStream in) {
super();
if (in == null) {
- throw new NullPointerException(Messages.getString("auth.2C"));
+ throw new NullPointerException(Messages.getString("auth.2C"));
}
try {
// FIXME dn = new Name(is);
dn = (Name) Name.ASN1.decode(in);
} catch (IOException e) {
IllegalArgumentException iae = new IllegalArgumentException(Messages
- .getString("auth.2B"));
+ .getString("auth.2B"));
iae.initCause(e);
throw iae;
}
@@ -127,13 +127,13 @@
public X500Principal(String name) {
super();
if (name == null) {
- throw new NullPointerException(Messages.getString("auth.00"));
+ throw new NullPointerException(Messages.getString("auth.00"));
}
try {
dn = new Name(name);
} catch (IOException e) {
IllegalArgumentException iae = new IllegalArgumentException(Messages
- .getString("auth.2D"));
+ .getString("auth.2D"));
iae.initCause(e);
throw iae;
}
diff --git a/luni/src/main/java/javax/security/cert/Certificate.java b/luni/src/main/java/javax/security/cert/Certificate.java
index ef513a3..19ed268 100644
--- a/luni/src/main/java/javax/security/cert/Certificate.java
+++ b/luni/src/main/java/javax/security/cert/Certificate.java
@@ -140,7 +140,7 @@
* if signature errors are detected
*/
public abstract void verify(PublicKey key, String sigProvider)
- throws CertificateException, NoSuchAlgorithmException,
+ throws CertificateException, NoSuchAlgorithmException,
InvalidKeyException, NoSuchProviderException,
SignatureException;
diff --git a/luni/src/main/java/javax/security/cert/X509Certificate.java b/luni/src/main/java/javax/security/cert/X509Certificate.java
index eea72ac..90079e5 100644
--- a/luni/src/main/java/javax/security/cert/X509Certificate.java
+++ b/luni/src/main/java/javax/security/cert/X509Certificate.java
@@ -54,13 +54,13 @@
public abstract class X509Certificate extends Certificate {
private static Constructor constructor;
-
+
static {
try {
String classname = (String) AccessController.doPrivileged(
new java.security.PrivilegedAction() {
public Object run() {
- return Security.getProperty("cert.provider.x509v1");
+ return Security.getProperty("cert.provider.x509v1");
}
}
);
@@ -70,7 +70,7 @@
} catch (Throwable e) {
}
}
-
+
/**
* Creates a new {@code X509Certificate}.
*/
@@ -91,11 +91,11 @@
public static final X509Certificate getInstance(InputStream inStream)
throws CertificateException {
if (inStream == null) {
- throw new CertificateException(Messages.getString("security.87"));
+ throw new CertificateException(Messages.getString("security.87"));
}
if (constructor != null) {
try {
- return (X509Certificate)
+ return (X509Certificate)
constructor.newInstance(new Object[] {inStream});
} catch (Throwable e) {
throw new CertificateException(e.getMessage());
@@ -104,7 +104,7 @@
final java.security.cert.X509Certificate cert;
try {
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
cert = (java.security.cert.X509Certificate)
cf.generateCertificate(inStream);
} catch (java.security.cert.CertificateException e) {
@@ -161,7 +161,7 @@
}
}
- public void checkValidity(Date date)
+ public void checkValidity(Date date)
throws CertificateExpiredException,
CertificateNotYetValidException {
try {
@@ -224,7 +224,7 @@
public static final X509Certificate getInstance(byte[] certData)
throws CertificateException {
if (certData == null) {
- throw new CertificateException(Messages.getString("security.88"));
+ throw new CertificateException(Messages.getString("security.88"));
}
ByteArrayInputStream bais = new ByteArrayInputStream(certData);
return getInstance(bais);
diff --git a/luni/src/main/java/javax/sql/ConnectionEvent.java b/luni/src/main/java/javax/sql/ConnectionEvent.java
index cce8a78..e2fac02 100644
--- a/luni/src/main/java/javax/sql/ConnectionEvent.java
+++ b/luni/src/main/java/javax/sql/ConnectionEvent.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/javax/sql/ConnectionEventListener.java b/luni/src/main/java/javax/sql/ConnectionEventListener.java
index eec0d5b..e6ee800 100644
--- a/luni/src/main/java/javax/sql/ConnectionEventListener.java
+++ b/luni/src/main/java/javax/sql/ConnectionEventListener.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -36,7 +36,7 @@
/**
* Notifies the {@code ConnectionEventListener} that an application has
* called the {@code close} method on a pooled connection.
- *
+ *
* @param theEvent
* a {@code ConnectionEvent} containing details about the source
* of the event.
@@ -48,7 +48,7 @@
* on a {@code PooledConnection}. This notification is triggered <i>before</i> the
* {@code SQLException}, which is available through the event argument, is
* thrown.
- *
+ *
* @param theEvent
* a {@code ConnectionEvent} containing details about the source
* of the event and the {@code SQLException} that has occurred.
diff --git a/luni/src/main/java/javax/sql/ConnectionPoolDataSource.java b/luni/src/main/java/javax/sql/ConnectionPoolDataSource.java
index 379fde0..33d0894 100644
--- a/luni/src/main/java/javax/sql/ConnectionPoolDataSource.java
+++ b/luni/src/main/java/javax/sql/ConnectionPoolDataSource.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,7 +37,7 @@
* database. A timeout value of 0 implies either the system default timeout
* value (if there is one) or that there is no timeout. The default value
* for the login timeout is {@code 0}.
- *
+ *
* @return the login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
@@ -66,7 +66,7 @@
/**
* Creates a connection to a database which can then be used as a pooled
* connection.
- *
+ *
* @return a {@code PooledConnection} which represents the connection to the
* database.
* @throws SQLException
@@ -77,7 +77,7 @@
/**
* Creates a connection to a database, using the supplied user name and
* password, which can then be used as a pooled connection.
- *
+ *
* @param theUser
* the a user name for the database login.
* @param thePassword
@@ -98,7 +98,7 @@
* database. A timeout value of 0 implies either the system default timeout
* value (if there is one) or that there is no timeout. The default value
* for the login timeout is 0.
- *
+ *
* @param theTimeout
* the new login timeout value in seconds.
* @throws SQLException
@@ -116,7 +116,7 @@
* is {@code null}. Note that the log writer for a {@code
* ConnectionPoolDataSource} is not the same as the log writer used by a
* {@code DriverManager}.
- *
+ *
* @param theWriter
* is the log writer for this {@code ConnectionPoolDataSource}.
* @throws SQLException
diff --git a/luni/src/main/java/javax/sql/DataSource.java b/luni/src/main/java/javax/sql/DataSource.java
index 7f73947..2781265 100644
--- a/luni/src/main/java/javax/sql/DataSource.java
+++ b/luni/src/main/java/javax/sql/DataSource.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -55,7 +55,7 @@
/**
* Creates a connection to the database represented by this {@code
* DataSource}.
- *
+ *
* @return a {@code Connection} object which is a connection to the
* database.
* @throws SQLException
@@ -66,7 +66,7 @@
/**
* Creates a connection to the database represented by this {@code
* DataSource}, using the supplied user name and password.
- *
+ *
* @param theUsername
* the a user name for the database login.
* @param thePassword
@@ -86,7 +86,7 @@
* wait when opening a connection to a database. A timeout value of 0
* implies either the system default timeout value (if there is one) or that
* there is no timeout. The default value for the login timeout is 0.
- *
+ *
* @return the login timeout value in seconds.
* @throws SQLException
* if there is a problem accessing the database.
@@ -117,7 +117,7 @@
* wait when opening a connection to a database. A timeout value of 0
* implies either the system default timeout value (if there is one) or that
* there is no timeout. The default value for the login timeout is 0.
- *
+ *
* @param theTimeout
* the new login timeout value in seconds.
* @throws SQLException
@@ -134,7 +134,7 @@
* log writer when a {@code DataSource} is created is {@code null}. Note
* that the log writer for a {@code DataSource} is not the same as the log
* writer used by a {@code DriverManager}.
- *
+ *
* @param theWriter
* a {@code PrintWriter} to use as the log writer for this
* {@code DataSource}.
diff --git a/luni/src/main/java/javax/sql/PooledConnection.java b/luni/src/main/java/javax/sql/PooledConnection.java
index b268e0c..34e9c78 100644
--- a/luni/src/main/java/javax/sql/PooledConnection.java
+++ b/luni/src/main/java/javax/sql/PooledConnection.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@
* PooledConnection}. Once registered, the {@code ConnectionEventListener}
* will receive {@link ConnectionEvent} events when they occur in the
* {@code PooledConnection}.
- *
+ *
* @param theListener
* an object which implements the {@code ConnectionEventListener}
* interface.
@@ -78,7 +78,7 @@
* PooledConnection}. This method should not be called directly by
* application code - it is intended only for the connection pool manager
* component.
- *
+ *
* @throws SQLException
* if there is a problem accessing the database.
*/
@@ -89,7 +89,7 @@
* the connection pool manager when an application invokes the method
* {@code DataSource.getConnection()} and there are no {@code
* PooledConnection} objects available in the connection pool.
- *
+ *
* @return a {@code Connection} object.
* @throws SQLException
* if there is a problem accessing the database.
@@ -100,7 +100,7 @@
* Unregisters the supplied {@code ConnectionEventListener} from this {@code
* PooledConnection}. Once unregistered, the {@code ConnectionEventListener}
* will no longer receive events occurring in the {@code PooledConnection}.
- *
+ *
* @param theListener
* an object which implements the {@code ConnectionEventListener}
* interface. This object should have previously been registered
diff --git a/luni/src/main/java/javax/sql/RowSet.java b/luni/src/main/java/javax/sql/RowSet.java
index 77321a2..f6d47ec 100644
--- a/luni/src/main/java/javax/sql/RowSet.java
+++ b/luni/src/main/java/javax/sql/RowSet.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -66,7 +66,7 @@
* Registers the supplied {@link RowSetListener} with this {@code RowSet}.
* Once registered, the {@link RowSetListener} is notified of events
* generated by the {@code RowSet}.
- *
+ *
* @param theListener
* an object which implements the {@code rowSetListener}
* interface.
@@ -113,7 +113,7 @@
/**
* Gets the {@code RowSet}'s command property.
- *
+ *
* @return a string containing the {@code RowSet}'s command property. A
* command is a SQL statement which is executed to fetch required
* data into the {@code RowSet}.
@@ -125,7 +125,7 @@
* RowSet}. The database name can be used to find a {@link DataSource}
* which has been registered with a naming service - the {@link DataSource}
* can then be used to create a connection to the database.
- *
+ *
* @return the name of the database.
*/
public String getDataSourceName();
@@ -135,7 +135,7 @@
* escape processing is on, the driver performs a substitution of the escape
* syntax with the applicable code before sending an SQL command to the
* database. The default value for escape processing is {@code true}.
- *
+ *
* @return {@code true} if escape processing is enabled, {@code
* false} otherwise.
* @throws SQLException
@@ -149,7 +149,7 @@
* LONGVARBINARYBINARY}, {@code CHAR}, {@code VARCHAR}, or {@code
* LONGVARCHAR}. Excess data is silently discarded if the number is
* exceeded.
- *
+ *
* @return the current maximum size in bytes. 0 implies no size limit.
* @throws SQLException
* if a problem occurs accessing the database.
@@ -159,7 +159,7 @@
/**
* Gets the maximum number of rows for this {@code RowSet}. Excess rows are
* discarded silently if the limit is exceeded.
- *
+ *
* @return the previous maximum number of rows. 0 implies no row limit.
* @throws SQLException
* if a problem occurs accessing the database.
@@ -170,7 +170,7 @@
* Gets the value of the password property for this {@code RowSet}. This
* property is used when a connection to the database is established.
* Therefore it should be set prior to invoking the {@link #execute} method.
- *
+ *
* @return the value of the password property.
*/
public String getPassword();
@@ -179,7 +179,7 @@
* Gets the timeout for the driver when a query operation is executed. If a
* query takes longer than the timeout then a {@code SQLException} is
* thrown.
- *
+ *
* @return the timeout value in seconds.
* @throws SQLException
* if an error occurs accessing the database.
@@ -187,11 +187,11 @@
public int getQueryTimeout() throws SQLException;
/**
- * Gets the transaction isolation level property set for this
- * {@code RowSet}. The transaction isolation level defines the
- * policy implemented on the database for maintaining the data
+ * Gets the transaction isolation level property set for this
+ * {@code RowSet}. The transaction isolation level defines the
+ * policy implemented on the database for maintaining the data
* values consistent.
- *
+ *
* @return the current transaction isolation level. Must be one of:
* <ul>
* <li>{@code Connection.TRANSACTION_READ_UNCOMMITTED}</li>
@@ -206,7 +206,7 @@
/**
* Gets the custom mapping of SQL User-Defined Types (UDTs) and Java classes
* for this {@code RowSet}, if applicable.
- *
+ *
* @return the custom mappings of SQL types to Java classes.
* @throws SQLException
* if an error occurs accessing the database.
@@ -218,7 +218,7 @@
* {@code DataSource} object specified, the {@code RowSet} uses the URL to
* establish a connection to the database. The default value for the URL is
* {@code null}.
- *
+ *
* @return a String holding the value of the URL property.
* @throws SQLException
* if an error occurs accessing the database.
@@ -229,7 +229,7 @@
* Gets the value of the {@code username} property for this {@code RowSet}.
* The {@code username} is used when establishing a connection to the
* database and should be set before the {@code execute} method is invoked.
- *
+ *
* @return a {@code String} holding the value of the {@code username}
* property.
*/
@@ -237,7 +237,7 @@
/**
* Indicates if this {@code RowSet} is read-only.
- *
+ *
* @return {@code true} if this {@code RowSet} is read-only, {@code false}
* if it is updatable.
*/
@@ -246,7 +246,7 @@
/**
* Removes a specified {@link RowSetListener} object from the set of
* listeners which will be notified of events by this {@code RowSet}.
- *
+ *
* @param theListener
* the {@link RowSetListener} to remove from the set of listeners
* for this {@code RowSet}.
@@ -256,7 +256,7 @@
/**
* Sets the specified {@code ARRAY} parameter in the {@code RowSet} command
* with the supplied {@code java.sql.Array} value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -272,7 +272,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* with the ASCII data in the supplied {@code java.io.InputStream} value.
* Data is read from the {@code InputStream} until end-of-file is reached.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -290,7 +290,7 @@
* Sets the value of the specified SQL {@code NUMERIC} parameter in the
* {@code RowSet} command with the data in the supplied {@code
* java.math.BigDecimal} value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -306,7 +306,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to the binary data in the supplied input stream. Data is read from the
* input stream until end-of-file is reached.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -323,7 +323,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to the supplied {@code Blob} value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -337,7 +337,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to the supplied boolean.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -352,7 +352,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to the supplied byte value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -366,7 +366,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to the supplied byte array value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -382,7 +382,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to the sequence of Unicode characters carried by the supplied {@code
* java.io.Reader}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -400,7 +400,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the value of a supplied {@code java.sql.Clob}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -415,7 +415,7 @@
* Sets the Command property for this {@code RowSet} - the command is an SQL
* query which runs when the {@code execute} method is invoked. This
* property is optional for databases that do not support commands.
- *
+ *
* @param cmd
* the SQL query. Can be {@code null}.
* @throws SQLException
@@ -426,7 +426,7 @@
/**
* Sets the concurrency property of this {@code RowSet}. The default value
* is {@code ResultSet.CONCUR_READ_ONLY}.
- *
+ *
* @param concurrency
* the concurrency value. One of:
* <ul>
@@ -456,7 +456,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the value of a supplied {@code java.sql.Date}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -472,7 +472,7 @@
* with the value of a supplied {@code java.sql.Date}, where the conversion
* of the date to an SQL {@code DATE} value is calculated using a supplied
* {@code Calendar}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -490,7 +490,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the supplied {@code double}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -507,7 +507,7 @@
* processing is on, the driver performs a substitution of the escape syntax
* with the applicable code before sending an SQL command to the database.
* The default value for escape processing is {@code true}.
- *
+ *
* @param enable
* {@code true} to enable escape processing, {@code false} to
* turn it off.
@@ -519,7 +519,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the supplied {@code float}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -534,7 +534,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the supplied {@code integer}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -548,7 +548,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* with the supplied {@code long}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -565,7 +565,7 @@
* {@code LONGVARBINARYBINARY}, {@code CHAR}, {@code VARCHAR}, or {@code
* LONGVARCHAR}. Data which exceeds this limit is silently discarded. For
* portability, a value greater than 256 is recommended.
- *
+ *
* @param max
* the maximum size of the returned column value in bytes. 0
* implies no size limit.
@@ -577,7 +577,7 @@
/**
* Sets the maximum number of rows which can be held by the {@code RowSet}.
* Any additional rows are silently discarded.
- *
+ *
* @param max
* the maximum number of rows which can be held in the {@code
* RowSet}. 0 means no limit.
@@ -589,7 +589,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to SQL {@code NULL}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -605,7 +605,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to SQL {@code NULL}. This form of the {@code setNull} method should be
* used for User Defined Types and {@code REF} parameters.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -645,7 +645,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied Java object.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -663,7 +663,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied Java object.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -686,7 +686,7 @@
* Sets the database Password for this {@code RowSet}. This property is used
* when a connection to the database is established. Therefore it should be
* set prior to invoking the {@link #execute} method.
- *
+ *
* @param password
* a {@code String} holding the password.
* @throws SQLException
@@ -697,7 +697,7 @@
/**
* Gets the timeout for the driver when a query operation is executed. If a
* query takes longer than the timeout, a {@code SQLException} is thrown.
- *
+ *
* @param seconds
* the number of seconds for the timeout.
* @throws SQLException
@@ -707,7 +707,7 @@
/**
* Sets whether the {@code RowSet} is read-only or updatable.
- *
+ *
* @param readOnly
* {@code true} to set the {@code RowSet} to read-only state,
* {@code false} to allow updates.
@@ -720,7 +720,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code java.sql.Ref}. This is sent to the database as an
* SQL {@code REF} value.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -735,7 +735,7 @@
/**
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code short integer}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -752,7 +752,7 @@
* to a supplied {@code String}. The string is placed into the database as a
* {@code VARCHAR} or {@code LONGVARCHAR} SQL value, depending on the
* database limits for the length of {@code VARCHAR} values.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -768,7 +768,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code java.sql.Time}, converting it to an SQL {@code TIME}
* value using the system default {@code Calendar}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -785,7 +785,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code java.sql.Time}, converting it to an SQL {@code TIME}
* value using a supplied {@code Calendar}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -805,7 +805,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code java.sql.Timestamp}, converting it to an SQL {@code
* TIMESTAMP} value using the system default {@code Calendar}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -823,7 +823,7 @@
* Sets the value of the specified parameter in the {@code RowSet} command
* to a supplied {@code java.sql.Timestamp}, converting it to an SQL {@code
* TIMESTAMP} value using a supplied {@code Calendar}.
- *
+ *
* @param parameterIndex
* the index of the parameter to set; the first parameter's index
* is 1.
@@ -851,9 +851,9 @@
* @param level
* the transaction isolation level. One of:
* <ul>
- * <li>{@code Connection.TRANSACTION_READ_UNCOMMITTED}</li>
- * <li>{@code Connection.TRANSACTION_READ_COMMITTED}</li>
- * <li>{@code Connection.TRANSACTION_REPEATABLE_READ}</li>
+ * <li>{@code Connection.TRANSACTION_READ_UNCOMMITTED}</li>
+ * <li>{@code Connection.TRANSACTION_READ_COMMITTED}</li>
+ * <li>{@code Connection.TRANSACTION_REPEATABLE_READ}</li>
* <li>{@code Connection.TRANSACTION_SERIALIZABLE}</li>
* </ul>
* @throws SQLException
@@ -865,12 +865,12 @@
/**
* Sets the type of this {@code RowSet}. By default, the type is
* non-scrollable.
- *
+ *
* @param type
* the type for the {@code RowSet}. One of:
* <ul>
- * <li>{@code ResultSet.TYPE_FORWARD_ONLY}</li>
- * <li>{@code ResultSet.TYPE_SCROLL_INSENSITIVE}</li>
+ * <li>{@code ResultSet.TYPE_FORWARD_ONLY}</li>
+ * <li>{@code ResultSet.TYPE_SCROLL_INSENSITIVE}</li>
* <li>{@code ResultSet.TYPE_SCROLL_SENSITIVE}</li>
* </ul>
* @throws SQLException
@@ -882,7 +882,7 @@
* Sets the mapping of SQL User Defined Types (UDTs) to Java classes. The
* Java classes must all implement the {@link java.sql.SQLData SQLData}
* interface.
- *
+ *
* @param theTypeMap
* the names of SQL UDTs and the Java classes to which they are
* mapped.
@@ -896,7 +896,7 @@
* Sets the URL used by this {@code RowSet} to access the database via a
* {@code DriverManager}. The URL is optional - an alternative is to use a
* database name to create a connection.
- *
+ *
* @param theURL
* the URL for the database. Can be {@code null}.
* @throws SQLException
@@ -907,7 +907,7 @@
/**
* Sets the {@code Username} property for the {@code RowSet}, used to
* authenticate a connection to the database.
- *
+ *
* @param theUsername
* the new user name for this row set.
* @throws SQLException
diff --git a/luni/src/main/java/javax/sql/RowSetEvent.java b/luni/src/main/java/javax/sql/RowSetEvent.java
index d18e9ce..40a64a6 100644
--- a/luni/src/main/java/javax/sql/RowSetEvent.java
+++ b/luni/src/main/java/javax/sql/RowSetEvent.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -44,7 +44,7 @@
* changes that have occurred to the {@code RowSet} can be extracted from
* the {@code RowSet} using one or more of the query methods available on
* the {@code RowSet}.
- *
+ *
* @param theSource
* the {@code RowSet} which generated the event.
*/
diff --git a/luni/src/main/java/javax/sql/RowSetInternal.java b/luni/src/main/java/javax/sql/RowSetInternal.java
index 78de4b0..28807e5 100644
--- a/luni/src/main/java/javax/sql/RowSetInternal.java
+++ b/luni/src/main/java/javax/sql/RowSetInternal.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -30,7 +30,7 @@
/**
* Gets the connection associated with this {@code RowSet} object.
- *
+ *
* @return the connection or {@code null}.
* @throws SQLException
* if there is a problem accessing the database.
@@ -43,7 +43,7 @@
* <p>
* The {@code ResultSet}'s cursor is positioned before the first row of
* data.
- *
+ *
* @return the {@code ResultSet} that contained the original data value of
* the {@code RowSet}.
* @throws SQLException
@@ -54,7 +54,7 @@
/**
* Gets the original value of the current row only. If the current row did
* not have an original value, then an empty value is returned.
- *
+ *
* @return a {@code ResultSet} containing the value of the current row only.
* @throws SQLException
* if there is a problem accessing the database, or if the
@@ -66,7 +66,7 @@
/**
* Gets the parameter values that have been set for this {@code RowSet}'s
* command.
- *
+ *
* @return the values of parameters that have been set.
* @throws SQLException
* if there is a problem accessing the database.
@@ -77,7 +77,7 @@
* Sets {@code RowSetMetaData} for this {@code RowSet}. The {@code
* RowSetMetaData} is used by a {@code RowSetReader} to set values giving
* information about the {@code RowSet}'s columns.
- *
+ *
* @param theMetaData
* holds the metadata about the {@code RowSet}'s columns.
* @throws SQLException
diff --git a/luni/src/main/java/javax/sql/RowSetListener.java b/luni/src/main/java/javax/sql/RowSetListener.java
index ede0197..beb2c9f 100644
--- a/luni/src/main/java/javax/sql/RowSetListener.java
+++ b/luni/src/main/java/javax/sql/RowSetListener.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
/**
* Notifies the listener that the {@code RowSet}'s cursor in {@code
* theEvent.getSource} has moved.
- *
+ *
* @param theEvent
* a {@code RowSetEvent} that contains information about the
* {@code RowSet} involved. This information can be used to
@@ -43,7 +43,7 @@
/**
* Notifies the listener that one of the {@code RowSet}'s rows in {@code
* theEvent.getSource} has changed.
- *
+ *
* @param theEvent
* a {@code RowSetEvent} that contains information about the
* {@code RowSet} involved. This information can be used to
@@ -56,7 +56,7 @@
* Notifies the listener that the {@code RowSet}'s entire contents in
* {@code theEvent.getSource} have been updated (an example is the execution
* of a command which retrieves new data from the database).
- *
+ *
* @param theEvent
* a {@code RowSetEvent} that contains information about the
* {@code RowSet} involved. This information can be used to
diff --git a/luni/src/main/java/javax/sql/RowSetMetaData.java b/luni/src/main/java/javax/sql/RowSetMetaData.java
index ad07199..196c8b9 100644
--- a/luni/src/main/java/javax/sql/RowSetMetaData.java
+++ b/luni/src/main/java/javax/sql/RowSetMetaData.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,7 @@
* Sets automatic numbering for a specified column in the {@code RowSet}. If
* automatic numbering is on, the column is read-only. The default value for
* the auto increment parameter is {@code false}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -54,7 +54,7 @@
/**
* Sets the case sensitive property for a specified column in the {@code
* RowSet}. The default is that the column is not case sensitive.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -69,7 +69,7 @@
/**
* Sets the catalog name for a specified column in the {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -83,7 +83,7 @@
/**
* Sets the number of columns contained in the row set.
- *
+ *
* @param columnCount
* the number of columns contained in the {@code RowSet}.
* @throws SQLException
@@ -94,7 +94,7 @@
/**
* Sets the normal maximum width in characters for a specified column in the
* {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -109,7 +109,7 @@
/**
* Sets the suggested name as label for the column contained in the {@code
* RowSet}. The label is an alias for printing and displaying purposes.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -123,7 +123,7 @@
/**
* Sets the column name for a specified column in the {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -137,7 +137,7 @@
/**
* Sets the SQL type for a specified column in the {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -152,7 +152,7 @@
/**
* Sets the type name for a specified column in the {@code RowSet}, where
* the data type is specific to the data source.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -167,7 +167,7 @@
/**
* Sets whether a specified column is a currency value. The default value is
* {@code false}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -183,7 +183,7 @@
/**
* Sets whether a specified column can contain SQL {@code NULL} values.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -206,7 +206,7 @@
/**
* Sets the number of decimal digits for a specified column in the {@code
* RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -221,7 +221,7 @@
/**
* Declares how many decimal digits there should be after a decimal point
* for the column specified by {@code columnIndex}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -234,7 +234,7 @@
/**
* Sets the schema name for a specified column in the {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -249,7 +249,7 @@
/**
* Sets whether a specified column can be used in a search involving a
* {@code WHERE} clause. The default value is {@code false}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -264,7 +264,7 @@
/**
* Sets if a specified column can contain signed numbers.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
@@ -279,7 +279,7 @@
/**
* Sets the table name for a specified column in the {@code RowSet}.
- *
+ *
* @param columnIndex
* the index number for the column; the first column's index is
* 1.
diff --git a/luni/src/main/java/javax/sql/RowSetReader.java b/luni/src/main/java/javax/sql/RowSetReader.java
index 0ff5c90..a6d304e 100644
--- a/luni/src/main/java/javax/sql/RowSetReader.java
+++ b/luni/src/main/java/javax/sql/RowSetReader.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,7 @@
* {@code RowSetReader} interface when the {@code RowSet}'s execute method is
* invoked - a {@code RowSetReader} must first be registered with the {@code
* RowSet} for this to work.
- *
+ *
* @see RowSet
*/
public interface RowSetReader {
@@ -33,7 +33,7 @@
/**
* Reads new data into the {@code RowSet}. The calling {@code RowSet} object
* must itself implement the {@code RowSetInternal} interface and the
- * {@code RowSetReader} must be registered as a reader on the
+ * {@code RowSetReader} must be registered as a reader on the
* {@code RowSet}.
* <p>
* This method adds rows into the calling {@code RowSet}. The reader may
@@ -43,7 +43,7 @@
* events are sent to listeners - any listeners are informed by the calling
* {@code RowSet}'s {@code execute} method once the reader returns from the
* {@code readData} method.
- *
+ *
* @param theCaller
* must be the calling {@code RowSet} object, which must have
* implemented the {@code RowSetInternal} interface.
diff --git a/luni/src/main/java/javax/sql/RowSetWriter.java b/luni/src/main/java/javax/sql/RowSetWriter.java
index 8e56d50..6a3f2cf 100644
--- a/luni/src/main/java/javax/sql/RowSetWriter.java
+++ b/luni/src/main/java/javax/sql/RowSetWriter.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -41,7 +41,7 @@
/**
* Writes changes made in the {@code RowSet}, which is associated with this
* {@code RowSetWriter}, back to the database.
- *
+ *
* @param theRowSet
* a row set that fulfills the following criteria:
* <ul>
diff --git a/luni/src/main/java/javax/xml/XMLConstants.java b/luni/src/main/java/javax/xml/XMLConstants.java
index f65a6f3..dd3c515 100644
--- a/luni/src/main/java/javax/xml/XMLConstants.java
+++ b/luni/src/main/java/javax/xml/XMLConstants.java
@@ -114,9 +114,9 @@
/**
* <p>W3C XML Schema Namespace URI.</p>
- *
+ *
* <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema</code>".
- *
+ *
* @see <a href="http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
* XML Schema Part 1:
* Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
@@ -126,9 +126,9 @@
/**
* <p>W3C XML Schema Instance Namespace URI.</p>
- *
+ *
* <p>Defined to be "<code>http://www.w3.org/2001/XMLSchema-instance</code>".</p>
- *
+ *
* @see <a href="http://www.w3.org/TR/xmlschema-1/#Instance_Document_Constructions">
* XML Schema Part 1:
* Structures, 2.6 Schema-Related Markup in Documents Being Validated</a>
@@ -138,32 +138,32 @@
/**
* <p>W3C XPath Datatype Namespace URI.</p>
- *
+ *
* <p>Defined to be "<code>http://www.w3.org/2003/11/xpath-datatypes</code>".</p>
- *
+ *
* @see <a href="http://www.w3.org/TR/xpath-datamodel">XQuery 1.0 and XPath 2.0 Data Model</a>
*/
public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
/**
* <p>XML Document Type Declaration Namespace URI as an arbitrary value.</p>
- *
+ *
* <p>Since not formally defined by any existing standard, arbitrarily define to be "<code>http://www.w3.org/TR/REC-xml</code>".
*/
public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
/**
* <p>RELAX NG Namespace URI.</p>
- *
+ *
* <p>Defined to be "<code>http://relaxng.org/ns/structure/1.0</code>".</p>
- *
+ *
* @see <a href="http://relaxng.org/spec-20011203.html">RELAX NG Specification</a>
*/
public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
/**
* <p>Feature for secure processing.</p>
- *
+ *
* <ul>
* <li>
* <code>true</code> instructs the implementation to process XML securely.
@@ -174,6 +174,6 @@
* ignoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
* </li>
* </ul>
- */
+ */
public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
}
diff --git a/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java b/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java
index 2afffbf..3be4265 100644
--- a/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java
+++ b/luni/src/main/java/javax/xml/datatype/DatatypeConfigurationException.java
@@ -34,13 +34,13 @@
*/
public class DatatypeConfigurationException extends Exception {
-
+
/** Stream Unique Identifier. */
private static final long serialVersionUID = -1699373159027047238L;
/** This field is required to store the cause on JDK 1.3 and below. */
private Throwable causeOnJDK13OrBelow;
-
+
/** Indicates whether this class is being used in a JDK 1.4 context. */
private transient boolean isJDK14OrAbove = false;
@@ -48,22 +48,22 @@
* <p>Create a new <code>DatatypeConfigurationException</code> with
* no specified detail message and cause.</p>
*/
-
+
public DatatypeConfigurationException() {
super();
}
-
+
/**
* <p>Create a new <code>DatatypeConfigurationException</code> with
* the specified detail message.</p>
*
* @param message The detail message.
*/
-
+
public DatatypeConfigurationException(String message) {
super(message);
}
-
+
/**
* <p>Create a new <code>DatatypeConfigurationException</code> with
* the specified detail message and cause.</p>
@@ -71,24 +71,24 @@
* @param message The detail message.
* @param cause The cause. A <code>null</code> value is permitted, and indicates that the cause is nonexistent or unknown.
*/
-
+
public DatatypeConfigurationException(String message, Throwable cause) {
super(message);
initCauseByReflection(cause);
}
-
+
/**
* <p>Create a new <code>DatatypeConfigurationException</code> with
* the specified cause.</p>
*
* @param cause The cause. A <code>null</code> value is permitted, and indicates that the cause is nonexistent or unknown.
*/
-
+
public DatatypeConfigurationException(Throwable cause) {
super(cause == null ? null : cause.toString());
initCauseByReflection(cause);
}
-
+
/**
* Print the the trace of methods from where the error
* originated. This will trace all nested exception
@@ -132,13 +132,13 @@
super.printStackTrace(s);
}
}
-
+
private void printStackTrace0(PrintWriter s) {
causeOnJDK13OrBelow.printStackTrace(s);
s.println("------------------------------------------");
super.printStackTrace(s);
}
-
+
private void initCauseByReflection(Throwable cause) {
causeOnJDK13OrBelow = cause;
try {
@@ -149,8 +149,8 @@
// Ignore exception
catch (Exception e) {}
}
-
- private void readObject(ObjectInputStream in)
+
+ private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
diff --git a/luni/src/main/java/javax/xml/datatype/DatatypeConstants.java b/luni/src/main/java/javax/xml/datatype/DatatypeConstants.java
index f21bc7f..4946390 100644
--- a/luni/src/main/java/javax/xml/datatype/DatatypeConstants.java
+++ b/luni/src/main/java/javax/xml/datatype/DatatypeConstants.java
@@ -31,13 +31,13 @@
*/
public final class DatatypeConstants {
-
+
/**
* <p>Private constructor to prevent instantiation.</p>
*/
private DatatypeConstants() {
}
-
+
/**
* Value for first month of year.
*/
@@ -117,7 +117,7 @@
* <p>Comparison result.</p>
*/
public static final int INDETERMINATE = 2;
-
+
/**
* Designation that an "int" field is not set.
*/
@@ -127,50 +127,50 @@
* <p>A constant that represents the years field.</p>
*/
public static final Field YEARS = new Field("YEARS", 0);
-
+
/**
* <p>A constant that represents the months field.</p>
*/
public static final Field MONTHS = new Field("MONTHS", 1);
-
+
/**
* <p>A constant that represents the days field.</p>
*/
public static final Field DAYS = new Field("DAYS", 2);
-
+
/**
* <p>A constant that represents the hours field.</p>
*/
public static final Field HOURS = new Field("HOURS", 3);
-
+
/**
* <p>A constant that represents the minutes field.</p>
*/
public static final Field MINUTES = new Field("MINUTES", 4);
-
+
/**
* <p>A constant that represents the seconds field.</p>
*/
public static final Field SECONDS = new Field("SECONDS", 5);
-
+
/**
* Type-safe enum class that represents six fields
* of the {@link Duration} class.
*/
public static final class Field {
-
+
/**
* <p><code>String</code> representation of <ode>Field</code>.</p>
*/
private final String str;
/**
* <p>Unique id of the field.</p>
- *
+ *
* <p>This value allows the {@link Duration} class to use switch
- * statements to process fields.</p>
+ * statements to process fields.</p>
*/
private final int id;
-
+
/**
* <p>Construct a <code>Field</code> with specified values.</p>
* @param str <code>String</code> representation of <code>Field</code>
@@ -181,62 +181,62 @@
this.id = id;
}
/**
- * Returns a field name in English. This method
+ * Returns a field name in English. This method
* is intended to be used for debugging/diagnosis
* and not for display to end-users.
- *
+ *
* @return
* a non-null valid String constant.
*/
public String toString() { return str; }
-
+
/**
* <p>Get id of this Field.</p>
- *
+ *
* @return Id of field.
*/
public int getId() {
return id;
}
}
-
+
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>dateTime</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>dateTime</code>.</p>
*/
public static final QName DATETIME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "dateTime");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>time</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>time</code>.</p>
*/
public static final QName TIME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "time");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>date</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>date</code>.</p>
*/
public static final QName DATE = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "date");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gYearMonth</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gYearMonth</code>.</p>
*/
public static final QName GYEARMONTH = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "gYearMonth");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gMonthDay</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gMonthDay</code>.</p>
*/
public static final QName GMONTHDAY = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "gMonthDay");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gYear</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gYear</code>.</p>
*/
public static final QName GYEAR = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "gYear");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gMonth</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gMonth</code>.</p>
*/
public static final QName GMONTH = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "gMonth");
/**
- * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gDay</code>.</p>
+ * <p>Fully qualified name for W3C XML Schema 1.0 datatype <code>gDay</code>.</p>
*/
public static final QName GDAY = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI, "gDay");
@@ -264,5 +264,5 @@
* W3C XML Schema min timezone offset is +14:00. Zone offset is in minutes.
*/
public static final int MIN_TIMEZONE_OFFSET = 14 * 60;
-
+
}
diff --git a/luni/src/main/java/javax/xml/datatype/DatatypeFactory.java b/luni/src/main/java/javax/xml/datatype/DatatypeFactory.java
index cbf3108..0788984 100644
--- a/luni/src/main/java/javax/xml/datatype/DatatypeFactory.java
+++ b/luni/src/main/java/javax/xml/datatype/DatatypeFactory.java
@@ -25,7 +25,7 @@
/**
* <p>Factory that creates new <code>javax.xml.datatype</code> <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>
- *
+ *
* <p id="DatatypeFactory.newInstance">{@link #newInstance()} is used to create a new <code>DatatypeFactory</code>.
* The following implementation resolution mechanisms are used in the following order:</p>
* <ol>
@@ -48,8 +48,8 @@
* {@link #DATATYPEFACTORY_IMPLEMENTATION_CLASS}, "<code>javax.xml.datatype.DatatypeFactoryImpl</code>".
* Any Exception thrown during the instantiation process is wrapped as a {@link DatatypeConfigurationException}.
* </li>
- * </ol>
- *
+ * </ol>
+ *
* @author <a href="mailto:Joseph.Fialli@Sun.COM">Joseph Fialli</a>
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 884950 $, $Date: 2009-11-27 10:46:18 -0800 (Fri, 27 Nov 2009) $
@@ -59,31 +59,31 @@
/**
* <p>Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.</p>
- *
+ *
* <p>Default value is <code>javax.xml.datatype.DatatypeFactory</code>.</p>
*/
public static final String DATATYPEFACTORY_PROPERTY = "javax.xml.datatype.DatatypeFactory";
/**
* <p>Default implementation class name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.</p>
- *
+ *
* <p>Default value is <code>org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl</code>.</p>
*/
public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = new String("org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl");
/**
* <p>Protected constructor to prevent instantiation outside of package.</p>
- *
+ *
* <p>Use {@link #newInstance()} to create a <code>DatatypeFactory</code>.</p>
*/
protected DatatypeFactory() {}
/**
* <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
- *
+ *
* <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
* <code>Class</code>'s documentation.</p>
- *
+ *
* @return New instance of a <code>DocumentBuilderFactory</code>
*
* @throws DatatypeConfigurationException If the implementation is not
@@ -97,7 +97,7 @@
DATATYPEFACTORY_PROPERTY,
/* The fallback implementation class name */
DATATYPEFACTORY_IMPLEMENTATION_CLASS);
- }
+ }
catch (FactoryFinder.ConfigurationError e) {
throw new DatatypeConfigurationException(e.getMessage(), e.getException());
}
@@ -133,26 +133,26 @@
* <p>Obtain a new instance of a <code>Duration</code>
* specifying the <code>Duration</code> as its string representation, "PnYnMnDTnHnMnS",
* as defined in XML Schema 1.0 section 3.2.6.1.</p>
- *
+ *
* <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines <code>duration</code> as:</p>
* <blockquote>
* duration represents a duration of time.
* The value space of duration is a six-dimensional space where the coordinates designate the
* Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
* These components are ordered in their significance by their order of appearance i.e. as
- * year, month, day, hour, minute, and second.
+ * year, month, day, hour, minute, and second.
* </blockquote>
* <p>All six values are set and available from the created {@link Duration}</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* @param lexicalRepresentation <code>String</code> representation of a <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created from parsing the <code>lexicalRepresentation</code>.
- *
+ *
* @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code>.
* @throws UnsupportedOperationException If implementation cannot support requested values.
* @throws NullPointerException if <code>lexicalRepresentation</code> is <code>null</code>.
@@ -162,14 +162,14 @@
/**
* <p>Obtain a new instance of a <code>Duration</code>
* specifying the <code>Duration</code> as milliseconds.</p>
- *
+ *
* <p>XML Schema Part 2: Datatypes, 3.2.6 duration, defines <code>duration</code> as:</p>
* <blockquote>
* duration represents a duration of time.
* The value space of duration is a six-dimensional space where the coordinates designate the
* Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
* These components are ordered in their significance by their order of appearance i.e. as
- * year, month, day, hour, minute, and second.
+ * year, month, day, hour, minute, and second.
* </blockquote>
* <p>All six values are set by computing their values from the specified milliseconds
* and are available using the <code>get</code> methods of the created {@link Duration}.
@@ -181,17 +181,17 @@
* </li>
* <li>{@link XMLGregorianCalendar} Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation</li>
* </ul>
- *
+ *
* <p>The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
* {@link java.util.Calendar#YEAR} = 1970,
* {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
* {@link java.util.Calendar#DATE} = 1, etc.
* This is important as there are variations in the Gregorian Calendar,
* e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.</p>
- *
+ * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.</p>
+ *
* @param durationInMilliSeconds Duration in milliseconds to create.
- *
+ *
* @return New <code>Duration</code> representing <code>durationInMilliSeconds</code>.
*/
public abstract Duration newDuration(final long durationInMilliSeconds);
@@ -199,14 +199,14 @@
/**
* <p>Obtain a new instance of a <code>Duration</code>
* specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* <p>A <code>null</code> value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param years of this <code>Duration</code>
@@ -215,9 +215,9 @@
* @param hours of this <code>Duration</code>
* @param minutes of this <code>Duration</code>
* @param seconds of this <code>Duration</code>
- *
+ *
* @return New <code>Duration</code> created from the specified values.
- *
+ *
* @throws IllegalArgumentException If values are not a valid representation of a <code>Duration</code>.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -233,9 +233,9 @@
/**
* <p>Obtain a new instance of a <code>Duration</code>
* specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param years of this <code>Duration</code>
@@ -244,11 +244,11 @@
* @param hours of this <code>Duration</code>
* @param minutes of this <code>Duration</code>
* @param seconds of this <code>Duration</code>
- *
+ *
* @return New <code>Duration</code> created from the specified values.
- *
+ *
* @throws IllegalArgumentException If values are not a valid representation of a <code>Duration</code>.
- *
+ *
* @see #newDuration(
* boolean isPositive,
* BigInteger years,
@@ -300,22 +300,22 @@
* <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> by parsing its <code>String</code> representation,
* "<em>PnDTnHnMnS</em>", <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only day, hour, minute, and second components.
* This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
- *
+ *
* <p>All four values are set and available from the created {@link Duration}</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* @param lexicalRepresentation Lexical representation of a duration.
- *
+ *
* @return New <code>Duration</code> created using the specified <code>lexicalRepresentation</code>.
- *
+ *
* @throws IllegalArgumentException If the given string does not conform to the aforementioned specification.
* @throws UnsupportedOperationException If implementation cannot support requested values.
* @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
@@ -340,11 +340,11 @@
* <p>Create a <code>Duration</code> of type <code>xdt:dayTimeDuration</code> using the specified milliseconds as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only day, hour, minute, and second components.
* This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
- *
+ *
* <p>All four values are set by computing their values from the specified milliseconds
* and are available using the <code>get</code> methods of the created {@link Duration}.
* The values conform to and are defined by:</p>
@@ -355,7 +355,7 @@
* </li>
* <li>{@link XMLGregorianCalendar} Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation</li>
* </ul>
- *
+ *
* <p>The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
* {@link java.util.Calendar#YEAR} = 1970,
* {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
@@ -363,20 +363,20 @@
* This is important as there are variations in the Gregorian Calendar,
* e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
* so the result of {@link Duration#getDays()} can be influenced.</p>
- *
+ *
* <p>Any remaining milliseconds after determining the day, hour, minute and second are discarded.</p>
- *
+ *
* @param durationInMilliseconds Milliseconds of <code>Duration</code> to create.
- *
+ *
* @return New <code>Duration</code> created with the specified <code>durationInMilliseconds</code>.
- *
+ *
* @see <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>
*/
public Duration newDurationDayTime(final long durationInMilliseconds) {
long _durationInMilliseconds = durationInMilliseconds;
if (_durationInMilliseconds == 0) {
- return newDuration(true, DatatypeConstants.FIELD_UNDEFINED,
+ return newDuration(true, DatatypeConstants.FIELD_UNDEFINED,
DatatypeConstants.FIELD_UNDEFINED, 0, 0, 0, 0);
}
boolean tooLong = false;
@@ -392,7 +392,7 @@
else {
isPositive = true;
}
-
+
long val = _durationInMilliseconds;
int milliseconds = (int) (val % 60000L); // 60000 milliseconds per minute
if (tooLong) {
@@ -411,11 +411,11 @@
}
else {
return newDuration(isPositive, null, null,
- BigInteger.valueOf(days), BigInteger.valueOf(hours),
+ BigInteger.valueOf(days), BigInteger.valueOf(hours),
BigInteger.valueOf(minutes), BigDecimal.valueOf(milliseconds, 3));
- }
+ }
}
-
+
BigDecimal seconds = BigDecimal.valueOf(milliseconds, 3);
val = val / 60000L;
BigInteger minutes = BigInteger.valueOf(val % 60L); // 60 minutes per hour
@@ -431,31 +431,31 @@
* <code>day</code>, <code>hour</code>, <code>minute</code> and <code>second</code> as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only day, hour, minute, and second components.
* This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* <p>A <code>null</code> value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param day Day of <code>Duration</code>.
* @param hour Hour of <code>Duration</code>.
* @param minute Minute of <code>Duration</code>.
* @param second Second of <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created with the specified <code>day</code>, <code>hour</code>, <code>minute</code>
* and <code>second</code>.
- *
- * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
+ *
+ * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- */
+ */
public Duration newDurationDayTime(
final boolean isPositive,
final BigInteger day,
@@ -479,32 +479,32 @@
* <code>day</code>, <code>hour</code>, <code>minute</code> and <code>second</code> as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-dayTimeDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:dayTimeDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only day, hour, minute, and second components.
* This datatype resides in the namespace <code>http://www.w3.org/2003/11/xpath-datatypes</code>.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param day Day of <code>Duration</code>.
* @param hour Hour of <code>Duration</code>.
* @param minute Minute of <code>Duration</code>.
* @param second Second of <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created with the specified <code>day</code>, <code>hour</code>, <code>minute</code>
* and <code>second</code>.
- *
- * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
- */
+ *
+ * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
+ */
public Duration newDurationDayTime(
final boolean isPositive,
final int day,
final int hour,
final int minute,
final int second) {
- return newDuration(isPositive,
+ return newDuration(isPositive,
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
day, hour, minute, second);
}
@@ -513,22 +513,22 @@
* <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> by parsing its <code>String</code> representation,
* "<em>PnYnM</em>", <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:yearMonthDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only year and month components.
* This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.</p>
- *
+ *
* <p>Both values are set and available from the created {@link Duration}</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* @param lexicalRepresentation Lexical representation of a duration.
- *
+ *
* @return New <code>Duration</code> created using the specified <code>lexicalRepresentation</code>.
- *
+ *
* @throws IllegalArgumentException If the <code>lexicalRepresentation</code> does not conform to the specification.
* @throws UnsupportedOperationException If implementation cannot support requested values.
* @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
@@ -552,11 +552,11 @@
* <p>Create a <code>Duration</code> of type <code>xdt:yearMonthDuration</code> using the specified milliseconds as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
- *
+ *
* <p>The datatype <code>xdt:yearMonthDuration</code> is a subtype of <code>xs:duration</code>
* whose lexical representation contains only year and month components.
* This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.</p>
- *
+ *
* <p>Both values are set by computing their values from the specified milliseconds
* and are available using the <code>get</code> methods of the created {@link Duration}.
* The values conform to and are defined by:</p>
@@ -567,7 +567,7 @@
* </li>
* <li>{@link XMLGregorianCalendar} Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation</li>
* </ul>
- *
+ *
* <p>The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
* {@link java.util.Calendar#YEAR} = 1970,
* {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
@@ -575,11 +575,11 @@
* This is important as there are variations in the Gregorian Calendar,
* e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
* so the result of {@link Duration#getMonths()} can be influenced.</p>
- *
+ *
* <p>Any remaining milliseconds after determining the year and month are discarded.</p>
- *
+ *
* @param durationInMilliseconds Milliseconds of <code>Duration</code> to create.
- *
+ *
* @return New <code>Duration</code> created using the specified <code>durationInMilliseconds</code>.
*/
public Duration newDurationYearMonth(final long durationInMilliseconds) {
@@ -592,24 +592,24 @@
* <code>year</code> and <code>month</code> as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthyDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
- *
+ *
* <p>The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded.</p>
- *
+ *
* <p>A <code>null</code> value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param year Year of <code>Duration</code>.
* @param month Month of <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created using the specified <code>year</code> and <code>month</code>.
- *
- * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
+ *
+ * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- */
+ */
public Duration newDurationYearMonth(
final boolean isPositive,
final BigInteger year,
@@ -631,32 +631,32 @@
* <code>year</code> and <code>month</code> as defined in
* <a href="http://www.w3.org/TR/xpath-datamodel#dt-yearMonthyDuration">
* XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration</a>.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param isPositive Set to <code>false</code> to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param year Year of <code>Duration</code>.
* @param month Month of <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created using the specified <code>year</code> and <code>month</code>.
- *
- * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
- */
+ *
+ * @throws IllegalArgumentException If any values would create an invalid <code>Duration</code>.
+ */
public Duration newDurationYearMonth(
final boolean isPositive,
final int year,
final int month) {
- return newDuration(isPositive, year, month,
+ return newDuration(isPositive, year, month,
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,
DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED);
}
/**
* <p>Create a new instance of an <code>XMLGregorianCalendar</code>.</p>
- *
+ *
* <p>All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.</p>
- *
+ *
* @return New <code>XMLGregorianCalendar</code> with all date/time datatype fields set to
* {@link DatatypeConstants#FIELD_UNDEFINED} or null.
*/
@@ -664,13 +664,13 @@
/**
* <p>Create a new XMLGregorianCalendar by parsing the String as a lexical representation.</p>
- *
- * <p>Parsing the lexical string representation is defined in
+ *
+ * <p>Parsing the lexical string representation is defined in
* <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
* <em>Lexical Representation</em>.</a></p>
- *
+ *
* <p>The string representation may not have any leading and trailing whitespaces.</p>
- *
+ *
* <p>The parsing is done field by field so that
* the following holds for any lexically correct String x:</p>
* <pre>
@@ -679,25 +679,25 @@
* <p>Except for the noted lexical/canonical representation mismatches
* listed in <a href="http://www.w3.org/2001/05/xmlschema-errata#e2-45">
* XML Schema 1.0 errata, Section 3.2.7.2</a>.</p>
- *
+ *
* @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from the <code>lexicalRepresentation</code>.
- *
+ *
* @throws IllegalArgumentException If the <code>lexicalRepresentation</code> is not a valid <code>XMLGregorianCalendar</code>.
* @throws NullPointerException If <code>lexicalRepresentation</code> is <code>null</code>.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
/**
- * <p>Create an <code>XMLGregorianCalendar</code> from a {@link GregorianCalendar}.</p>
+ * <p>Create an <code>XMLGregorianCalendar</code> from a {@link GregorianCalendar}.</p>
*
* <table border="2" rules="all" cellpadding="2">
* <thead>
* <tr>
* <th align="center" colspan="2">
* Field by Field Conversion from
- * {@link GregorianCalendar} to an {@link XMLGregorianCalendar}
+ * {@link GregorianCalendar} to an {@link XMLGregorianCalendar}
* </th>
* </tr>
* <tr>
@@ -732,36 +732,36 @@
* </tr>
* </tbody>
* </table>
- * <p><em>*</em>conversion loss of information. It is not possible to represent
- * a <code>java.util.GregorianCalendar</code> daylight savings timezone id in the
+ * <p><em>*</em>conversion loss of information. It is not possible to represent
+ * a <code>java.util.GregorianCalendar</code> daylight savings timezone id in the
* XML Schema 1.0 date/time datatype representation.</p>
- *
+ *
* <p>To compute the return value's <code>TimeZone</code> field,
* <ul>
* <li>when <code>this.getTimezone() != FIELD_UNDEFINED</code>,
- * create a <code>java.util.TimeZone</code> with a custom timezone id
+ * create a <code>java.util.TimeZone</code> with a custom timezone id
* using the <code>this.getTimezone()</code>.</li>
- * <li>else use the <code>GregorianCalendar</code> default timezone value
- * for the host is defined as specified by
- * <code>java.util.TimeZone.getDefault()</code>.</li></p>
+ * <li>else use the <code>GregorianCalendar</code> default timezone value
+ * for the host is defined as specified by
+ * <code>java.util.TimeZone.getDefault()</code>.</li></p>
*
* @param cal <code>java.util.GregorianCalendar</code> used to create <code>XMLGregorianCalendar</code>
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from <code>java.util.GregorianCalendar</code>
- *
+ *
* @throws NullPointerException If <code>cal</code> is <code>null</code>.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
/**
- * <p>Constructor allowing for complete value spaces allowed by
- * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
+ * <p>Constructor allowing for complete value spaces allowed by
+ * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
* builtin datatypes. Note that <code>year</code> parameter supports
- * arbitrarily large numbers and fractionalSecond has infinite
+ * arbitrarily large numbers and fractionalSecond has infinite
* precision.</p>
- *
+ *
* <p>A <code>null</code> value indicates that field is not set.</p>
- *
+ *
* @param year of <code>XMLGregorianCalendar</code> to be created.
* @param month of <code>XMLGregorianCalendar</code> to be created.
* @param day of <code>XMLGregorianCalendar</code> to be created.
@@ -770,9 +770,9 @@
* @param second of <code>XMLGregorianCalendar</code> to be created.
* @param fractionalSecond of <code>XMLGregorianCalendar</code> to be created.
* @param timezone of <code>XMLGregorianCalendar</code> to be created.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from specified values.
- *
+ *
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
* or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
@@ -792,12 +792,12 @@
* <p>Constructor of value spaces that a
* <code>java.util.GregorianCalendar</code> instance would need to convert to an
* <code>XMLGregorianCalendar</code> instance.</p>
- *
- * <p><code>XMLGregorianCalendar eon</code> and
+ *
+ * <p><code>XMLGregorianCalendar eon</code> and
* <code>fractionalSecond</code> are set to <code>null</code></p>
*
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param year of <code>XMLGregorianCalendar</code> to be created.
* @param month of <code>XMLGregorianCalendar</code> to be created.
* @param day of <code>XMLGregorianCalendar</code> to be created.
@@ -806,9 +806,9 @@
* @param second of <code>XMLGregorianCalendar</code> to be created.
* @param millisecond of <code>XMLGregorianCalendar</code> to be created.
* @param timezone of <code>XMLGregorianCalendar</code> to be created.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from specified values.
- *
+ *
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
* or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
@@ -855,20 +855,20 @@
/**
* <p>Create a Java representation of XML Schema builtin datatype <code>date</code> or <code>g*</code>.</p>
- *
- * <p>For example, an instance of <code>gYear</code> can be created invoking this factory
- * with <code>month</code> and <code>day</code> parameters set to
+ *
+ * <p>For example, an instance of <code>gYear</code> can be created invoking this factory
+ * with <code>month</code> and <code>day</code> parameters set to
* {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param year of <code>XMLGregorianCalendar</code> to be created.
* @param month of <code>XMLGregorianCalendar</code> to be created.
* @param day of <code>XMLGregorianCalendar</code> to be created.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from parameter values.
- *
+ *
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
@@ -895,21 +895,21 @@
/**
* <p>Create a Java instance of XML Schema builtin datatype <code>time</code>.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from parameter values.
- *
+ *
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
* or if the composite values constitute an invalid <code>XMLGregorianCalendar</code> instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
- *
+ *
* @see DatatypeConstants#FIELD_UNDEFINED
*/
public XMLGregorianCalendar newXMLGregorianCalendarTime(
@@ -931,18 +931,18 @@
/**
* <p>Create a Java instance of XML Schema builtin datatype time.</p>
- *
+ *
* <p>A <code>null</code> value indicates that field is not set.</p>
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
* @param fractionalSecond value of <code>null</code> indicates that this optional field is not set.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from parameter values.
- *
+ *
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
@@ -970,17 +970,17 @@
/**
* <p>Create a Java instance of XML Schema builtin datatype time.</p>
- *
+ *
* <p>A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.</p>
- *
+ *
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
* @param milliseconds number of milliseconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
+ *
* @return <code>XMLGregorianCalendar</code> created from parameter values.
- *
+ *
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
diff --git a/luni/src/main/java/javax/xml/datatype/Duration.java b/luni/src/main/java/javax/xml/datatype/Duration.java
index e5b4a12..662fdef 100644
--- a/luni/src/main/java/javax/xml/datatype/Duration.java
+++ b/luni/src/main/java/javax/xml/datatype/Duration.java
@@ -30,20 +30,20 @@
/**
* <p>Immutable representation of a time span as defined in
* the W3C XML Schema 1.0 specification.</p>
- *
+ *
* <p>A Duration object represents a period of Gregorian time,
* which consists of six fields (years, months, days, hours,
* minutes, and seconds) plus a sign (+/-) field.</p>
- *
+ *
* <p>The first five fields have non-negative (>=0) integers or null
* (which represents that the field is not set),
* and the seconds field has a non-negative decimal or null.
- * A negative sign indicates a negative duration.</p>
- *
+ * A negative sign indicates a negative duration.</p>
+ *
* <p>This class provides a number of methods that make it easy
* to use for the duration datatype of XML Schema 1.0 with
* the errata.</p>
- *
+ *
* <h2>Order relationship</h2>
* <p>Duration objects only have partial order, where two values A and B
* maybe either:</p>
@@ -57,10 +57,10 @@
* <p>For example, 30 days cannot be meaningfully compared to one month.
* The {@link #compare(Duration duration)} method implements this
* relationship.</p>
- *
+ *
* <p>See the {@link #isLongerThan(Duration)} method for details about
* the order relationship among <code>Duration</code> objects.</p>
- *
+ *
* <h2>Operations over Duration</h2>
* <p>This class provides a set of basic arithmetic operations, such
* as addition, subtraction and multiplication.
@@ -68,33 +68,33 @@
* fail for some combinations of operations. For example, you cannot
* subtract 15 days from 1 month. See the javadoc of those methods
* for detailed conditions where this could happen.</p>
- *
+ *
* <p>Also, division of a duration by a number is not provided because
* the <code>Duration</code> class can only deal with finite precision
- * decimal numbers. For example, one cannot represent 1 sec divided by 3.</p>
- *
+ * decimal numbers. For example, one cannot represent 1 sec divided by 3.</p>
+ *
* <p>However, you could substitute a division by 3 with multiplying
* by numbers such as 0.3 or 0.333.</p>
- *
+ *
* <h2>Range of allowed values</h2>
* <p>
* Because some operations of <code>Duration</code> rely on {@link Calendar}
* even though {@link Duration} can hold very large or very small values,
* some of the methods may not work correctly on such <code>Duration</code>s.
* The impacted methods document their dependency on {@link Calendar}.
- *
- *
+ *
+ *
* @author <a href="mailto:Joseph.Fialli@Sun.COM">Joseph Fialli</a>
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
- * @version $Revision: 759828 $, $Date: 2009-03-29 18:26:29 -0700 (Sun, 29 Mar 2009) $
+ * @version $Revision: 759828 $, $Date: 2009-03-29 18:26:29 -0700 (Sun, 29 Mar 2009) $
* @see XMLGregorianCalendar#add(Duration)
* @since 1.5
*/
public abstract class Duration {
/**
- * <p>Return the name of the XML Schema date/time type that this instance
+ * <p>Return the name of the XML Schema date/time type that this instance
* maps to. Type is computed based on fields that are set,
* i.e. {@link #isSet(DatatypeConstants.Field field)} == <code>true</code>.</p>
*
@@ -146,12 +146,12 @@
* </tr>
* </tbody>
* </table>
- *
+ *
* @return one of the following constants:
* {@link DatatypeConstants#DURATION},
* {@link DatatypeConstants#DURATION_DAYTIME} or
* {@link DatatypeConstants#DURATION_YEARMONTH}.
- *
+ *
* @throws IllegalStateException If the combination of set fields does not match one of the XML Schema date/time datatypes.
*/
public QName getXMLSchemaType() {
@@ -208,7 +208,7 @@
/**
* Returns the sign of this duration in -1,0, or 1.
- *
+ *
* @return
* -1 if this duration is negative, 0 if the duration is zero,
* and 1 if the duration is positive.
@@ -217,14 +217,14 @@
/**
* <p>Get the years value of this <code>Duration</code> as an <code>int</code> or <code>0</code> if not present.</p>
- *
+ *
* <p><code>getYears()</code> is a convenience method for
* {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)}.</p>
- *
+ *
* <p>As the return value is an <code>int</code>, an incorrect value will be returned for <code>Duration</code>s
* with years that go beyond the range of an <code>int</code>.
* Use {@link #getField(DatatypeConstants.Field field) getField(DatatypeConstants.YEARS)} to avoid possible loss of precision.</p>
- *
+ *
* @return If the years field is present, return its value as an <code>int</code>, else return <code>0</code>.
*/
public int getYears() {
@@ -234,10 +234,10 @@
/**
* Obtains the value of the MONTHS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the MONTHS field.
- *
+ *
* @return Months of this <code>Duration</code>.
*/
public int getMonths() {
@@ -247,10 +247,10 @@
/**
* Obtains the value of the DAYS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the DAYS field.
- *
+ *
* @return Days of this <code>Duration</code>.
*/
public int getDays() {
@@ -260,12 +260,12 @@
/**
* Obtains the value of the HOURS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the HOURS field.
- *
+ *
* @return Hours of this <code>Duration</code>.
- *
+ *
*/
public int getHours() {
return getFieldValueAsInt(DatatypeConstants.HOURS);
@@ -274,12 +274,12 @@
/**
* Obtains the value of the MINUTES field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the MINUTES field.
- *
+ *
* @return Minutes of this <code>Duration</code>.
- *
+ *
*/
public int getMinutes() {
return getFieldValueAsInt(DatatypeConstants.MINUTES);
@@ -288,10 +288,10 @@
/**
* Obtains the value of the SECONDS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the SECONDS field.
- *
+ *
* @return seconds in the integer value. The fraction of seconds
* will be discarded (for example, if the actual value is 2.5,
* this method returns 2)
@@ -302,33 +302,33 @@
/**
* <p>Returns the length of the duration in milliseconds.</p>
- *
+ *
* <p>If the seconds field carries more digits than millisecond order,
- * those will be simply discarded (or in other words, rounded to zero.)
+ * those will be simply discarded (or in other words, rounded to zero.)
* For example, for any Calendar value <code>x</code>,</p>
* <pre>
* <code>new Duration("PT10.00099S").getTimeInMills(x) == 10000</code>.
* <code>new Duration("-PT10.00099S").getTimeInMills(x) == -10000</code>.
* </pre>
- *
+ *
* <p>
* Note that this method uses the {@link #addTo(Calendar)} method,
* which may work incorrectly with <code>Duration</code> objects with
* very large values in its fields. See the {@link #addTo(Calendar)}
* method for details.
- *
+ *
* @param startInstant
* The length of a month/year varies. The <code>startInstant</code> is
* used to disambiguate this variance. Specifically, this method
* returns the difference between <code>startInstant</code> and
* <code>startInstant+duration</code>
- *
+ *
* @return milliseconds between <code>startInstant</code> and
* <code>startInstant</code> plus this <code>Duration</code>
*
- * @throws NullPointerException if <code>startInstant</code> parameter
+ * @throws NullPointerException if <code>startInstant</code> parameter
* is null.
- *
+ *
*/
public long getTimeInMillis(final Calendar startInstant) {
Calendar cal = (Calendar) startInstant.clone();
@@ -339,30 +339,30 @@
/**
* <p>Returns the length of the duration in milliseconds.</p>
- *
+ *
* <p>If the seconds field carries more digits than millisecond order,
* those will be simply discarded (or in other words, rounded to zero.)
- * For example, for any <code>Date</code> value <code>x</code>,</p>
+ * For example, for any <code>Date</code> value <code>x</code>,</p>
* <pre>
* <code>new Duration("PT10.00099S").getTimeInMills(x) == 10000</code>.
* <code>new Duration("-PT10.00099S").getTimeInMills(x) == -10000</code>.
* </pre>
- *
+ *
* <p>
* Note that this method uses the {@link #addTo(Date)} method,
* which may work incorrectly with <code>Duration</code> objects with
* very large values in its fields. See the {@link #addTo(Date)}
* method for details.
- *
+ *
* @param startInstant
* The length of a month/year varies. The <code>startInstant</code> is
* used to disambiguate this variance. Specifically, this method
* returns the difference between <code>startInstant</code> and
* <code>startInstant+duration</code>.
- *
+ *
* @throws NullPointerException
* If the startInstant parameter is null.
- *
+ *
* @return milliseconds between <code>startInstant</code> and
* <code>startInstant</code> plus this <code>Duration</code>
*
@@ -376,15 +376,15 @@
}
/**
- * Gets the value of a field.
- *
+ * Gets the value of a field.
+ *
* Fields of a duration object may contain arbitrary large value.
* Therefore this method is designed to return a {@link Number} object.
- *
+ *
* In case of YEARS, MONTHS, DAYS, HOURS, and MINUTES, the returned
* number will be a non-negative integer. In case of seconds,
* the returned number may be a non-negative decimal value.
- *
+ *
* @param field
* one of the six Field constants (YEARS,MONTHS,DAYS,HOURS,
* MINUTES, or SECONDS.)
@@ -394,20 +394,20 @@
* represents its value. If it is not present, return null.
* For YEARS, MONTHS, DAYS, HOURS, and MINUTES, this method
* returns a {@link java.math.BigInteger} object. For SECONDS, this
- * method returns a {@link java.math.BigDecimal}.
- *
+ * method returns a {@link java.math.BigDecimal}.
+ *
* @throws NullPointerException If the <code>field</code> is <code>null</code>.
*/
public abstract Number getField(final DatatypeConstants.Field field);
-
+
/**
* Gets the value of a field as an <code>int</code>.
- *
- * @param field
+ *
+ * @param field
* one of the six Field constants (YEARS,MONTHS,DAYS,HOURS,
* MINUTES, or SECONDS.)
- * @return
- * If the field is present, return its value as an <code>int</code>,
+ * @return
+ * If the field is present, return its value as an <code>int</code>,
* else return <code>0</code>.
*/
private int getFieldValueAsInt(final DatatypeConstants.Field field) {
@@ -420,16 +420,16 @@
/**
* Checks if a field is set.
- *
+ *
* A field of a duration object may or may not be present.
* This method can be used to test if a field is present.
- *
+ *
* @param field
* one of the six Field constants (YEARS,MONTHS,DAYS,HOURS,
* MINUTES, or SECONDS.)
* @return
* true if the field is present. false if not.
- *
+ *
* @throws NullPointerException
* If the field parameter is null.
*/
@@ -437,7 +437,7 @@
/**
* <p>Computes a new duration whose value is <code>this+rhs</code>.</p>
- *
+ *
* <p>For example,</p>
* <pre>
* "1 day" + "-3 days" = "-2 days"
@@ -446,11 +446,11 @@
* "15 hours" + "-3 days" = "-(2 days,9 hours)"
* "1 year" + "-1 day" = IllegalStateException
* </pre>
- *
+ *
* <p>Since there's no way to meaningfully subtract 1 day from 1 month,
* there are cases where the operation fails in
- * {@link IllegalStateException}.</p>
- *
+ * {@link IllegalStateException}.</p>
+ *
* <p>
* Formally, the computation is defined as follows.</p>
* <p>
@@ -458,60 +458,60 @@
* are both positive without losing generality (i.e.,
* <code>(-X)+Y=Y-X</code>, <code>X+(-Y)=X-Y</code>,
* <code>(-X)+(-Y)=-(X+Y)</code>)
- *
+ *
* <p>
- * Addition of two positive <code>Duration</code>s are simply defined as
+ * Addition of two positive <code>Duration</code>s are simply defined as
* field by field addition where missing fields are treated as 0.
* <p>
* A field of the resulting <code>Duration</code> will be unset if and
- * only if respective fields of two input <code>Duration</code>s are unset.
+ * only if respective fields of two input <code>Duration</code>s are unset.
* <p>
* Note that <code>lhs.add(rhs)</code> will be always successful if
* <code>lhs.signum()*rhs.signum()!=-1</code> or both of them are
* normalized.</p>
- *
+ *
* @param rhs <code>Duration</code> to add to this <code>Duration</code>
- *
+ *
* @return
* non-null valid Duration object.
- *
+ *
* @throws NullPointerException
* If the rhs parameter is null.
* @throws IllegalStateException
* If two durations cannot be meaningfully added. For
* example, adding negative one day to one month causes
* this exception.
- *
- *
+ *
+ *
* @see #subtract(Duration)
*/
public abstract Duration add(final Duration rhs);
/**
* Adds this duration to a {@link Calendar} object.
- *
+ *
* <p>
* Calls {@link java.util.Calendar#add(int,int)} in the
* order of YEARS, MONTHS, DAYS, HOURS, MINUTES, SECONDS, and MILLISECONDS
* if those fields are present. Because the {@link Calendar} class
* uses int to hold values, there are cases where this method
* won't work correctly (for example if values of fields
- * exceed the range of int.)
+ * exceed the range of int.)
* </p>
- *
+ *
* <p>
* Also, since this duration class is a Gregorian duration, this
* method will not work correctly if the given {@link Calendar}
- * object is based on some other calendar systems.
+ * object is based on some other calendar systems.
* </p>
- *
+ *
* <p>
* Any fractional parts of this <code>Duration</code> object
* beyond milliseconds will be simply ignored. For example, if
* this duration is "P1.23456S", then 1 is added to SECONDS,
- * 234 is added to MILLISECONDS, and the rest will be unused.
+ * 234 is added to MILLISECONDS, and the rest will be unused.
* </p>
- *
+ *
* <p>
* Note that because {@link Calendar#add(int, int)} is using
* <tt>int</tt>, <code>Duration</code> with values beyond the
@@ -520,7 +520,7 @@
* {@link XMLGregorianCalendar#add(Duration)} provides the same
* basic operation as this method while avoiding
* the overflow/underflow issues.
- *
+ *
* @param calendar
* A calendar object whose value will be modified.
* @throws NullPointerException
@@ -530,20 +530,20 @@
/**
* Adds this duration to a {@link Date} object.
- *
+ *
* <p>
* The given date is first converted into
* a {@link java.util.GregorianCalendar}, then the duration
* is added exactly like the {@link #addTo(Calendar)} method.
- *
+ *
* <p>
* The updated time instant is then converted back into a
* {@link Date} object and used to update the given {@link Date} object.
- *
+ *
* <p>
* This somewhat redundant computation is necessary to unambiguously
* determine the duration of months and years.
- *
+ *
* @param date
* A date object whose value will be modified.
* @throws NullPointerException
@@ -561,14 +561,14 @@
}
Calendar cal = new GregorianCalendar();
- cal.setTime(date);
+ cal.setTime(date);
this.addTo(cal);
date.setTime(getCalendarTimeInMillis(cal));
}
/**
* <p>Computes a new duration whose value is <code>this-rhs</code>.</p>
- *
+ *
* <p>For example:</p>
* <pre>
* "1 day" - "-3 days" = "4 days"
@@ -577,42 +577,42 @@
* "15 hours" - "-3 days" = "3 days and 15 hours"
* "1 year" - "-1 day" = "1 year and 1 day"
* </pre>
- *
+ *
* <p>Since there's no way to meaningfully subtract 1 day from 1 month,
- * there are cases where the operation fails in {@link IllegalStateException}.</p>
- *
+ * there are cases where the operation fails in {@link IllegalStateException}.</p>
+ *
* <p>Formally the computation is defined as follows.
* First, we can assume that two <code>Duration</code>s are both positive
* without losing generality. (i.e.,
* <code>(-X)-Y=-(X+Y)</code>, <code>X-(-Y)=X+Y</code>,
* <code>(-X)-(-Y)=-(X-Y)</code>)</p>
- *
+ *
* <p>Then two durations are subtracted field by field.
* If the sign of any non-zero field <tt>F</tt> is different from
* the sign of the most significant field,
* 1 (if <tt>F</tt> is negative) or -1 (otherwise)
* will be borrowed from the next bigger unit of <tt>F</tt>.</p>
- *
+ *
* <p>This process is repeated until all the non-zero fields have
- * the same sign.</p>
- *
+ * the same sign.</p>
+ *
* <p>If a borrow occurs in the days field (in other words, if
* the computation needs to borrow 1 or -1 month to compensate
* days), then the computation fails by throwing an
* {@link IllegalStateException}.</p>
- *
+ *
* @param rhs <code>Duration</code> to subtract from this <code>Duration</code>.
- *
+ *
* @return New <code>Duration</code> created from subtracting <code>rhs</code> from this <code>Duration</code>.
- *
+ *
* @throws IllegalStateException
* If two durations cannot be meaningfully subtracted. For
* example, subtracting one day from one month causes
* this exception.
- *
+ *
* @throws NullPointerException
* If the rhs parameter is null.
- *
+ *
* @see #add(Duration)
*/
public Duration subtract(final Duration rhs) {
@@ -622,17 +622,17 @@
/**
* <p>Computes a new duration whose value is <code>factor</code> times
* longer than the value of this duration.</p>
- *
+ *
* <p>This method is provided for the convenience.
* It is functionally equivalent to the following code:</p>
* <pre>
* multiply(new BigDecimal(String.valueOf(factor)))
* </pre>
- *
+ *
* @param factor Factor times longer of new <code>Duration</code> to create.
- *
+ *
* @return New <code>Duration</code> that is <code>factor</code>times longer than this <code>Duration</code>.
- *
+ *
* @see #multiply(BigDecimal)
*/
public Duration multiply(int factor) {
@@ -642,7 +642,7 @@
/**
* Computes a new duration whose value is <code>factor</code> times
* longer than the value of this duration.
- *
+ *
* <p>
* For example,
* <pre>
@@ -650,12 +650,12 @@
* "PT1M" (1 min) * "0.3" = "PT18S" (18 seconds)
* "P1M" (1 month) * "1.5" = IllegalStateException
* </pre>
- *
+ *
* <p>
* Since the <code>Duration</code> class is immutable, this method
* doesn't change the value of this object. It simply computes
* a new Duration object and returns it.
- *
+ *
* <p>
* The operation will be performed field by field with the precision
* of {@link BigDecimal}. Since all the fields except seconds are
@@ -666,23 +666,23 @@
* which will be carried down to "PT12H" (12 hours).
* When fractions of month cannot be meaningfully carried down
* to days, or year to months, this will cause an
- * {@link IllegalStateException} to be thrown.
+ * {@link IllegalStateException} to be thrown.
* For example if you multiple one month by 0.5.</p>
- *
+ *
* <p>
* To avoid {@link IllegalStateException}, use
* the {@link #normalizeWith(Calendar)} method to remove the years
* and months fields.
- *
+ *
* @param factor to multiply by
- *
+ *
* @return
* returns a non-null valid <code>Duration</code> object
*
- * @throws IllegalStateException if operation produces fraction in
+ * @throws IllegalStateException if operation produces fraction in
* the months field.
*
- * @throws NullPointerException if the <code>factor</code> parameter is
+ * @throws NullPointerException if the <code>factor</code> parameter is
* <code>null</code>.
*
*/
@@ -691,56 +691,56 @@
/**
* Returns a new <code>Duration</code> object whose
* value is <code>-this</code>.
- *
+ *
* <p>
* Since the <code>Duration</code> class is immutable, this method
* doesn't change the value of this object. It simply computes
* a new Duration object and returns it.
- *
+ *
* @return
* always return a non-null valid <code>Duration</code> object.
*/
- public abstract Duration negate();
+ public abstract Duration negate();
/**
* <p>Converts the years and months fields into the days field
* by using a specific time instant as the reference point.</p>
- *
+ *
* <p>For example, duration of one month normalizes to 31 days
* given the start time instance "July 8th 2003, 17:40:32".</p>
- *
+ *
* <p>Formally, the computation is done as follows:</p>
* <ol>
* <li>the given Calendar object is cloned</li>
* <li>the years, months and days fields will be added to the {@link Calendar} object
- * by using the {@link Calendar#add(int,int)} method</li>
+ * by using the {@link Calendar#add(int,int)} method</li>
* <li>the difference between the two Calendars in computed in milliseconds and converted to days,
* if a remainder occurs due to Daylight Savings Time, it is discarded</li>
* <li>the computed days, along with the hours, minutes and seconds
* fields of this duration object is used to construct a new
* Duration object.</li>
* </ol>
- *
+ *
* <p>Note that since the Calendar class uses <code>int</code> to
* hold the value of year and month, this method may produce
* an unexpected result if this duration object holds
* a very large value in the years or months fields.</p>
*
* @param startTimeInstant <code>Calendar</code> reference point.
- *
+ *
* @return <code>Duration</code> of years and months of this <code>Duration</code> as days.
- *
+ *
* @throws NullPointerException If the startTimeInstant parameter is null.
*/
public abstract Duration normalizeWith(final Calendar startTimeInstant);
/**
* <p>Partial order relation comparison with this <code>Duration</code> instance.</p>
- *
+ *
* <p>Comparison result must be in accordance with
* <a href="http://www.w3.org/TR/xmlschema-2/#duration-order">W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2,
* <i>Order relation on duration</i></a>.</p>
- *
+ *
* <p>Return:</p>
* <ul>
* <li>{@link DatatypeConstants#LESSER} if this <code>Duration</code> is shorter than <code>duration</code> parameter</li>
@@ -750,16 +750,16 @@
* </ul>
*
* @param duration to compare
- *
+ *
* @return the relationship between <code>this</code> <code>Duration</code>and <code>duration</code> parameter as
* {@link DatatypeConstants#LESSER}, {@link DatatypeConstants#EQUAL}, {@link DatatypeConstants#GREATER}
* or {@link DatatypeConstants#INDETERMINATE}.
- *
+ *
* @throws UnsupportedOperationException If the underlying implementation
* cannot reasonably process the request, e.g. W3C XML Schema allows for
* arbitrarily large/small/precise values, the request may be beyond the
* implementations capability.
- * @throws NullPointerException if <code>duration</code> is <code>null</code>.
+ * @throws NullPointerException if <code>duration</code> is <code>null</code>.
*
* @see #isShorterThan(Duration)
* @see #isLongerThan(Duration)
@@ -769,26 +769,26 @@
/**
* <p>Checks if this duration object is strictly longer than
* another <code>Duration</code> object.</p>
- *
- * <p>Duration X is "longer" than Y if and only if X>Y
+ *
+ * <p>Duration X is "longer" than Y if and only if X>Y
* as defined in the section 3.2.6.2 of the XML Schema 1.0
* specification.</p>
- *
+ *
* <p>For example, "P1D" (one day) > "PT12H" (12 hours) and
- * "P2Y" (two years) > "P23M" (23 months).</p>
- *
+ * "P2Y" (two years) > "P23M" (23 months).</p>
+ *
* @param duration <code>Duration</code> to test this <code>Duration</code> against.
- *
+ *
* @throws UnsupportedOperationException If the underlying implementation
* cannot reasonably process the request, e.g. W3C XML Schema allows for
* arbitrarily large/small/precise values, the request may be beyond the
* implementations capability.
* @throws NullPointerException If <code>duration</code> is null.
- *
+ *
* @return
* true if the duration represented by this object
* is longer than the given duration. false otherwise.
- *
+ *
* @see #isShorterThan(Duration)
* @see #compare(Duration duration)
*/
@@ -799,12 +799,12 @@
/**
* <p>Checks if this duration object is strictly shorter than
* another <code>Duration</code> object.</p>
- *
+ *
* @param duration <code>Duration</code> to test this <code>Duration</code> against.
- *
+ *
* @return <code>true</code> if <code>duration</code> parameter is shorter than this <code>Duration</code>,
- * else <code>false</code>.
- *
+ * else <code>false</code>.
+ *
* @throws UnsupportedOperationException If the underlying implementation
* cannot reasonably process the request, e.g. W3C XML Schema allows for
* arbitrarily large/small/precise values, the request may be beyond the
@@ -821,14 +821,14 @@
/**
* <p>Checks if this duration object has the same duration
* as another <code>Duration</code> object.</p>
- *
+ *
* <p>For example, "P1D" (1 day) is equal to "PT24H" (24 hours).</p>
- *
+ *
* <p>Duration X is equal to Y if and only if time instant
* t+X and t+Y are the same for all the test time instants
- * specified in the section 3.2.6.2 of the XML Schema 1.0
+ * specified in the section 3.2.6.2 of the XML Schema 1.0
* specification.</p>
- *
+ *
* <p>Note that there are cases where two <code>Duration</code>s are
* "incomparable" to each other, like one month and 30 days.
* For example,</p>
@@ -837,17 +837,17 @@
* !new Duration("P1M").isLongerThan(new Duration("P30D"))
* !new Duration("P1M").equals(new Duration("P30D"))
* </pre>
- *
+ *
* @param duration
* A non-null valid <code>Duration</code> object.
- *
+ *
* @return
* <code>true</code> if this duration is the same length as
* <code>duration</code>.
* <code>false</code> if <code>duration</code> is not a
* <code>Duration</code> object, is <code>null</code>,
* or its length is different from this duration.
- *
+ *
* @throws UnsupportedOperationException If the underlying implementation
* cannot reasonably process the request, e.g. W3C XML Schema allows for
* arbitrarily large/small/precise values, the request may be beyond the
@@ -867,23 +867,23 @@
/**
* Returns a hash code consistent with the definition of the equals method.
- *
- * @see Object#hashCode()
+ *
+ * @see Object#hashCode()
*/
public abstract int hashCode();
/**
* <p>Returns a <code>String</code> representation of this <code>Duration</code> <code>Object</code>.</p>
- *
+ *
* <p>The result is formatted according to the XML Schema 1.0 specification and can be always parsed back later into the
* equivalent <code>Duration</code> <code>Object</code> by {@link DatatypeFactory#newDuration(String lexicalRepresentation)}.</p>
- *
+ *
* <p>Formally, the following holds for any <code>Duration</code>
- * <code>Object</code> x:</p>
+ * <code>Object</code> x:</p>
* <pre>
* new Duration(x.toString()).equals(x)
* </pre>
- *
+ *
* @return A non-<code>null</code> valid <code>String</code> representation of this <code>Duration</code>.
*/
public String toString() {
@@ -931,13 +931,13 @@
/**
* <p>Turns {@link BigDecimal} to a string representation.</p>
- *
+ *
* <p>Due to a behavior change in the {@link BigDecimal#toString()}
* method in JDK1.5, this had to be implemented here.</p>
- *
+ *
* @param bd <code>BigDecimal</code> to format as a <code>String</code>
- *
- * @return <code>String</code> representation of <code>BigDecimal</code>
+ *
+ * @return <code>String</code> representation of <code>BigDecimal</code>
*/
private String toString(BigDecimal bd) {
String intString = bd.unscaledValue().toString();
@@ -952,11 +952,11 @@
int insertionPoint = intString.length() - scale;
if (insertionPoint == 0) { /* Point goes right before intVal */
return "0." + intString;
- }
+ }
else if (insertionPoint > 0) { /* Point goes inside intVal */
buf = new StringBuffer(intString);
buf.insert(insertionPoint, '.');
- }
+ }
else { /* We must insert zeros between point and intVal */
buf = new StringBuffer(3 - insertionPoint + intString.length());
buf.append("0.");
@@ -973,11 +973,11 @@
* <p>Calls the {@link Calendar#getTimeInMillis} method.
* Prior to JDK1.4, this method was protected and therefore
* cannot be invoked directly.</p>
- *
+ *
* <p>TODO: In future, this should be replaced by <code>cal.getTimeInMillis()</code>.</p>
- *
+ *
* @param cal <code>Calendar</code> to get time in milliseconds.
- *
+ *
* @return Milliseconds of <code>cal</code>.
*/
private static long getCalendarTimeInMillis(final Calendar cal) {
diff --git a/luni/src/main/java/javax/xml/datatype/FactoryFinder.java b/luni/src/main/java/javax/xml/datatype/FactoryFinder.java
index 175b5f3..a940705 100644
--- a/luni/src/main/java/javax/xml/datatype/FactoryFinder.java
+++ b/luni/src/main/java/javax/xml/datatype/FactoryFinder.java
@@ -29,7 +29,7 @@
/**
* <p>Implement pluggabile Datatypes.</p>
- *
+ *
* <p>This class is duplicated for each JAXP subpackage so keep it in
* sync. It is package private for secure class loading.</p>
*
@@ -38,38 +38,38 @@
* @since 1.5
*/
final class FactoryFinder {
-
+
/**
* <p>Name of class to display in output messages.</p>
*/
private static final String CLASS_NAME = "javax.xml.datatype.FactoryFinder";
-
+
/**
* <p>Debug flag to trace loading process.</p>
*/
private static boolean debug = false;
-
+
/**
* <p>Cache properties for performance.</p>
*/
private static Properties cacheProps = new Properties();
-
+
/**
* <p>First time requires initialization overhead.</p>
*/
private static boolean firstTime = true;
-
+
/**
* Default columns per line.
*/
private static final int DEFAULT_LINE_LENGTH = 80;
-
+
/**
* <p>Check to see if debugging enabled by property.</p>
- *
+ *
* <p>Use try/catch block to support applets, which throws
* SecurityException out of this code.</p>
- *
+ *
*/
static {
try {
@@ -80,12 +80,12 @@
debug = false;
}
}
-
+
private FactoryFinder() {}
/**
* <p>Output debugging messages.</p>
- *
+ *
* @param msg <code>String</code> to print to <code>stderr</code>.
*/
private static void debugPrintln(String msg) {
@@ -99,12 +99,12 @@
/**
* <p>Find the appropriate <code>ClassLoader</code> to use.</p>
- *
+ *
* <p>The context ClassLoader is prefered.</p>
- *
+ *
* @return <code>ClassLoader</code> to use.
- *
- * @throws ConfigurationError If a valid <code>ClassLoader</code> cannot be identified.
+ *
+ * @throws ConfigurationError If a valid <code>ClassLoader</code> cannot be identified.
*/
private static ClassLoader findClassLoader()
throws ConfigurationError {
@@ -113,7 +113,7 @@
// Figure out which ClassLoader to use for loading the provider
// class. If there is a Context ClassLoader then use it.
- classLoader = SecuritySupport.getContextClassLoader();
+ classLoader = SecuritySupport.getContextClassLoader();
if (debug) debugPrintln(
"Using context class loader: "
@@ -125,27 +125,27 @@
classLoader = FactoryFinder.class.getClassLoader();
if (debug) debugPrintln(
"Using the class loader of FactoryFinder: "
- + classLoader);
+ + classLoader);
}
-
+
return classLoader;
}
/**
* <p>Create an instance of a class using the specified ClassLoader.</p>
- *
+ *
* @param className Name of class to create.
* @param classLoader ClassLoader to use to create named class.
- *
+ *
* @return New instance of specified class created using the specified ClassLoader.
- *
+ *
* @throws ConfigurationError If class could not be created.
*/
static Object newInstance(
String className,
ClassLoader classLoader)
throws ConfigurationError {
-
+
try {
Class spiClass;
if (classLoader == null) {
@@ -153,11 +153,11 @@
} else {
spiClass = classLoader.loadClass(className);
}
-
+
if (debug) {
debugPrintln("Loaded " + className + " from " + which(spiClass));
}
-
+
return spiClass.newInstance();
} catch (ClassNotFoundException x) {
throw new ConfigurationError(
@@ -178,12 +178,12 @@
* @param fallbackClassName Implementation class name, if nothing else is found. Use null to mean no fallback.
*
* @return Class Object of factory, never null
- *
+ *
* @throws ConfigurationError If Class cannot be found.
*/
static Object find(String factoryId, String fallbackClassName)
throws ConfigurationError {
-
+
ClassLoader classLoader = findClassLoader();
// Use the system property first
@@ -215,17 +215,17 @@
}
}
factoryClassName = cacheProps.getProperty(factoryId);
- if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
-
+ if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
+
if (factoryClassName != null) {
return newInstance(factoryClassName, classLoader);
}
} catch (Exception ex) {
if (debug) {
ex.printStackTrace();
- }
+ }
}
-
+
// Try Jar Service Provider Mechanism
Object provider = findJarServiceProvider(factoryId);
if (provider != null) {
@@ -284,23 +284,23 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is), DEFAULT_LINE_LENGTH);
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
// Jar Service Provider specification
factoryClassName = rd.readLine();
- }
+ }
catch (IOException x) {
// No provider found
return null;
}
finally {
- try {
- // try to close the reader.
- rd.close();
- }
- // Ignore the exception.
+ try {
+ // try to close the reader.
+ rd.close();
+ }
+ // Ignore the exception.
catch (IOException exc) {}
}
@@ -315,14 +315,14 @@
// No provider found
return null;
}
-
+
/**
* <p>Configuration Error.</p>
*/
static class ConfigurationError extends Error {
-
+
private static final long serialVersionUID = -3644413026244211347L;
-
+
/**
* <p>Exception that caused the error.</p>
*/
@@ -331,7 +331,7 @@
/**
* <p>Construct a new instance with the specified detail string and
* exception.</p>
- *
+ *
* @param msg Detail message for this error.
* @param x Exception that caused the error.
*/
@@ -342,7 +342,7 @@
/**
* <p>Get the Exception that caused the error.</p>
- *
+ *
* @return Exception that caused the error.
*/
Exception getException() {
@@ -354,28 +354,28 @@
/**
* Returns the location where the given Class is loaded from.
- *
+ *
* @param clazz Class to find load location.
- *
+ *
* @return Location where class would be loaded from.
*/
private static String which(Class clazz) {
try {
String classnameAsResource = clazz.getName().replace('.', '/') + ".class";
-
+
ClassLoader loader = clazz.getClassLoader();
-
+
URL it;
-
+
if (loader != null) {
it = loader.getResource(classnameAsResource);
} else {
it = ClassLoader.getSystemResource(classnameAsResource);
- }
-
+ }
+
if (it != null) {
return it.toString();
- }
+ }
}
// The VM ran out of memory or there was some other serious problem. Re-throw.
catch (VirtualMachineError vme) {
@@ -389,7 +389,7 @@
// work defensively.
if (debug) {
t.printStackTrace();
- }
+ }
}
return "unknown location";
}
diff --git a/luni/src/main/java/javax/xml/datatype/SecuritySupport.java b/luni/src/main/java/javax/xml/datatype/SecuritySupport.java
index 98eac32..0de4e07 100644
--- a/luni/src/main/java/javax/xml/datatype/SecuritySupport.java
+++ b/luni/src/main/java/javax/xml/datatype/SecuritySupport.java
@@ -36,9 +36,9 @@
* Security related methods that only work on J2SE 1.2 and newer.
*/
final class SecuritySupport {
-
+
private SecuritySupport() {}
-
+
static ClassLoader getContextClassLoader() {
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
diff --git a/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java b/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java
index 6d047fe..1429827 100644
--- a/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java
+++ b/luni/src/main/java/javax/xml/datatype/XMLGregorianCalendar.java
@@ -25,9 +25,9 @@
import java.util.TimeZone;
import java.util.GregorianCalendar;
-/**
+/**
* <p>Representation for W3C XML Schema 1.0 date/time datatypes.
- * Specifically, these date/time datatypes are
+ * Specifically, these date/time datatypes are
* <a href="#DATETIME"><code>dateTime</code></a>,
* <a href="#TIME"><code>time</code></a>,
* <a href="#DATE"><code>date</code></a>,
@@ -37,7 +37,7 @@
* <a href="#GMONTH"><code>gMonth</code></a> and
* <a href="#GDAY"><code>gDay</code></a> defined in the XML Namespace
* <code>"http://www.w3.org/2001/XMLSchema"</code>.
- * These datatypes are normatively defined in
+ * These datatypes are normatively defined in
* <a href="http://www.w3.org/TR/xmlschema-2/#dateTime">W3C XML Schema 1.0 Part 2, Section 3.2.7-14</a>.</p>
*
* <p>The table below defines the mapping between XML Schema 1.0
@@ -45,7 +45,7 @@
* the value constraints for the date and time fields defined in
* <a href="http://www.w3.org/TR/xmlschema-2/#isoformats">W3C XML Schema 1.0 Part 2, Appendix D,
* <i>ISO 8601 Date and Time Formats</i></a>.</p>
- *
+ *
* <a name="datetimefieldsmapping"/>
* <table border="2" rules="all" cellpadding="2">
* <thead>
@@ -58,7 +58,7 @@
* <tbody>
* <tr>
* <th>XML Schema 1.0<br/>
- * datatype<br/>
+ * datatype<br/>
* field</th>
* <th>Related<br/>XMLGregorianCalendar<br/>Accessor(s)</th>
* <th>Value Range</th>
@@ -69,13 +69,13 @@
* <td> {@link #getYear()} + {@link #getEon()} or<br/>
* {@link #getEonAndYear}
* </td>
- * <td> <code>getYear()</code> is a value between -(10^9-1) to (10^9)-1
+ * <td> <code>getYear()</code> is a value between -(10^9-1) to (10^9)-1
* or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
* {@link #getEon()} is high order year value in billion of years.<br/>
* <code>getEon()</code> has values greater than or equal to (10^9) or less than or equal to -(10^9).
* A value of null indicates field is undefined.</br>
* Given that <a href="http://www.w3.org/2001/05/xmlschema-errata#e2-63">XML Schema 1.0 errata</a> states that the year zero
- * will be a valid lexical value in a future version of XML Schema,
+ * will be a valid lexical value in a future version of XML Schema,
* this class allows the year field to be set to zero. Otherwise,
* the year field value is handled exactly as described
* in the errata and [ISO-8601-1988]. Note that W3C XML Schema 1.0
@@ -93,9 +93,9 @@
* <td> day </td>
* <td> {@link #getDay()} </td>
* <td> Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
- * The normative value constraint stated relative to month
+ * The normative value constraint stated relative to month
* field's value is in <a href="http://www.w3.org/TR/xmlschema-2/#isoformats">W3C XML Schema 1.0 Part 2, Appendix D</a>.
- * </td>
+ * </td>
* </tr>
* <tr id="datetimefield-hour">
* <td>hour</td>
@@ -122,10 +122,10 @@
* <td>
* {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}.<br/>
* <i>(Note: 60 only allowable for leap second.)</i><br/>
- * {@link #getFractionalSecond()} allows for infinite precision over the range from 0.0 to 1.0 when
+ * {@link #getFractionalSecond()} allows for infinite precision over the range from 0.0 to 1.0 when
* the {@link #getSecond()} is defined.<br/>
* <code>FractionalSecond</code> is optional and has a value of <code>null</code> when it is undefined.<br />
- * {@link #getMillisecond()} is the convenience
+ * {@link #getMillisecond()} is the convenience
* millisecond precision of value of {@link #getFractionalSecond()}.
* </td>
* </tr>
@@ -139,7 +139,7 @@
* </tbody>
* </table>
*
- * <p>All maximum value space constraints listed for the fields in the table
+ * <p>All maximum value space constraints listed for the fields in the table
* above are checked by factory methods, @{link DatatypeFactory},
* setter methods and parse methods of
* this class. <code>IllegalArgumentException</code> is thrown when a
@@ -148,7 +148,7 @@
* values constitute an invalid XMLGregorianCalendar instance (for example, if
* the 31st of June is specified).
* </p>
- *
+ *
* <p>The following operations are defined for this class:
* <ul>
* <li>accessors/mutators for independent date/time fields</li>
@@ -159,17 +159,17 @@
* {@link DatatypeFactory}</li>
* <li>partial order relation comparator method, {@link #compare(XMLGregorianCalendar xmlGregorianCalendar)}</li>
* <li>{@link #equals(Object)} defined relative to {@link #compare(XMLGregorianCalendar xmlGregorianCalendar)}.</li>
- * <li>addition operation with {@link Duration}
+ * <li>addition operation with {@link Duration}
* instance as defined in <a href="http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes">
* W3C XML Schema 1.0 Part 2, Appendix E, <i>Adding durations to dateTimes</i></a>.
* </li>
* </ul>
* </p>
- *
+ *
* @author <a href="mailto:Joseph.Fialli@Sun.com">Joseph Fialli</a>
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
- * @version $Revision: 759822 $, $Date: 2009-03-29 18:15:11 -0700 (Sun, 29 Mar 2009) $
+ * @version $Revision: 759822 $, $Date: 2009-03-29 18:15:11 -0700 (Sun, 29 Mar 2009) $
* @see Duration
* @see DatatypeFactory
* @since 1.5
@@ -181,14 +181,14 @@
/**
* <p>Unset all fields to undefined.</p>
*
- * <p>Set all int fields to {@link DatatypeConstants#FIELD_UNDEFINED} and reference fields
+ * <p>Set all int fields to {@link DatatypeConstants#FIELD_UNDEFINED} and reference fields
* to null.</p>
*/
public abstract void clear();
/**
* <p>Reset this <code>XMLGregorianCalendar</code> to its original values.</p>
- *
+ *
* <p><code>XMLGregorianCalendar</code> is reset to the same values as when it was created with
* {@link DatatypeFactory#newXMLGregorianCalendar()},
* {@link DatatypeFactory#newXMLGregorianCalendar(String lexicalRepresentation)},
@@ -234,21 +234,21 @@
* int milliseconds,
* int timezone)}.
* </p>
- *
+ *
* <p><code>reset()</code> is designed to allow the reuse of existing <code>XMLGregorianCalendar</code>s
* thus saving resources associated with the creation of new <code>XMLGregorianCalendar</code>s.</p>
*/
public abstract void reset();
-
+
/**
* <p>Set low and high order component of XSD <code>dateTime</code> year field.</p>
- *
+ *
* <p>Unset this field by invoking the setter with a parameter value of <code>null</code>.</p>
*
- * @param year value constraints summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
+ * @param year value constraints summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>year</code> parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>year</code> parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setYear(BigInteger year);
@@ -256,17 +256,17 @@
/**
* <p>Set year of XSD <code>dateTime</code> year field.</p>
*
- * <p>Unset this field by invoking the setter with a parameter value of
+ * <p>Unset this field by invoking the setter with a parameter value of
* {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
*
- * <p>Note: if the absolute value of the <code>year</code> parameter
- * is less than 10^9, the eon component of the XSD year field is set to
+ * <p>Note: if the absolute value of the <code>year</code> parameter
+ * is less than 10^9, the eon component of the XSD year field is set to
* <code>null</code> by this method.</p>
*
* @param year value constraints are summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
* If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to <code>null</code>.
*/
- public abstract void setYear(int year);
+ public abstract void setYear(int year);
/**
* <p>Set month.</p>
@@ -275,11 +275,11 @@
*
* @param month value constraints summarized in <a href="#datetimefield-month">month field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>month</code> parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>month</code> parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
- public abstract void setMonth(int month);
+ public abstract void setMonth(int month);
/**
* <p>Set days in month.</p>
@@ -288,11 +288,11 @@
*
* @param day value constraints summarized in <a href="#datetimefield-day">day field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>day</code> parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>day</code> parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
- public abstract void setDay(int day);
+ public abstract void setDay(int day);
/**
* <p>Set the number of minutes in the timezone offset.</p>
@@ -302,8 +302,8 @@
* @param offset value constraints summarized in <a href="#datetimefield-timezone">
* timezone field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>offset</code> parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>offset</code> parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setTimezone(int offset);
@@ -311,21 +311,21 @@
/**
* <p>Set time as one unit.</p>
*
- * @param hour value constraints are summarized in
+ * @param hour value constraints are summarized in
* <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
- * @param minute value constraints are summarized in
+ * @param minute value constraints are summarized in
* <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
- * @param second value constraints are summarized in
+ * @param second value constraints are summarized in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.
*
* @see #setTime(int, int, int, BigDecimal)
*
- * @throws IllegalArgumentException if any parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if any parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public void setTime(int hour, int minute, int second) {
-
+
setTime(
hour,
minute,
@@ -341,7 +341,7 @@
*
* @param hour value constraints summarized in <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>hour</code> parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>hour</code> parameter is outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setHour(int hour);
@@ -353,7 +353,7 @@
*
* @param minute value constraints summarized in <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>minute</code> parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>minute</code> parameter is outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setMinute(int minute);
@@ -365,11 +365,11 @@
*
* @param second value constraints summarized in <a href="#datetimefield-second">second field of date/time field mapping table</a>.
*
- * @throws IllegalArgumentException if <code>second</code> parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if <code>second</code> parameter is outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setSecond(int second);
-
+
/**
* <p>Set milliseconds.</p>
*
@@ -397,20 +397,20 @@
public abstract void setFractionalSecond(BigDecimal fractional);
/**
- * <p>Set time as one unit, including the optional infinite precision
+ * <p>Set time as one unit, including the optional infinite precision
* fractional seconds.</p>
*
- * @param hour value constraints are summarized in
+ * @param hour value constraints are summarized in
* <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
- * @param minute value constraints are summarized in
+ * @param minute value constraints are summarized in
* <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
- * @param second value constraints are summarized in
+ * @param second value constraints are summarized in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.
- * @param fractional value of <code>null</code> indicates this optional
+ * @param fractional value of <code>null</code> indicates this optional
* field is not set.
*
- * @throws IllegalArgumentException if any parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if any parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public void setTime(
@@ -418,7 +418,7 @@
int minute,
int second,
BigDecimal fractional) {
-
+
setHour(hour);
setMinute(minute);
setSecond(second);
@@ -428,110 +428,110 @@
/**
* <p>Set time as one unit, including optional milliseconds.</p>
*
- * @param hour value constraints are summarized in
+ * @param hour value constraints are summarized in
* <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
- * @param minute value constraints are summarized in
+ * @param minute value constraints are summarized in
* <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
- * @param second value constraints are summarized in
+ * @param second value constraints are summarized in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.
- * @param millisecond value of {@link DatatypeConstants#FIELD_UNDEFINED} indicates this
- * optional field is not set.
+ * @param millisecond value of {@link DatatypeConstants#FIELD_UNDEFINED} indicates this
+ * optional field is not set.
*
- * @throws IllegalArgumentException if any parameter is
- * outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if any parameter is
+ * outside value constraints for the field as specified in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public void setTime(int hour, int minute, int second, int millisecond) {
-
+
setHour(hour);
setMinute(minute);
setSecond(second);
setMillisecond(millisecond);
}
- /**
- * <p>Return high order component for XML Schema 1.0 dateTime datatype field for
+ /**
+ * <p>Return high order component for XML Schema 1.0 dateTime datatype field for
* <code>year</code>.
* <code>null</code> if this optional part of the year field is not defined.</p>
- *
- * <p>Value constraints for this value are summarized in
+ *
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
- * @return eon of this <code>XMLGregorianCalendar</code>. The value
+ * @return eon of this <code>XMLGregorianCalendar</code>. The value
* returned is an integer multiple of 10^9.
- *
+ *
* @see #getYear()
* @see #getEonAndYear()
*/
public abstract BigInteger getEon();
- /**
- * <p>Return low order component for XML Schema 1.0 dateTime datatype field for
+ /**
+ * <p>Return low order component for XML Schema 1.0 dateTime datatype field for
* <code>year</code> or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
- *
- * <p>Value constraints for this value are summarized in
+ *
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
- *
+ *
* @return year of this <code>XMLGregorianCalendar</code>.
- *
+ *
* @see #getEon()
* @see #getEonAndYear()
*/
public abstract int getYear();
- /**
- * <p>Return XML Schema 1.0 dateTime datatype field for
+ /**
+ * <p>Return XML Schema 1.0 dateTime datatype field for
* <code>year</code>.</p>
- *
- * <p>Value constraints for this value are summarized in
+ *
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-year">year field of date/time field mapping table</a>.</p>
- *
+ *
* @return sum of <code>eon</code> and <code>BigInteger.valueOf(year)</code>
- * when both fields are defined. When only <code>year</code> is defined,
- * return it. When both <code>eon</code> and <code>year</code> are not
+ * when both fields are defined. When only <code>year</code> is defined,
+ * return it. When both <code>eon</code> and <code>year</code> are not
* defined, return <code>null</code>.
- *
+ *
* @see #getEon()
* @see #getYear()
*/
public abstract BigInteger getEonAndYear();
- /**
+ /**
* <p>Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
- *
- * <p>Value constraints for this value are summarized in
+ *
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-month">month field of date/time field mapping table</a>.</p>
- *
+ *
* @return year of this <code>XMLGregorianCalendar</code>.
- *
+ *
*/
public abstract int getMonth();
- /**
+ /**
* Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
*
- * <p>Value constraints for this value are summarized in
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-day">day field of date/time field mapping table</a>.</p>
- *
+ *
* @see #setDay(int)
*/
public abstract int getDay();
- /**
- * Return timezone offset in minutes or
+ /**
+ * Return timezone offset in minutes or
* {@link DatatypeConstants#FIELD_UNDEFINED} if this optional field is not defined.
*
- * <p>Value constraints for this value are summarized in
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-timezone">timezone field of date/time field mapping table</a>.</p>
- *
+ *
* @see #setTimezone(int)
*/
public abstract int getTimezone();
- /**
+ /**
* Return hours or {@link DatatypeConstants#FIELD_UNDEFINED}.
* Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
*
- * <p>Value constraints for this value are summarized in
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.</p>
* @see #setTime(int, int, int)
*/
@@ -541,77 +541,77 @@
* Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
* Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
*
- * <p>Value constraints for this value are summarized in
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.</p>
* @see #setTime(int, int, int)
*/
public abstract int getMinute();
- /**
+ /**
* <p>Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
- *
+ *
* <p>Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined.
- * When this field is not defined, the optional xs:dateTime
- * fractional seconds field, represented by
+ * When this field is not defined, the optional xs:dateTime
+ * fractional seconds field, represented by
* {@link #getFractionalSecond()} and {@link #getMillisecond()},
* must not be defined.</p>
- *
- * <p>Value constraints for this value are summarized in
+ *
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
- *
+ *
* @return Second of this <code>XMLGregorianCalendar</code>.
- *
+ *
* @see #getFractionalSecond()
* @see #getMillisecond()
* @see #setTime(int, int, int)
*/
public abstract int getSecond();
- /**
+ /**
* <p>Return millisecond precision of {@link #getFractionalSecond()}.</p>
- *
+ *
* <p>This method represents a convenience accessor to infinite
- * precision fractional second value returned by
- * {@link #getFractionalSecond()}. The returned value is the rounded
- * down to milliseconds value of
- * {@link #getFractionalSecond()}. When {@link #getFractionalSecond()}
- * returns <code>null</code>, this method must return
+ * precision fractional second value returned by
+ * {@link #getFractionalSecond()}. The returned value is the rounded
+ * down to milliseconds value of
+ * {@link #getFractionalSecond()}. When {@link #getFractionalSecond()}
+ * returns <code>null</code>, this method must return
* {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
*
- * <p>Value constraints for this value are summarized in
+ * <p>Value constraints for this value are summarized in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
- *
+ *
* @return Millisecond of this <code>XMLGregorianCalendar</code>.
- *
+ *
* @see #getFractionalSecond()
* @see #setTime(int, int, int)
*/
public int getMillisecond() {
-
+
BigDecimal fractionalSeconds = getFractionalSecond();
-
+
// is field undefined?
if (fractionalSeconds == null) {
return DatatypeConstants.FIELD_UNDEFINED;
}
-
+
return getFractionalSecond().movePointRight(3).intValue();
}
- /**
+ /**
* <p>Return fractional seconds.</p>
- *
+ *
* <p><code>null</code> is returned when this optional field is not defined.</p>
- *
+ *
* <p>Value constraints are detailed in
* <a href="#datetimefield-second">second field of date/time field mapping table</a>.</p>
- *
+ *
* <p>This optional field can only have a defined value when the
- * xs:dateTime second field, represented by {@link #getSecond()},
+ * xs:dateTime second field, represented by {@link #getSecond()},
* does not return {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
*
* @return fractional seconds of this <code>XMLGregorianCalendar</code>.
- *
+ *
* @see #getSecond()
* @see #setTime(int, int, int, BigDecimal)
*/
@@ -619,17 +619,17 @@
// comparisons
/**
- * <p>Compare two instances of W3C XML Schema 1.0 date/time datatypes
- * according to partial order relation defined in
+ * <p>Compare two instances of W3C XML Schema 1.0 date/time datatypes
+ * according to partial order relation defined in
* <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">W3C XML Schema 1.0 Part 2, Section 3.2.7.3,
* <i>Order relation on dateTime</i></a>.</p>
*
* <p><code>xsd:dateTime</code> datatype field mapping to accessors of
* this class are defined in
* <a href="#datetimefieldmapping">date/time field mapping table</a>.</p>
- *
+ *
* @param xmlGregorianCalendar Instance of <code>XMLGregorianCalendar</code> to compare
- *
+ *
* @return The relationship between <code>this</code> <code>XMLGregorianCalendar</code> and
* the specified <code>xmlGregorianCalendar</code> as
* {@link DatatypeConstants#LESSER},
@@ -637,7 +637,7 @@
* {@link DatatypeConstants#GREATER} or
* {@link DatatypeConstants#INDETERMINATE}.
*
- * @throws NullPointerException if <code>xmlGregorianCalendar</code> is null.
+ * @throws NullPointerException if <code>xmlGregorianCalendar</code> is null.
*/
public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar);
@@ -646,14 +646,14 @@
*
* <p>2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z</p>
* <p>Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).</p>
- *
+ *
* @return <code>this</code> <code>XMLGregorianCalendar</code> normalized to UTC.
*/
public abstract XMLGregorianCalendar normalize();
/**
* <p>Indicates whether parameter <code>obj</code> is "equal to" this one.</p>
- *
+ *
* @param obj to compare.
*
* @return <code>true</code> when <code>obj</code> is an instance of <code>XMLGregorianCalendar</code>
@@ -671,15 +671,15 @@
/**
* <p>Returns a hash code consistent with the definition of the equals method.</p>
- *
+ *
* @return hash code of this object.
*/
public int hashCode() {
// Following two dates compare to EQUALS since in different timezones.
- // 2000-01-15T12:00:00-05:00 == 2000-01-15T13:00:00-04:00
+ // 2000-01-15T12:00:00-05:00 == 2000-01-15T13:00:00-04:00
//
- // Must ensure both instances generate same hashcode by normalizing
+ // Must ensure both instances generate same hashcode by normalizing
// this to UTC timezone.
int timezone = getTimezone();
if (timezone == DatatypeConstants.FIELD_UNDEFINED) {
@@ -696,25 +696,25 @@
+ gc.getMinute()
+ gc.getSecond();
}
-
+
/**
- * <p>Return the lexical representation of <code>this</code> instance.
- * The format is specified in
+ * <p>Return the lexical representation of <code>this</code> instance.
+ * The format is specified in
* <a href="http://www.w3.org/TR/xmlschema-2/#dateTime-order">XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
* <i>Lexical Representation</i>".</a></p>
- *
- * <p>Specific target lexical representation format is determined by
+ *
+ * <p>Specific target lexical representation format is determined by
* {@link #getXMLSchemaType()}.</p>
- *
- * @return XML, as <code>String</code>, representation of this <code>XMLGregorianCalendar</code>
- *
+ *
+ * @return XML, as <code>String</code>, representation of this <code>XMLGregorianCalendar</code>
+ *
* @throws IllegalStateException if the combination of set fields
- * does not match one of the eight defined XML Schema builtin date/time datatypes.
+ * does not match one of the eight defined XML Schema builtin date/time datatypes.
*/
public abstract String toXMLFormat();
/**
- * <p>Return the name of the XML Schema date/time type that this instance
+ * <p>Return the name of the XML Schema date/time type that this instance
* maps to. Type is computed based on fields that are set.</p>
*
* <table border="2" rules="all" cellpadding="2">
@@ -810,9 +810,9 @@
* </tr>
* </tbody>
* </table>
- *
+ *
* @throws java.lang.IllegalStateException if the combination of set fields
- * does not match one of the eight defined XML Schema builtin
+ * does not match one of the eight defined XML Schema builtin
* date/time datatypes.
* @return One of the following class constants:
* {@link DatatypeConstants#DATETIME},
@@ -828,21 +828,21 @@
/**
* <p>Returns a <code>String</code> representation of this <code>XMLGregorianCalendar</code> <code>Object</code>.</p>
- *
+ *
* <p>The result is a lexical representation generated by {@link #toXMLFormat()}.</p>
- *
+ *
* @return A non-<code>null</code> valid <code>String</code> representation of this <code>XMLGregorianCalendar</code>.
- *
+ *
* @throws IllegalStateException if the combination of set fields
* does not match one of the eight defined XML Schema builtin date/time datatypes.
- *
- * @see #toXMLFormat()
+ *
+ * @see #toXMLFormat()
*/
public String toString() {
-
+
return toXMLFormat();
}
-
+
/**
* Validate instance by <code>getXMLSchemaType()</code> constraints.
* @return true if data values are valid.
@@ -851,39 +851,39 @@
/**
* <p>Add <code>duration</code> to this instance.</p>
- *
+ *
* <p>The computation is specified in
* <a href="http://www.w3.org/TR/xmlschema-2/#adding-durations-to-dateTimes">XML Schema 1.0 Part 2, Appendix E,
* <i>Adding durations to dateTimes</i>></a>.
* <a href="#datetimefieldsmapping">date/time field mapping table</a>
- * defines the mapping from XML Schema 1.0 <code>dateTime</code> fields
+ * defines the mapping from XML Schema 1.0 <code>dateTime</code> fields
* to this class' representation of those fields.</p>
- *
+ *
* @param duration Duration to add to this <code>XMLGregorianCalendar</code>.
- *
+ *
* @throws NullPointerException when <code>duration</code> parameter is <code>null</code>.
*/
public abstract void add(Duration duration);
/**
* <p>Convert this <code>XMLGregorianCalendar</code> to a {@link GregorianCalendar}.</p>
- *
+ *
* <p>When <code>this</code> instance has an undefined field, this
- * conversion relies on the <code>java.util.GregorianCalendar</code> default
+ * conversion relies on the <code>java.util.GregorianCalendar</code> default
* for its corresponding field. A notable difference between
* XML Schema 1.0 date/time datatypes and <code>java.util.GregorianCalendar</code>
* is that Timezone value is optional for date/time datatypes and it is
* a required field for <code>java.util.GregorianCalendar</code>. See javadoc
* for <code>java.util.TimeZone.getDefault()</code> on how the default
* is determined. To explicitly specify the <code>TimeZone</code>
- * instance, see
+ * instance, see
* {@link #toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar)}.</p>
- *
+ *
* <table border="2" rules="all" cellpadding="2">
* <thead>
* <tr>
* <th align="center" colspan="2">
- * Field by Field Conversion from this class to
+ * Field by Field Conversion from this class to
* <code>java.util.GregorianCalendar</code>
* </th>
* </tr>
@@ -933,24 +933,24 @@
* </table>
* <i>*</i> designates possible loss of precision during the conversion due
* to source datatype having higher precision than target datatype.
- *
+ *
* <p>To ensure consistency in conversion implementations, the new
* <code>GregorianCalendar</code> should be instantiated in following
* manner.
* <ul>
- * <li>Using <code>timeZone</code> value as defined above, create a new
+ * <li>Using <code>timeZone</code> value as defined above, create a new
* <code>java.util.GregorianCalendar(timeZone,Locale.getDefault())</code>.
* </li>
* <li>Initialize all GregorianCalendar fields by calling {(@link GegorianCalendar#clear()}.</li>
* <li>Obtain a pure Gregorian Calendar by invoking
* <code>GregorianCalendar.setGregorianChange(
* new Date(Long.MIN_VALUE))</code>.</li>
- * <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
- * MINUTE, SECOND and MILLISECOND are set using the method
+ * <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
+ * MINUTE, SECOND and MILLISECOND are set using the method
* <code>Calendar.set(int,int)</code></li>
* </ul>
* </p>
- *
+ *
* @see #toGregorianCalendar(java.util.TimeZone, java.util.Locale, XMLGregorianCalendar)
*/
public abstract GregorianCalendar toGregorianCalendar();
@@ -958,70 +958,70 @@
/**
* <p>Convert this <code>XMLGregorianCalendar</code> along with provided parameters
* to a {@link GregorianCalendar} instance.</p>
- *
+ *
* <p> Since XML Schema 1.0 date/time datetypes has no concept of
* timezone ids or daylight savings timezone ids, this conversion operation
* allows the user to explicitly specify one with
* <code>timezone</code> parameter.</p>
- *
+ *
* <p>To compute the return value's <code>TimeZone</code> field,
* <ul>
- * <li>when parameter <code>timeZone</code> is non-null,
+ * <li>when parameter <code>timeZone</code> is non-null,
* it is the timezone field.</li>
* <li>else when <code>this.getTimezone() != FIELD_UNDEFINED</code>,
- * create a <code>java.util.TimeZone</code> with a custom timezone id
+ * create a <code>java.util.TimeZone</code> with a custom timezone id
* using the <code>this.getTimezone()</code>.</li>
- * <li>else when <code>defaults.getTimezone() != FIELD_UNDEFINED</code>,
- * create a <code>java.util.TimeZone</code> with a custom timezone id
+ * <li>else when <code>defaults.getTimezone() != FIELD_UNDEFINED</code>,
+ * create a <code>java.util.TimeZone</code> with a custom timezone id
* using <code>defaults.getTimezone()</code>.</li>
- * <li>else use the <code>GregorianCalendar</code> default timezone value
- * for the host is defined as specified by
+ * <li>else use the <code>GregorianCalendar</code> default timezone value
+ * for the host is defined as specified by
* <code>java.util.TimeZone.getDefault()</code>.</li></ul></p>
- *
+ *
* <p>To ensure consistency in conversion implementations, the new
* <code>GregorianCalendar</code> should be instantiated in following
* manner.
* <ul>
- * <li>Create a new <code>java.util.GregorianCalendar(TimeZone,
+ * <li>Create a new <code>java.util.GregorianCalendar(TimeZone,
* Locale)</code> with TimeZone set as specified above and the
- * <code>Locale</code> parameter.
+ * <code>Locale</code> parameter.
* </li>
* <li>Initialize all GregorianCalendar fields by calling {@link GregorianCalendar#clear()}</li>
* <li>Obtain a pure Gregorian Calendar by invoking
* <code>GregorianCalendar.setGregorianChange(
* new Date(Long.MIN_VALUE))</code>.</li>
- * <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
- * MINUTE, SECOND and MILLISECOND are set using the method
+ * <li>Its fields ERA, YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY,
+ * MINUTE, SECOND and MILLISECOND are set using the method
* <code>Calendar.set(int,int)</code></li>
* </ul></p>
- *
+ *
* @param timezone provide Timezone. <code>null</code> is a legal value.
* @param aLocale provide explicit Locale. Use default GregorianCalendar locale if
* value is <code>null</code>.
* @param defaults provide default field values to use when corresponding
- * field for this instance is FIELD_UNDEFINED or null.
+ * field for this instance is FIELD_UNDEFINED or null.
* If <code>defaults</code>is <code>null</code> or a field
* within the specified <code>defaults</code> is undefined,
* just use <code>java.util.GregorianCalendar</code> defaults.
* @return a java.util.GregorianCalendar conversion of this instance.
*/
public abstract GregorianCalendar toGregorianCalendar(
- java.util.TimeZone timezone,
+ java.util.TimeZone timezone,
java.util.Locale aLocale,
XMLGregorianCalendar defaults);
/**
* <p>Returns a <code>java.util.TimeZone</code> for this class.</p>
- *
- * <p>If timezone field is defined for this instance,
+ *
+ * <p>If timezone field is defined for this instance,
* returns TimeZone initialized with custom timezone id
- * of zoneoffset. If timezone field is undefined,
- * try the defaultZoneoffset that was passed in.
+ * of zoneoffset. If timezone field is undefined,
+ * try the defaultZoneoffset that was passed in.
* If defaultZoneoffset is FIELD_UNDEFINED, return
* default timezone for this host.
* (Same default as java.util.GregorianCalendar).</p>
*
- * @param defaultZoneoffset default zoneoffset if this zoneoffset is
+ * @param defaultZoneoffset default zoneoffset if this zoneoffset is
* {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @return TimeZone for this.
@@ -1030,7 +1030,7 @@
/**
* <p>Creates and returns a copy of this object.</p>
- *
+ *
* @return copy of this <code>Object</code>
*/
public abstract Object clone();
diff --git a/luni/src/main/java/javax/xml/namespace/NamespaceContext.java b/luni/src/main/java/javax/xml/namespace/NamespaceContext.java
index 182287c..2d3024a 100644
--- a/luni/src/main/java/javax/xml/namespace/NamespaceContext.java
+++ b/luni/src/main/java/javax/xml/namespace/NamespaceContext.java
@@ -78,7 +78,7 @@
* table describes the returned Namespace URI value for all
* possible prefix values:</p>
*
- * <table border="2" rules="all" cellpadding="4">
+ * <table border="2" rules="all" cellpadding="4">
* <thead>
* <tr>
* <td align="center" colspan="2">
@@ -95,7 +95,7 @@
* <tr>
* <td><code>DEFAULT_NS_PREFIX</code> ("")</td>
* <td>default Namespace URI in the current scope or
- * <code>{@link javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}</code>
+ * <code>{@link javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI("")}</code>
* when there is no default Namespace URI in the current scope</td>
* </tr>
* <tr>
@@ -122,12 +122,12 @@
* </tr>
* </tbody>
* </table>
- *
+ *
* @param prefix prefix to look up
* @return Namespace URI bound to prefix in the current scope
- */
+ */
String getNamespaceURI(String prefix);
-
+
/**
* <p>Get prefix bound to Namespace URI in the current scope.</p>
*
diff --git a/luni/src/main/java/javax/xml/namespace/QName.java b/luni/src/main/java/javax/xml/namespace/QName.java
index b0272e7..0e92ac7 100644
--- a/luni/src/main/java/javax/xml/namespace/QName.java
+++ b/luni/src/main/java/javax/xml/namespace/QName.java
@@ -27,7 +27,7 @@
import javax.xml.XMLConstants;
-/**
+/**
* <p><code>QName</code> represents a <strong>qualified name</strong>
* as defined in the XML specifications: <a
* href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2:
@@ -69,25 +69,25 @@
/**
* <p>Stream Unique Identifier.</p>
- *
+ *
* <p>To enable the compatibility <code>serialVersionUID</code>
* set the System Property
* <code>org.apache.xml.namespace.QName.useCompatibleSerialVersionUID</code>
* to a value of "1.0".</p>
*/
private static final long serialVersionUID;
-
+
/**
* <p>The original default Stream Unique Identifier.</p>
*/
private static final long defaultSerialVersionUID = -9120448754896609940L;
-
+
/**
* <p>The compatibility Stream Unique Identifier that was introduced
* with Java 5 SE SDK.</p>
*/
private static final long compatabilitySerialVersionUID = 4418622981026545151L;
-
+
static {
String compatPropValue = null;
try {
@@ -97,7 +97,7 @@
return System.getProperty("org.apache.xml.namespace.QName.useCompatibleSerialVersionUID");
}
});
- }
+ }
catch (Exception e) {}
// If 1.0 use compatibility serialVersionUID
serialVersionUID = !"1.0".equals(compatPropValue) ? defaultSerialVersionUID : compatabilitySerialVersionUID;
@@ -117,13 +117,13 @@
* <p>prefix of this <code>QName</code>.</p>
*/
private String prefix;
-
+
/**
* <p><code>String</code> representation of this <code>QName</code>.</p>
*/
private transient String qNameAsString;
- /**
+ /**
* <p><code>QName</code> constructor specifying the Namespace URI
* and local part.</p>
*
@@ -156,7 +156,7 @@
*
* @param namespaceURI Namespace URI of the <code>QName</code>
* @param localPart local part of the <code>QName</code>
- *
+ *
* @see #QName(String namespaceURI, String localPart, String
* prefix) QName(String namespaceURI, String localPart, String
* prefix)
@@ -165,7 +165,7 @@
this(namespaceURI, localPart, XMLConstants.DEFAULT_NS_PREFIX);
}
- /**
+ /**
* <p><code>QName</code> constructor specifying the Namespace URI,
* local part and prefix.</p>
*
@@ -179,12 +179,12 @@
* javax.xml.XMLConstants#NULL_NS_URI
* XMLConstants.NULL_NS_URI} value is the preferred coding
* style.</p>
- *
+ *
* <p>If the local part is <code>null</code> an
* <code>IllegalArgumentException</code> is thrown.
* A local part of "" is allowed to preserve
* compatible behavior with QName 1.0. </p>
- *
+ *
* <p>If the prefix is <code>null</code>, an
* <code>IllegalArgumentException</code> is thrown. Use {@link
* javax.xml.XMLConstants#DEFAULT_NS_PREFIX
@@ -211,20 +211,20 @@
this.namespaceURI = namespaceURI;
}
- // local part is required. "" is allowed to preserve compatibility with QName 1.0
+ // local part is required. "" is allowed to preserve compatibility with QName 1.0
if (localPart == null) {
throw new IllegalArgumentException("local part cannot be \"null\" when creating a QName");
}
this.localPart = localPart;
- // prefix is required
+ // prefix is required
if (prefix == null) {
throw new IllegalArgumentException("prefix cannot be \"null\" when creating a QName");
}
this.prefix = prefix;
}
- /**
+ /**
* <p><code>QName</code> constructor specifying the local part.</p>
*
* <p>If the local part is <code>null</code> an
@@ -244,9 +244,9 @@
* diagnosis XML validity errors. The constructors {@link
* #QName(String namespaceURI, String localPart) QName(String
* namespaceURI, String localPart)} and
- * {@link #QName(String namespaceURI, String localPart, String prefix)}
+ * {@link #QName(String namespaceURI, String localPart, String prefix)}
* are preferred.</em></p>
- *
+ *
* <p>The local part is not validated as a
* <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
* as specified in <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces
@@ -265,8 +265,8 @@
localPart,
XMLConstants.DEFAULT_NS_PREFIX);
}
-
- /**
+
+ /**
* <p>Get the Namespace URI of this <code>QName</code>.</p>
*
* @return Namespace URI of this <code>QName</code>
@@ -284,7 +284,7 @@
return localPart;
}
- /**
+ /**
* <p>Get the prefix of this <code>QName</code>.</p>
*
* <p>The prefix assigned to a <code>QName</code> might
@@ -351,7 +351,7 @@
return namespaceURI.hashCode() ^ localPart.hashCode();
}
- /**
+ /**
* <p><code>String</code> representation of this
* <code>QName</code>.</p>
*
@@ -367,7 +367,7 @@
*
* <p>Note the prefix value is <strong><em>NOT</em></strong>
* returned as part of the <code>String</code> representation.</p>
- *
+ *
* <p>This method satisfies the general contract of {@link
* java.lang.Object#toString() Object.toString()}.</p>
*
@@ -393,14 +393,14 @@
return _qNameAsString;
}
- /**
+ /**
* <p><code>QName</code> derived from parsing the formatted
* <code>String</code>.</p>
*
* <p>If the <code>String</code> is <code>null</code> or does not conform to
* {@link #toString() QName.toString()} formatting, an
* <code>IllegalArgumentException</code> is thrown.</p>
- *
+ *
* <p><em>The <code>String</code> <strong>MUST</strong> be in the
* form returned by {@link #toString() QName.toString()}.</em></p>
*
@@ -419,7 +419,7 @@
* XMLConstants.DEFAULT_NS_PREFIX}.</p>
*
* <p>This method does not do full validation of the resulting
- * <code>QName</code>.
+ * <code>QName</code>.
* <p>The Namespace URI is not validated as a
* <a href="http://www.ietf.org/rfc/rfc2396.txt">URI reference</a>.
* The local part is not validated as a
@@ -478,7 +478,7 @@
qNameAsString.substring(endOfNamespaceURI + 1),
XMLConstants.DEFAULT_NS_PREFIX);
}
-
+
/*
* For old versions of QName which didn't have a prefix field,
* <code>ObjectInputStream.defaultReadObject()</code> will initialize
@@ -486,7 +486,7 @@
* method fixes up the prefix field if it didn't exist in the serialized
* object.
*/
- private void readObject(ObjectInputStream in)
+ private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
if (prefix == null) {
diff --git a/luni/src/main/java/javax/xml/parsers/DocumentBuilder.java b/luni/src/main/java/javax/xml/parsers/DocumentBuilder.java
index 6fc393f..1e35963 100644
--- a/luni/src/main/java/javax/xml/parsers/DocumentBuilder.java
+++ b/luni/src/main/java/javax/xml/parsers/DocumentBuilder.java
@@ -55,29 +55,29 @@
*/
public abstract class DocumentBuilder {
-
+
private static final boolean DEBUG = false;
-
+
/** Protected constructor */
protected DocumentBuilder () {
}
/**
* <p>Reset this <code>DocumentBuilder</code> to its original configuration.</p>
- *
+ *
* <p><code>DocumentBuilder</code> is reset to the same state as when it was created with
* {@link DocumentBuilderFactory#newDocumentBuilder()}.
* <code>reset()</code> is designed to allow the reuse of existing <code>DocumentBuilder</code>s
* thus saving resources associated with the creation of new <code>DocumentBuilder</code>s.</p>
- *
+ *
* <p>The reset <code>DocumentBuilder</code> is not guaranteed to have the same {@link EntityResolver} or {@link ErrorHandler}
* <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal
* <code>EntityResolver</code> and <code>ErrorHandler</code>.</p>
- *
+ *
* @since 1.5
*/
public void reset() {
-
+
// implementors should override this method
throw new UnsupportedOperationException(
"This DocumentBuilder, \"" + this.getClass().getName() + "\", does not support the reset functionality."
@@ -99,13 +99,13 @@
* @exception SAXException If any parse errors occur.
* @see org.xml.sax.DocumentHandler
*/
-
+
public Document parse(InputStream is)
throws SAXException, IOException {
if (is == null) {
throw new IllegalArgumentException("InputStream cannot be null");
}
-
+
InputSource in = new InputSource(is);
return parse(in);
}
@@ -123,13 +123,13 @@
* @exception SAXException If any parse errors occur.
* @see org.xml.sax.DocumentHandler
*/
-
+
public Document parse(InputStream is, String systemId)
throws SAXException, IOException {
if (is == null) {
throw new IllegalArgumentException("InputStream cannot be null");
}
-
+
InputSource in = new InputSource(is);
in.setSystemId(systemId);
return parse(in);
@@ -147,13 +147,13 @@
* @exception SAXException If any parse errors occur.
* @see org.xml.sax.DocumentHandler
*/
-
+
public Document parse(String uri)
throws SAXException, IOException {
if (uri == null) {
throw new IllegalArgumentException("URI cannot be null");
}
-
+
InputSource in = new InputSource(uri);
return parse(in);
}
@@ -170,14 +170,14 @@
* @see org.xml.sax.DocumentHandler
* @return A new DOM Document object.
*/
-
+
public Document parse(File f) throws SAXException, IOException {
if (f == null) {
throw new IllegalArgumentException("File cannot be null");
}
-
+
String escapedURI = FilePathToURI.filepath2URI(f.getAbsolutePath());
-
+
if (DEBUG) {
System.out.println("Escaped URI = " + escapedURI);
}
@@ -198,11 +198,11 @@
* @see org.xml.sax.DocumentHandler
* @return A new DOM Document object.
*/
-
+
public abstract Document parse(InputSource is)
throws SAXException, IOException;
-
+
/**
* Indicates whether or not this parser is configured to
* understand namespaces.
@@ -220,7 +220,7 @@
* @return true if this parser is configured to validate
* XML documents; false otherwise.
*/
-
+
public abstract boolean isValidating();
/**
@@ -253,7 +253,7 @@
*
* @return A new instance of a DOM Document object.
*/
-
+
public abstract Document newDocument();
/**
@@ -263,7 +263,7 @@
*/
public abstract DOMImplementation getDOMImplementation();
-
+
/** <p>Get a reference to the the {@link Schema} being used by
* the XML processor.</p>
*
@@ -271,12 +271,12 @@
*
* @return {@link Schema} being used or <code>null</code>
* if none in use
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public Schema getSchema() {
@@ -288,23 +288,23 @@
+ "\""
);
}
-
-
+
+
/**
* <p>Get the XInclude processing mode for this parser.</p>
- *
+ *
* @return
* the return value of
* the {@link DocumentBuilderFactory#isXIncludeAware()}
* when this parser was created from factory.
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
- *
+ *
* @see DocumentBuilderFactory#setXIncludeAware(boolean)
*/
public boolean isXIncludeAware() {
diff --git a/luni/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java b/luni/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java
index 4ce53ab..f829872 100644
--- a/luni/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/luni/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java
@@ -39,7 +39,7 @@
private boolean expandEntityRef = true;
private boolean ignoreComments = false;
private boolean coalescing = false;
-
+
protected DocumentBuilderFactory () {
}
@@ -91,11 +91,11 @@
* cannot be created which satisfies the configuration requested.
* @return A new instance of a DocumentBuilder.
*/
-
+
public abstract DocumentBuilder newDocumentBuilder()
throws ParserConfigurationException;
-
-
+
+
/**
* Specifies that the parser produced by this code will
* provide support for XML namespaces. By default the value of this is set
@@ -104,7 +104,7 @@
* @param awareness true if the parser produced will provide support
* for XML namespaces; false otherwise.
*/
-
+
public void setNamespaceAware(boolean awareness) {
this.namespaceAware = awareness;
}
@@ -113,7 +113,7 @@
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this
* is set to <code>false</code>.
- *
+ *
* <p>
* Note that "the validation" here means
* <a href="http://www.w3.org/TR/REC-xml#proc-types">a validating
@@ -122,7 +122,7 @@
* (except the legacy two properties defined in JAXP 1.2.
* See <a href="#validationCompatibility">here</a> for more details.)
* </p>
- *
+ *
* <p>
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
@@ -130,11 +130,11 @@
* method <tt>false</tt>, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
* </p>
- *
+ *
* @param validating true if the parser produced will validate documents
* as they are parsed; false otherwise.
*/
-
+
public void setValidating(boolean validating) {
this.validating = validating;
}
@@ -166,7 +166,7 @@
* @param expandEntityRef true if the parser produced will expand entity
* reference nodes; false otherwise.
*/
-
+
public void setExpandEntityReferences(boolean expandEntityRef) {
this.expandEntityRef = expandEntityRef;
}
@@ -175,10 +175,10 @@
* <p>Specifies that the parser produced by this code will
* ignore comments. By default the value of this is set to <code>false
* </code>.</p>
- *
+ *
* @param ignoreComments <code>boolean</code> value to ignore comments during processing
*/
-
+
public void setIgnoringComments(boolean ignoreComments) {
this.ignoreComments = ignoreComments;
}
@@ -193,7 +193,7 @@
* to Text nodes and append it to the adjacent (if any)
* text node; false otherwise.
*/
-
+
public void setCoalescing(boolean coalescing) {
this.coalescing = coalescing;
}
@@ -205,7 +205,7 @@
* @return true if the factory is configured to produce parsers which
* are namespace aware; false otherwise.
*/
-
+
public boolean isNamespaceAware() {
return namespaceAware;
}
@@ -217,7 +217,7 @@
* @return true if the factory is configured to produce parsers
* which validate the XML content during parse; false otherwise.
*/
-
+
public boolean isValidating() {
return validating;
}
@@ -230,7 +230,7 @@
* which ignore ignorable whitespace in element content;
* false otherwise.
*/
-
+
public boolean isIgnoringElementContentWhitespace() {
return whitespace;
}
@@ -242,7 +242,7 @@
* @return true if the factory is configured to produce parsers
* which expand entity reference nodes; false otherwise.
*/
-
+
public boolean isExpandEntityReferences() {
return expandEntityRef;
}
@@ -254,7 +254,7 @@
* @return true if the factory is configured to produce parsers
* which ignores comments; false otherwise.
*/
-
+
public boolean isIgnoringComments() {
return ignoreComments;
}
@@ -268,7 +268,7 @@
* which converts CDATA nodes to Text nodes and appends it to
* the adjacent (if any) Text node; false otherwise.
*/
-
+
public boolean isCoalescing() {
return coalescing;
}
@@ -294,10 +294,10 @@
*/
public abstract Object getAttribute(String name)
throws IllegalArgumentException;
-
+
/**
* <p>Set a feature for this <code>DocumentBuilderFactory</code> and <code>DocumentBuilder</code>s created by this factory.</p>
- *
+ *
* <p>
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -305,7 +305,7 @@
* <code>DocumentBuilder</code>s it creates cannot support the feature.
* It is possible for an <code>DocumentBuilderFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* <p>
* All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
* When the feature is:</p>
@@ -322,10 +322,10 @@
* regard to possible implementation limits.
* </li>
* </ul>
- *
+ *
* @param name Feature name.
* @param value Is feature state <code>true</code> or <code>false</code>.
- *
+ *
* @throws ParserConfigurationException if this <code>DocumentBuilderFactory</code> or the <code>DocumentBuilder</code>s
* it creates cannot support this feature.
* @throws NullPointerException If the <code>name</code> parameter is null.
@@ -335,7 +335,7 @@
/**
* <p>Get the state of the named feature.</p>
- *
+ *
* <p>
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -343,33 +343,33 @@
* <code>DocumentBuilder</code>s it creates cannot support the feature.
* It is possible for an <code>DocumentBuilderFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* @param name Feature name.
- *
+ *
* @return State of the named feature.
- *
+ *
* @throws ParserConfigurationException if this <code>DocumentBuilderFactory</code>
* or the <code>DocumentBuilder</code>s it creates cannot support this feature.
*/
public abstract boolean getFeature(String name)
throws ParserConfigurationException;
-
+
/**
* Gets the {@link Schema} object specified through
* the {@link #setSchema(Schema schema)} method.
- *
- *
+ *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @return
* the {@link Schema} object that was last set through
* the {@link #setSchema(Schema)} method, or null
* if the method was not invoked since a {@link DocumentBuilderFactory}
* is created.
- *
+ *
* @since 1.5
*/
public Schema getSchema() {
@@ -382,16 +382,16 @@
);
}
-
+
/**
* <p>Set the {@link Schema} to be used by parsers created
* from this factory.
- *
+ *
* <p>
* When a {@link Schema} is non-null, a parser will use a validator
* created from it to validate documents before it passes information
* down to the application.
- *
+ *
* <p>When errors are found by the validator, the parser is responsible
* to report them to the user-specified {@link org.xml.sax.ErrorHandler}
* (or if the error handler is not set, ignore them or throw them), just
@@ -400,20 +400,20 @@
* is set, it must receive those errors, and if not, they must be
* treated according to the implementation specific
* default error handling rules.
- *
+ *
* <p>
* A validator may modify the outcome of a parse (for example by
* adding default values that were missing in documents), and a parser
* is responsible to make sure that the application will receive
- * modified DOM trees.
- *
+ * modified DOM trees.
+ *
* <p>
- * Initially, null is set as the {@link Schema}.
- *
+ * Initially, null is set as the {@link Schema}.
+ *
* <p>
* This processing will take effect even if
* the {@link #isValidating()} method returns <tt>false</tt>.
- *
+ *
* <p>It is an error to use
* the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
* property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
@@ -421,21 +421,21 @@
* Such configuration will cause a {@link ParserConfigurationException}
* exception when the {@link #newDocumentBuilder()} is invoked.</p>
*
- *
+ *
* <h4>Note for implementors</h4>
* <p>
* A parser must be able to work with any {@link Schema}
* implementation. However, parsers and schemas are allowed
* to use implementation-specific custom mechanisms
* as long as they yield the result described in the specification.
- *
+ *
* @param schema <code>Schema</code> to use or <code>null</code> to remove a schema.
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public void setSchema(Schema schema) {
@@ -447,24 +447,24 @@
+ "\""
);
}
-
+
/**
* <p>Set state of XInclude processing.</p>
- *
+ *
* <p>If XInclude markup is found in the document instance, should it be
* processed as specified in <a href="http://www.w3.org/TR/xinclude/">
* XML Inclusions (XInclude) Version 1.0</a>.</p>
- *
+ *
* <p>XInclude processing defaults to <code>false</code>.</p>
- *
+ *
* @param state Set XInclude processing to <code>true</code> or
* <code>false</code>
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public void setXIncludeAware(final boolean state) {
@@ -479,14 +479,14 @@
/**
* <p>Get state of XInclude processing.</p>
- *
+ *
* @return current state of XInclude processing
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public boolean isXIncludeAware() {
diff --git a/luni/src/main/java/javax/xml/parsers/FactoryConfigurationError.java b/luni/src/main/java/javax/xml/parsers/FactoryConfigurationError.java
index cf8c9e9..40d7fe5 100644
--- a/luni/src/main/java/javax/xml/parsers/FactoryConfigurationError.java
+++ b/luni/src/main/java/javax/xml/parsers/FactoryConfigurationError.java
@@ -52,7 +52,7 @@
*
* @param msg The error message for the exception.
*/
-
+
public FactoryConfigurationError(String msg) {
super(msg);
this.exception = null;
@@ -66,7 +66,7 @@
* @param e The exception to be encapsulated in a
* FactoryConfigurationError.
*/
-
+
public FactoryConfigurationError(Exception e) {
super(e.toString());
this.exception = e;
@@ -80,7 +80,7 @@
* FactoryConfigurationError
* @param msg The detail message.
*/
-
+
public FactoryConfigurationError(Exception e, String msg) {
super(msg);
this.exception = e;
@@ -90,30 +90,30 @@
/**
* Return the message (if any) for this error . If there is no
* message for the exception and there is an encapsulated
- * exception then the message of that exception, if it exists will be
+ * exception then the message of that exception, if it exists will be
* returned. Else the name of the encapsulated exception will be
* returned.
*
* @return The error message.
*/
-
+
public String getMessage () {
String message = super.getMessage ();
-
+
if (message == null && exception != null) {
return exception.getMessage();
}
return message;
}
-
+
/**
* Return the actual exception (if any) that caused this exception to
* be raised.
*
* @return The encapsulated exception, or null if there is none.
*/
-
+
public Exception getException () {
return exception;
}
diff --git a/luni/src/main/java/javax/xml/parsers/FilePathToURI.java b/luni/src/main/java/javax/xml/parsers/FilePathToURI.java
index 0dd38b7..4e9aa0b 100644
--- a/luni/src/main/java/javax/xml/parsers/FilePathToURI.java
+++ b/luni/src/main/java/javax/xml/parsers/FilePathToURI.java
@@ -88,7 +88,7 @@
buffer.append((char)ch);
}
}
-
+
// we saw some non-ascii character
if (i < len) {
// get UTF-8 bytes for the remaining sub-string
diff --git a/luni/src/main/java/javax/xml/parsers/ParserConfigurationException.java b/luni/src/main/java/javax/xml/parsers/ParserConfigurationException.java
index c106e4f..8374b6e 100644
--- a/luni/src/main/java/javax/xml/parsers/ParserConfigurationException.java
+++ b/luni/src/main/java/javax/xml/parsers/ParserConfigurationException.java
@@ -44,7 +44,7 @@
*
* @param msg The error message for the exception.
*/
-
+
public ParserConfigurationException(String msg) {
super(msg);
}
diff --git a/luni/src/main/java/javax/xml/parsers/SAXParser.java b/luni/src/main/java/javax/xml/parsers/SAXParser.java
index 53223ac..84b2efb 100644
--- a/luni/src/main/java/javax/xml/parsers/SAXParser.java
+++ b/luni/src/main/java/javax/xml/parsers/SAXParser.java
@@ -72,29 +72,29 @@
* @version $Revision: 584483 $, $Date: 2007-10-13 19:54:48 -0700 (Sat, 13 Oct 2007) $
*/
public abstract class SAXParser {
-
+
private static final boolean DEBUG = false;
-
+
/**
* <p>Protected constructor to prevent instantiation.
* Use {@link javax.xml.parsers.SAXParserFactory#newSAXParser()}.</p>
*/
protected SAXParser () {
-
+
}
/**
* <p>Reset this <code>SAXParser</code> to its original configuration.</p>
- *
+ *
* <p><code>SAXParser</code> is reset to the same state as when it was created with
* {@link SAXParserFactory#newSAXParser()}.
* <code>reset()</code> is designed to allow the reuse of existing <code>SAXParser</code>s
* thus saving resources associated with the creation of new <code>SAXParser</code>s.</p>
- *
+ *
* <p>The reset <code>SAXParser</code> is not guaranteed to have the same {@link Schema}
* <code>Object</code>, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal
* <code>Schema</code>.</p>
- *
+ *
* @since 1.5
*/
public void reset() {
@@ -115,14 +115,14 @@
*
* @param is InputStream containing the content to be parsed.
* @param hb The SAX HandlerBase to use.
- *
+ *
* @throws IllegalArgumentException If the given InputStream is null.
* @throws SAXException If parse produces a SAX error.
* @throws IOException If an IO error occurs interacting with the
* <code>InputStream</code>.
- *
+ *
* @see org.xml.sax.DocumentHandler
- */
+ */
public void parse(InputStream is, HandlerBase hb)
throws SAXException, IOException {
if (is == null) {
@@ -142,13 +142,13 @@
* @param is InputStream containing the content to be parsed.
* @param hb The SAX HandlerBase to use.
* @param systemId The systemId which is needed for resolving relative URIs.
- *
+ *
* @throws IllegalArgumentException If the given <code>InputStream</code> is
* <code>null</code>.
* @throws IOException If any IO error occurs interacting with the
* <code>InputStream</code>.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler version of this method instead.
*/
public void parse(
@@ -164,7 +164,7 @@
input.setSystemId(systemId);
this.parse(input, hb);
}
-
+
/**
* Parse the content of the given {@link java.io.InputStream}
* instance as XML using the specified
@@ -172,11 +172,11 @@
*
* @param is InputStream containing the content to be parsed.
* @param dh The SAX DefaultHandler to use.
- *
+ *
* @throws IllegalArgumentException If the given InputStream is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(InputStream is, DefaultHandler dh)
@@ -197,11 +197,11 @@
* @param is InputStream containing the content to be parsed.
* @param dh The SAX DefaultHandler to use.
* @param systemId The systemId which is needed for resolving relative URIs.
- *
+ *
* @throws IllegalArgumentException If the given InputStream is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler version of this method instead.
*/
public void parse(
@@ -227,11 +227,11 @@
*
* @param uri The location of the content to be parsed.
* @param hb The SAX HandlerBase to use.
- *
+ *
* @throws IllegalArgumentException If the uri is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(String uri, HandlerBase hb)
@@ -243,7 +243,7 @@
InputSource input = new InputSource(uri);
this.parse(input, hb);
}
-
+
/**
* Parse the content described by the giving Uniform Resource
* Identifier (URI) as XML using the specified
@@ -251,13 +251,13 @@
*
* @param uri The location of the content to be parsed.
* @param dh The SAX DefaultHandler to use.
- *
+ *
* @throws IllegalArgumentException If the uri is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
- */
+ */
public void parse(String uri, DefaultHandler dh)
throws SAXException, IOException {
if (uri == null) {
@@ -267,7 +267,7 @@
InputSource input = new InputSource(uri);
this.parse(input, dh);
}
-
+
/**
* Parse the content of the file specified as XML using the
* specified {@link org.xml.sax.HandlerBase}.
@@ -276,11 +276,11 @@
*
* @param f The file containing the XML to parse
* @param hb The SAX HandlerBase to use.
- *
+ *
* @throws IllegalArgumentException If the File object is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(File f, HandlerBase hb)
@@ -288,7 +288,7 @@
if (f == null) {
throw new IllegalArgumentException("File cannot be null");
}
-
+
String escapedURI = FilePathToURI.filepath2URI(f.getAbsolutePath());
if (DEBUG) {
@@ -298,18 +298,18 @@
InputSource input = new InputSource(escapedURI);
this.parse(input, hb);
}
-
+
/**
* Parse the content of the file specified as XML using the
* specified {@link org.xml.sax.helpers.DefaultHandler}.
*
* @param f The file containing the XML to parse
* @param dh The SAX DefaultHandler to use.
- *
+ *
* @throws IllegalArgumentException If the File object is null.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(File f, DefaultHandler dh)
@@ -317,7 +317,7 @@
if (f == null) {
throw new IllegalArgumentException("File cannot be null");
}
-
+
String escapedURI = FilePathToURI.filepath2URI(f.getAbsolutePath());
if (DEBUG) {
@@ -327,7 +327,7 @@
InputSource input = new InputSource(escapedURI);
this.parse(input, dh);
}
-
+
/**
* Parse the content given {@link org.xml.sax.InputSource}
* as XML using the specified
@@ -337,12 +337,12 @@
*
* @param is The InputSource containing the content to be parsed.
* @param hb The SAX HandlerBase to use.
- *
+ *
* @throws IllegalArgumentException If the <code>InputSource</code> object
* is <code>null</code>.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(InputSource is, HandlerBase hb)
@@ -360,7 +360,7 @@
}
parser.parse(is);
}
-
+
/**
* Parse the content given {@link org.xml.sax.InputSource}
* as XML using the specified
@@ -368,12 +368,12 @@
*
* @param is The InputSource containing the content to be parsed.
* @param dh The SAX DefaultHandler to use.
- *
+ *
* @throws IllegalArgumentException If the <code>InputSource</code> object
* is <code>null</code>.
* @throws IOException If any IO errors occur.
* @throws SAXException If any SAX errors occur during processing.
- *
+ *
* @see org.xml.sax.DocumentHandler
*/
public void parse(InputSource is, DefaultHandler dh)
@@ -391,14 +391,14 @@
}
reader.parse(is);
}
-
+
/**
* Returns the SAX parser that is encapsulated by the
* implementation of this class.
*
* @return The SAX parser that is encapsulated by the
* implementation of this class.
- *
+ *
* @throws SAXException If any SAX errors occur during processing.
*/
public abstract org.xml.sax.Parser getParser() throws SAXException;
@@ -409,12 +409,12 @@
*
* @return The XMLReader that is encapsulated by the
* implementation of this class.
- *
+ *
* @throws SAXException If any SAX errors occur during processing.
*/
public abstract org.xml.sax.XMLReader getXMLReader() throws SAXException;
-
+
/**
* Indicates whether or not this parser is configured to
* understand namespaces.
@@ -422,7 +422,7 @@
* @return true if this parser is configured to
* understand namespaces; false otherwise.
*/
-
+
public abstract boolean isNamespaceAware();
/**
@@ -432,7 +432,7 @@
* @return true if this parser is configured to
* validate XML documents; false otherwise.
*/
-
+
public abstract boolean isValidating();
/**
@@ -444,7 +444,7 @@
*
* @param name The name of the property to be set.
* @param value The value of the property to be set.
- *
+ *
* @throws SAXNotRecognizedException When the underlying XMLReader does
* not recognize the property name.
* @throws SAXNotSupportedException When the underlying XMLReader
@@ -479,12 +479,12 @@
*
* @return {@link Schema} being used or <code>null</code>
* if none in use
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public Schema getSchema() {
@@ -496,22 +496,22 @@
+ "\""
);
}
-
+
/**
* <p>Get the XInclude processing mode for this parser.</p>
- *
+ *
* @return
* the return value of
* the {@link SAXParserFactory#isXIncludeAware()}
* when this parser was created from factory.
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
- *
+ *
* @see SAXParserFactory#setXIncludeAware(boolean)
*/
public boolean isXIncludeAware() {
diff --git a/luni/src/main/java/javax/xml/parsers/SAXParserFactory.java b/luni/src/main/java/javax/xml/parsers/SAXParserFactory.java
index 339fccd..73c128d 100644
--- a/luni/src/main/java/javax/xml/parsers/SAXParserFactory.java
+++ b/luni/src/main/java/javax/xml/parsers/SAXParserFactory.java
@@ -39,17 +39,17 @@
* <p>Should Parsers be validating?</p>
*/
private boolean validating = false;
-
+
/**
* <p>Should Parsers be namespace aware?</p>
*/
private boolean namespaceAware = false;
-
+
/**
* <p>Protected constructor to force use of {@link #newInstance()}.</p>
*/
protected SAXParserFactory () {
-
+
}
/**
@@ -105,11 +105,11 @@
* be created which satisfies the requested configuration.
* @exception SAXException for SAX errors.
*/
-
+
public abstract SAXParser newSAXParser()
throws ParserConfigurationException, SAXException;
-
+
/**
* Specifies that the parser produced by this code will
* provide support for XML namespaces. By default the value of this is set
@@ -118,7 +118,7 @@
* @param awareness true if the parser produced by this code will
* provide support for XML namespaces; false otherwise.
*/
-
+
public void setNamespaceAware(boolean awareness) {
this.namespaceAware = awareness;
}
@@ -127,7 +127,7 @@
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this is
* set to <code>false</code>.
- *
+ *
* <p>
* Note that "the validation" here means
* <a href="http://www.w3.org/TR/REC-xml#proc-types">a validating
@@ -136,7 +136,7 @@
* (except the legacy two properties defined in JAXP 1.2.
* See <a href="#validationCompatibility">here</a> for more details.)
* </p>
- *
+ *
* <p>
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
@@ -148,7 +148,7 @@
* @param validating true if the parser produced by this code will
* validate documents as they are parsed; false otherwise.
*/
-
+
public void setValidating(boolean validating) {
this.validating = validating;
}
@@ -160,7 +160,7 @@
* @return true if the factory is configured to produce
* parsers which are namespace aware; false otherwise.
*/
-
+
public boolean isNamespaceAware() {
return namespaceAware;
}
@@ -172,7 +172,7 @@
* @return true if the factory is configured to produce parsers which validate
* the XML content during parse; false otherwise.
*/
-
+
public boolean isValidating() {
return validating;
}
@@ -199,10 +199,10 @@
* regard to possible implementation limits.
* </li>
* </ul>
- *
+ *
* @param name The name of the feature to be set.
* @param value The value of the feature to be set.
- *
+ *
* @exception ParserConfigurationException if a parser cannot
* be created which satisfies the requested configuration.
* @exception SAXNotRecognizedException When the underlying XMLReader does
@@ -224,7 +224,7 @@
* implementation of org.xml.sax.XMLReader.</p>
*
* @param name The name of the property to be retrieved.
- *
+ *
* @return Value of the requested property.
*
* @exception ParserConfigurationException if a parser cannot be created which satisfies the requested configuration.
@@ -236,23 +236,23 @@
public abstract boolean getFeature(String name)
throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException;
-
+
/**
* Gets the {@link Schema} object specified through
* the {@link #setSchema(Schema schema)} method.
- *
- *
+ *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @return
* the {@link Schema} object that was last set through
* the {@link #setSchema(Schema)} method, or null
* if the method was not invoked since a {@link SAXParserFactory}
* is created.
- *
+ *
* @since 1.5
*/
public Schema getSchema() {
@@ -264,39 +264,39 @@
+ "\""
);
}
-
+
/**
* <p>Set the {@link Schema} to be used by parsers created
* from this factory.</p>
- *
+ *
* <p>When a {@link Schema} is non-null, a parser will use a validator
* created from it to validate documents before it passes information
* down to the application.</p>
- *
+ *
* <p>When warnings/errors/fatal errors are found by the validator, the parser must
- * handle them as if those errors were found by the parser itself.
+ * handle them as if those errors were found by the parser itself.
* In other words, if the user-specified {@link org.xml.sax.ErrorHandler}
* is set, it must receive those errors, and if not, they must be
* treated according to the implementation specific
* default error handling rules.
- *
+ *
* <p>A validator may modify the SAX event stream (for example by
* adding default values that were missing in documents), and a parser
* is responsible to make sure that the application will receive
- * those modified event stream.</p>
- *
- * <p>Initially, <code>null</code> is set as the {@link Schema}.</p>
- *
+ * those modified event stream.</p>
+ *
+ * <p>Initially, <code>null</code> is set as the {@link Schema}.</p>
+ *
* <p>This processing will take effect even if
* the {@link #isValidating()} method returns <code>false</code>.
- *
+ *
* <p>It is an error to use
* the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
* property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
* property in conjunction with a non-null {@link Schema} object.
* Such configuration will cause a {@link SAXException}
* exception when those properties are set on a {@link SAXParser}.</p>
- *
+ *
* <h4>Note for implementors</h4>
* <p>
* A parser must be able to work with any {@link Schema}
@@ -304,14 +304,14 @@
* to use implementation-specific custom mechanisms
* as long as they yield the result described in the specification.
* </p>
- *
+ *
* @param schema <code>Schema</code> to use, <code>null</code> to remove a schema.
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public void setSchema(Schema schema) {
@@ -326,21 +326,21 @@
/**
* <p>Set state of XInclude processing.</p>
- *
+ *
* <p>If XInclude markup is found in the document instance, should it be
* processed as specified in <a href="http://www.w3.org/TR/xinclude/">
* XML Inclusions (XInclude) Version 1.0</a>.</p>
- *
+ *
* <p>XInclude processing defaults to <code>false</code>.</p>
- *
+ *
* @param state Set XInclude processing to <code>true</code> or
* <code>false</code>
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public void setXIncludeAware(final boolean state) {
@@ -355,14 +355,14 @@
/**
* <p>Get state of XInclude processing.</p>
- *
+ *
* @return current state of XInclude processing
- *
+ *
* @throws UnsupportedOperationException
* For backward compatibility, when implementations for
* earlier versions of JAXP is used, this exception will be
* thrown.
- *
+ *
* @since 1.5
*/
public boolean isXIncludeAware() {
diff --git a/luni/src/main/java/javax/xml/parsers/SecuritySupport.java b/luni/src/main/java/javax/xml/parsers/SecuritySupport.java
index e4f76f0..af46b7e 100644
--- a/luni/src/main/java/javax/xml/parsers/SecuritySupport.java
+++ b/luni/src/main/java/javax/xml/parsers/SecuritySupport.java
@@ -36,9 +36,9 @@
* Security related methods that only work on J2SE 1.2 and newer.
*/
final class SecuritySupport {
-
+
private SecuritySupport() {}
-
+
static ClassLoader getContextClassLoader() {
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
diff --git a/luni/src/main/java/javax/xml/transform/Result.java b/luni/src/main/java/javax/xml/transform/Result.java
index a5cb8e7..6e4c285 100644
--- a/luni/src/main/java/javax/xml/transform/Result.java
+++ b/luni/src/main/java/javax/xml/transform/Result.java
@@ -22,7 +22,7 @@
/**
* <p>An object that implements this interface contains the information
* needed to build a transformation result tree.</p>
- *
+ *
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
*/
public interface Result {
diff --git a/luni/src/main/java/javax/xml/transform/SecuritySupport.java b/luni/src/main/java/javax/xml/transform/SecuritySupport.java
index 0b052f6..120a958 100644
--- a/luni/src/main/java/javax/xml/transform/SecuritySupport.java
+++ b/luni/src/main/java/javax/xml/transform/SecuritySupport.java
@@ -36,9 +36,9 @@
* Security related methods that only work on J2SE 1.2 and newer.
*/
final class SecuritySupport {
-
+
private SecuritySupport() {}
-
+
static ClassLoader getContextClassLoader() {
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
diff --git a/luni/src/main/java/javax/xml/transform/Transformer.java b/luni/src/main/java/javax/xml/transform/Transformer.java
index b4f3c29..09503cc 100644
--- a/luni/src/main/java/javax/xml/transform/Transformer.java
+++ b/luni/src/main/java/javax/xml/transform/Transformer.java
@@ -37,7 +37,7 @@
*
* <p>A <code>Transformer</code> may be used multiple times. Parameters and
* output properties are preserved across transformations.</p>
- *
+ *
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 570103 $, $Date: 2007-08-27 06:24:55 -0700 (Mon, 27 Aug 2007) $
*/
@@ -47,22 +47,22 @@
* Default constructor is protected on purpose.
*/
protected Transformer() { }
-
+
/**
* <p>Reset this <code>Transformer</code> to its original configuration.</p>
- *
+ *
* <p><code>Transformer</code> is reset to the same state as when it was created with
* {@link TransformerFactory#newTransformer()},
* {@link TransformerFactory#newTransformer(Source source)} or
* {@link Templates#newTransformer()}.
* <code>reset()</code> is designed to allow the reuse of existing <code>Transformer</code>s
* thus saving resources associated with the creation of new <code>Transformer</code>s.</p>
- *
+ *
* <p>The reset <code>Transformer</code> is not guaranteed to have the same {@link URIResolver}
* or {@link ErrorListener} <code>Object</code>s, e.g. {@link Object#equals(Object obj)}.
* It is guaranteed to have a functionally equal <code>URIResolver</code>
* and <code>ErrorListener</code>.</p>
- *
+ *
* @since 1.5
*/
public void reset() {
@@ -133,10 +133,10 @@
* @return A parameter that has been set with setParameter.
*/
public abstract Object getParameter(String name);
-
+
/**
* <p>Set a list of parameters.</p>
- *
+ *
* <p>Note that the list of parameters is specified as a
* <code>Properties</code> <code>Object</code> which limits the parameter
* values to <code>String</code>s. Multiple calls to
@@ -146,14 +146,14 @@
* {@link #setParameter(String name, Object value)}.
* An <code>IllegalArgumentException</code> is thrown if any names do not
* conform.</p>
- *
+ *
* <p>New parameters in the list are added to any existing parameters.
* If the name of a new parameter is equal to the name of an existing
* parameter as determined by {@link java.lang.Object#equals(Object obj)},
* the existing parameter is set to the new value.</p>
- *
+ *
* @param params Parameters to set.
- *
+ *
* @throws IllegalArgumentException If any parameter names do not conform
* to the naming rules.
*/
diff --git a/luni/src/main/java/javax/xml/transform/TransformerException.java b/luni/src/main/java/javax/xml/transform/TransformerException.java
index fbcb1b0..46be51d 100644
--- a/luni/src/main/java/javax/xml/transform/TransformerException.java
+++ b/luni/src/main/java/javax/xml/transform/TransformerException.java
@@ -24,8 +24,8 @@
* during the transformation process.
*/
public class TransformerException extends Exception {
-
- // Added serialVersionUID to preserve binary compatibility
+
+ // Added serialVersionUID to preserve binary compatibility
private static final long serialVersionUID = 975798773772956428L;
/** Field locator specifies where the error occurred */
diff --git a/luni/src/main/java/javax/xml/transform/TransformerFactory.java b/luni/src/main/java/javax/xml/transform/TransformerFactory.java
index c9fbd73..f972939 100644
--- a/luni/src/main/java/javax/xml/transform/TransformerFactory.java
+++ b/luni/src/main/java/javax/xml/transform/TransformerFactory.java
@@ -31,11 +31,11 @@
* This property names a concrete subclass of the
* <code>TransformerFactory</code> abstract class. If the property is not
* defined, a platform default is be used.</p>
- *
+ *
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
*/
public abstract class TransformerFactory {
-
+
/**
* Default constructor is protected on purpose.
*/
@@ -44,7 +44,7 @@
/**
* <p>Get current state of canonicalization.</p>
- *
+ *
* @return current state canonicalization control
*/
/*
@@ -52,11 +52,11 @@
return canonicalState;
}
*/
-
+
/**
* <p>Set canonicalization control to <code>true</code> or
* </code>false</code>.</p>
- *
+ *
* @param state of canonicalization
*/
/*
@@ -133,7 +133,7 @@
* @throws TransformerConfigurationException Thrown if there are errors when
* parsing the <code>Source</code> or it is not possible to create a
* <code>Transformer</code> instance.
- *
+ *
* @see <a href="http://www.w3.org/TR/xslt">
* XSL Transformations (XSLT) Version 1.0</a>
*/
@@ -190,11 +190,11 @@
*
* @return A <code>Source</code> <code>Object</code> suitable for passing
* to the <code>TransformerFactory</code>.
- *
+ *
* @throws TransformerConfigurationException An <code>Exception</code>
* is thrown if an error occurs during parsing of the
* <code>source</code>.
- *
+ *
* @see <a href="http://www.w3.org/TR/xml-stylesheet/">
* Associating Style Sheets with XML documents Version 1.0</a>
*/
@@ -227,7 +227,7 @@
/**
* <p>Set a feature for this <code>TransformerFactory</code> and <code>Transformer</code>s
* or <code>Template</code>s created by this factory.</p>
- *
+ *
* <p>
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -235,7 +235,7 @@
* <code>Transformer</code>s or <code>Template</code>s it creates cannot support the feature.
* It is possible for an <code>TransformerFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* <p>All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
* When the feature is:</p>
* <ul>
@@ -252,10 +252,10 @@
* regard to possible implementation limits.
* </li>
* </ul>
- *
+ *
* @param name Feature name.
* @param value Is feature state <code>true</code> or <code>false</code>.
- *
+ *
* @throws TransformerConfigurationException if this <code>TransformerFactory</code>
* or the <code>Transformer</code>s or <code>Template</code>s it creates cannot support this feature.
* @throws NullPointerException If the <code>name</code> parameter is null.
@@ -273,11 +273,11 @@
* <code>Transformer</code>s or <code>Template</code>s it creates cannot support the feature.
* It is possible for an <code>TransformerFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* @param name Feature name.
- *
+ *
* @return The current state of the feature, <code>true</code> or <code>false</code>.
- *
+ *
* @throws NullPointerException If the <code>name</code> parameter is null.
*/
public abstract boolean getFeature(String name);
@@ -299,7 +299,7 @@
* implementation.
* An <code>IllegalArgumentException</code> is thrown if the underlying
* implementation doesn't recognize the attribute.
- *
+ *
* @param name The name of the attribute.
* @return value The value of the attribute.
*/
diff --git a/luni/src/main/java/javax/xml/transform/dom/DOMResult.java b/luni/src/main/java/javax/xml/transform/dom/DOMResult.java
index de430da..0ce3ec5 100644
--- a/luni/src/main/java/javax/xml/transform/dom/DOMResult.java
+++ b/luni/src/main/java/javax/xml/transform/dom/DOMResult.java
@@ -24,10 +24,10 @@
/**
* <p>Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree.</p>
- *
+ *
* <p>If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation,
* which may be retrieved with {@link #getNode()}.</p>
- *
+ *
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 569995 $, $Date: 2007-08-26 21:31:06 -0700 (Sun, 26 Aug 2007) $
*/
@@ -41,7 +41,7 @@
/**
* <p>Zero-argument default constructor.</p>
- *
+ *
* <p><code>node</code>,
* <code>siblingNode</code> and
* <code>systemId</code>
@@ -55,7 +55,7 @@
/**
* <p>Use a DOM node to create a new output target.</p>
- *
+ *
* <p>In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
@@ -65,7 +65,7 @@
* <p><code>siblingNode</code> and
* <code>systemId</code>
* will be set to <code>null</code>.</p>
- *
+ *
* @param node The DOM node that will contain the result tree.
*/
public DOMResult(Node node) {
@@ -76,7 +76,7 @@
/**
* <p>Use a DOM node to create a new output target with the specified System ID.<p>
- *
+ *
* <p>In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
@@ -84,7 +84,7 @@
* In other words, a node that accepts children.</p>
*
* <p><code>siblingNode</code> will be set to <code>null</code>.</p>
- *
+ *
* @param node The DOM node that will contain the result tree.
* @param systemId The system identifier which may be used in association with this node.
*/
@@ -96,15 +96,15 @@
/**
* <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before.</p>
- *
+ *
* <p>In practice, <code>node</code> and <code>nextSibling</code> should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
* In other words, a node that accepts children.</p>
- *
- * <p>Use <code>nextSibling</code> to specify the child node
- * where the result nodes should be inserted before.
+ *
+ * <p>Use <code>nextSibling</code> to specify the child node
+ * where the result nodes should be inserted before.
* If <code>nextSibling</code> is not a sibling of <code>node</code>,
* then an <code>IllegalArgumentException</code> is thrown.
* If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>,
@@ -112,26 +112,26 @@
* If <code>nextSibling</code> is <code>null</code>,
* then the behavior is the same as calling {@link #DOMResult(Node node)},
* i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
- *
+ *
* <p><code>systemId</code> will be set to <code>null</code>.</p>
- *
+ *
* @param node The DOM node that will contain the result tree.
* @param nextSibling The child node where the result nodes should be inserted before.
- *
+ *
* @throws IllegalArgumentException If <code>nextSibling</code> is not a sibling of <code>node</code>.
* @throws IllegalArgumentException If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>.
- *
+ *
* @since 1.5
*/
public DOMResult(Node node, Node nextSibling) {
-
+
// does the corrent parent/child relationship exist?
if (nextSibling != null) {
// cannot be a sibling of a null node
if (node == null) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
}
-
+
// nextSibling contained by node?
if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
@@ -146,14 +146,14 @@
/**
* <p>Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and
* the specified System ID.</p>
- *
+ *
* <p>In practice, <code>node</code> and <code>nextSibling</code> should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or a
* {@link org.w3c.dom.Element} node.
* In other words, a node that accepts children.</p>
*
- * <p>Use <code>nextSibling</code> to specify the child node
+ * <p>Use <code>nextSibling</code> to specify the child node
* where the result nodes should be inserted before.
* If <code>nextSibling</code> is not a sibling of <code>node</code>,
* then an <code>IllegalArgumentException</code> is thrown.
@@ -162,14 +162,14 @@
* If <code>nextSibling</code> is <code>null</code>,
* then the behavior is the same as calling {@link #DOMResult(Node node, String systemId)},
* i.e. append the result nodes as the last child of the specified node and use the specified System ID.</p>
- *
+ *
* @param node The DOM node that will contain the result tree.
* @param nextSibling The child node where the result nodes should be inserted before.
* @param systemId The system identifier which may be used in association with this node.
- *
+ *
* @throws IllegalArgumentException If <code>nextSibling</code> is not a sibling of <code>node</code>.
* @throws IllegalArgumentException If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>.
- *
+ *
* @since 1.5
*/
public DOMResult(Node node, Node nextSibling, String systemId) {
@@ -180,7 +180,7 @@
if (node == null) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
}
-
+
// nextSibling contained by node?
if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
@@ -194,20 +194,20 @@
/**
* <p>Set the node that will contain the result DOM tree.<p>
- *
+ *
* <p>In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
* In other words, a node that accepts children.</p>
- *
+ *
* <p>An <code>IllegalStateException</code> is thrown if <code>nextSibling</code> is not <code>null</code> and
- * <code>node</code> is not a parent of <code>nextSibling</code>.
+ * <code>node</code> is not a parent of <code>nextSibling</code>.
* An <code>IllegalStateException</code> is thrown if <code>node</code> is <code>null</code> and
- * <code>nextSibling</code> is not <code>null</code>.</p>
+ * <code>nextSibling</code> is not <code>null</code>.</p>
*
* @param node The node to which the transformation will be appended.
- *
+ *
* @throws IllegalStateException If <code>nextSibling</code> is not <code>null</code> and
* <code>nextSibling</code> is not a child of <code>node</code>.
* @throws IllegalStateException If <code>node</code> is <code>null</code> and
@@ -220,7 +220,7 @@
if (node == null) {
throw new IllegalStateException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
}
-
+
// nextSibling contained by node?
if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
@@ -232,7 +232,7 @@
/**
* <p>Get the node that will contain the result DOM tree.</p>
- *
+ *
* <p>If no node was set via
* {@link #DOMResult(Node node)},
* {@link #DOMResult(Node node, String systeId)},
@@ -260,23 +260,23 @@
* If <code>nextSibling</code> is <code>null</code>,
* then the behavior is the same as calling {@link #DOMResult(Node node)},
* i.e. append the result nodes as the last child of the specified <code>node</code>.</p>
- *
+ *
* @param nextSibling The child node before which the result nodes will be inserted.
- *
+ *
* @throws IllegalArgumentException If <code>nextSibling</code> is not a descendant of <code>node</code>.
* @throws IllegalStateException If <code>node</code> is <code>null</code> and <code>nextSibling</code> is not <code>null</code>.
- *
+ *
* @since 1.5
*/
public void setNextSibling(Node nextSibling) {
-
+
// does the corrent parent/child relationship exist?
if (nextSibling != null) {
// cannot be a sibling of a null node
if (node == null) {
throw new IllegalStateException("Cannot create a DOMResult when the nextSibling is contained by the \"null\" node.");
}
-
+
// nextSibling contained by node?
if ((node.compareDocumentPosition(nextSibling)&Node.DOCUMENT_POSITION_CONTAINED_BY)==0) {
throw new IllegalArgumentException("Cannot create a DOMResult when the nextSibling is not contained by the node.");
@@ -288,7 +288,7 @@
/**
* <p>Get the child node before which the result nodes will be inserted.</p>
- *
+ *
* <p>If no node was set via
* {@link #DOMResult(Node node, Node nextSibling)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
@@ -296,7 +296,7 @@
* then <code>null</code> will be returned.</p>
*
* @return The child node before which the result nodes will be inserted.
- *
+ *
* @since 1.5
*/
public Node getNextSibling() {
@@ -314,7 +314,7 @@
/**
* <p>Get the System Identifier.</p>
- *
+ *
* <p>If no System ID was set via
* {@link #DOMResult(Node node, String systemId)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
@@ -338,7 +338,7 @@
/**
* <p>The child node before which the result nodes will be inserted.</p>
- *
+ *
* @since 1.5
*/
private Node nextSibling = null;
diff --git a/luni/src/main/java/javax/xml/transform/dom/DOMSource.java b/luni/src/main/java/javax/xml/transform/dom/DOMSource.java
index b37c173..e7a6116 100644
--- a/luni/src/main/java/javax/xml/transform/dom/DOMSource.java
+++ b/luni/src/main/java/javax/xml/transform/dom/DOMSource.java
@@ -26,12 +26,12 @@
/**
* <p>Acts as a holder for a transformation Source tree in the
* form of a Document Object Model (DOM) tree.</p>
- *
+ *
* <p>Note that XSLT requires namespace support. Attempting to transform a DOM
* that was not contructed with a namespace-aware parser may result in errors.
* Parsers can be made namespace aware by calling
* {@link javax.xml.parsers.DocumentBuilderFactory#setNamespaceAware(boolean awareness)}.</p>
- *
+ *
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 446598 $, $Date: 2006-09-15 05:55:40 -0700 (Fri, 15 Sep 2006) $
* @see <a href="http://www.w3.org/TR/DOM-Level-2">Document Object Model (DOM) Level 2 Specification</a>
diff --git a/luni/src/main/java/javax/xml/transform/sax/SAXResult.java b/luni/src/main/java/javax/xml/transform/sax/SAXResult.java
index c327b0e..efda7f6 100644
--- a/luni/src/main/java/javax/xml/transform/sax/SAXResult.java
+++ b/luni/src/main/java/javax/xml/transform/sax/SAXResult.java
@@ -26,7 +26,7 @@
/**
* <p>Acts as an holder for a transformation Result.</p>
- *
+ *
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
*/
public class SAXResult implements Result {
diff --git a/luni/src/main/java/javax/xml/transform/sax/SAXSource.java b/luni/src/main/java/javax/xml/transform/sax/SAXSource.java
index 62381bb..5bd1391 100644
--- a/luni/src/main/java/javax/xml/transform/sax/SAXSource.java
+++ b/luni/src/main/java/javax/xml/transform/sax/SAXSource.java
@@ -27,13 +27,13 @@
/**
* <p>Acts as an holder for SAX-style Source.</p>
- *
+ *
* <p>Note that XSLT requires namespace support. Attempting to transform an
* input source that is not
* generated with a namespace-aware parser may result in errors.
* Parsers can be made namespace aware by calling the
* {@link javax.xml.parsers.SAXParserFactory#setNamespaceAware(boolean awareness)} method.</p>
- *
+ *
* @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 446598 $, $Date: 2006-09-15 05:55:40 -0700 (Fri, 15 Sep 2006) $
*/
diff --git a/luni/src/main/java/javax/xml/transform/sax/TransformerHandler.java b/luni/src/main/java/javax/xml/transform/sax/TransformerHandler.java
index f044ac0..dd01bf7 100644
--- a/luni/src/main/java/javax/xml/transform/sax/TransformerHandler.java
+++ b/luni/src/main/java/javax/xml/transform/sax/TransformerHandler.java
@@ -62,7 +62,7 @@
/**
* <p>Get the <code>Transformer</code> associated with this handler, which
* is needed in order to set parameters and output properties.</p>
- *
+ *
* @return <code>Transformer</code> associated with this
* <code>TransformerHandler</code>.
*/
diff --git a/luni/src/main/java/javax/xml/transform/stream/FilePathToURI.java b/luni/src/main/java/javax/xml/transform/stream/FilePathToURI.java
index 6310312..b9b9aaf 100644
--- a/luni/src/main/java/javax/xml/transform/stream/FilePathToURI.java
+++ b/luni/src/main/java/javax/xml/transform/stream/FilePathToURI.java
@@ -88,7 +88,7 @@
buffer.append((char)ch);
}
}
-
+
// we saw some non-ascii character
if (i < len) {
// get UTF-8 bytes for the remaining sub-string
diff --git a/luni/src/main/java/javax/xml/transform/stream/StreamResult.java b/luni/src/main/java/javax/xml/transform/stream/StreamResult.java
index 7a92a7c..f32765a 100644
--- a/luni/src/main/java/javax/xml/transform/stream/StreamResult.java
+++ b/luni/src/main/java/javax/xml/transform/stream/StreamResult.java
@@ -149,7 +149,7 @@
/**
* <p>Set the system ID from a <code>File</code> reference.</p>
- *
+ *
* <p>Note the use of {@link File#toURI()} and {@link File#toURL()}.
* <code>toURI()</code> is preferred and used if possible.
* To allow JAXP 1.3 to run on J2SE 1.3, <code>toURL()</code>
diff --git a/luni/src/main/java/javax/xml/transform/stream/StreamSource.java b/luni/src/main/java/javax/xml/transform/stream/StreamSource.java
index 61b7b7d..7c2157f 100644
--- a/luni/src/main/java/javax/xml/transform/stream/StreamSource.java
+++ b/luni/src/main/java/javax/xml/transform/stream/StreamSource.java
@@ -43,7 +43,7 @@
*/
public static final String FEATURE =
"http://javax.xml.transform.stream.StreamSource/feature";
-
+
/**
* <p>Zero-argument default constructor. If this constructor is used, and
* no Stream source is set using
@@ -52,9 +52,9 @@
* <code>Transformer</code> will
* create an empty source {@link java.io.InputStream} using
* {@link java.io.InputStream#InputStream() new InputStream()}.</p>
- *
+ *
* @see javax.xml.transform.Transformer#transform(Source xmlSource, Result outputTarget)
- */
+ */
public StreamSource() { }
/**
diff --git a/luni/src/main/java/javax/xml/validation/Schema.java b/luni/src/main/java/javax/xml/validation/Schema.java
index ddb21f4..3dd4ba4 100644
--- a/luni/src/main/java/javax/xml/validation/Schema.java
+++ b/luni/src/main/java/javax/xml/validation/Schema.java
@@ -21,37 +21,37 @@
/**
* Immutable in-memory representation of grammar.
- *
+ *
* <p>
* This object represents a set of constraints that can be checked/
- * enforced against an XML document.
- *
+ * enforced against an XML document.
+ *
* <p>
* A {@link Schema} object is thread safe and applications are
* encouraged to share it across many parsers in many threads.
- *
+ *
* <p>
* A {@link Schema} object is immutable in the sense that it shouldn't
* change the set of constraints once it is created. In other words,
* if an application validates the same document twice against the same
- * {@link Schema}, it must always produce the same result.
- *
+ * {@link Schema}, it must always produce the same result.
+ *
* <p>
* A {@link Schema} object is usually created from {@link SchemaFactory}.
- *
+ *
* <p>
* Two kinds of validators can be created from a {@link Schema} object.
* One is {@link Validator}, which provides highly-level validation
* operations that cover typical use cases. The other is
* {@link ValidatorHandler}, which works on top of SAX for better
* modularity.
- *
+ *
* <p>
* This specification does not refine
* the {@link java.lang.Object#equals(java.lang.Object)} method.
* In other words, if you parse the same schema twice, you may
* still get <code>!schemaA.equals(schemaB)</code>.
- *
+ *
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 446598 $, $Date: 2006-09-15 05:55:40 -0700 (Fri, 15 Sep 2006) $
* @see <a href="http://www.w3.org/TR/xmlschema-1/">XML Schema Part 1: Structures</a>
@@ -60,31 +60,31 @@
* @since 1.5
*/
public abstract class Schema {
-
+
/**
* Constructor for the derived class.
- *
+ *
* <p>
* The constructor does nothing.
*/
protected Schema() {
}
-
+
/**
* Creates a new {@link Validator} for this {@link Schema}.
- *
+ *
* <p>
* A validator enforces/checks the set of constraints this object
* represents.
- *
+ *
* @return
* Always return a non-null valid object.
*/
public abstract Validator newValidator();
-
+
/**
* Creates a new {@link ValidatorHandler} for this {@link Schema}.
- *
+ *
* @return
* Always return a non-null valid object.
*/
diff --git a/luni/src/main/java/javax/xml/validation/SchemaFactory.java b/luni/src/main/java/javax/xml/validation/SchemaFactory.java
index aff316e..a341494 100644
--- a/luni/src/main/java/javax/xml/validation/SchemaFactory.java
+++ b/luni/src/main/java/javax/xml/validation/SchemaFactory.java
@@ -38,46 +38,46 @@
* <p>
* {@link SchemaFactory} is a schema compiler. It reads external
* representations of schemas and prepares them for validation.
- *
+ *
* <p>
* The {@link SchemaFactory} class is not thread-safe. In other words,
* it is the application's responsibility to ensure that at most
* one thread is using a {@link SchemaFactory} object at any
* given moment. Implementations are encouraged to mark methods
* as <tt>synchronized</tt> to protect themselves from broken clients.
- *
+ *
* <p>
* {@link SchemaFactory} is not re-entrant. While one of the
* <code>newSchema</code> methods is being invoked, applications
* may not attempt to recursively invoke the <code>newSchema</code> method,
* even from the same thread.
- *
+ *
* <h2><a name="schemaLanguage"></a>Schema Language</h2>
* <p>
* This spec uses a namespace URI to designate a schema language.
* The following table shows the values defined by this specification.
* <p>
- * To be compliant with the spec, the implementation
+ * To be compliant with the spec, the implementation
* is only required to support W3C XML Schema 1.0. However,
* if it chooses to support other schema languages listed here,
* it must conform to the relevant behaviors described in this spec.
- *
+ *
* <p>
* Schema languages not listed here are expected to
- * introduce their own URIs to represent themselves.
+ * introduce their own URIs to represent themselves.
* The {@link SchemaFactory} class is capable of locating other
* implementations for other schema languages at run-time.
- *
+ *
* <p>
* Note that because the XML DTD is strongly tied to the parsing process
* and has a significant effect on the parsing process, it is impossible
- * to define the DTD validation as a process independent from parsing.
+ * to define the DTD validation as a process independent from parsing.
* For this reason, this specification does not define the semantics for
* the XML DTD. This doesn't prohibit implementors from implementing it
* in a way they see fit, but <em>users are warned that any DTD
* validation implemented on this interface necessarily deviate from
* the XML DTD semantics as defined in the XML 1.0</em>.
- *
+ *
* <table border="1" cellpadding="2">
* <thead>
* <tr>
@@ -96,29 +96,29 @@
* </tr>
* </tbody>
* </table>
- *
+ *
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 884952 $, $Date: 2009-11-27 10:55:08 -0800 (Fri, 27 Nov 2009) $
* @since 1.5
*/
public abstract class SchemaFactory {
-
+
/**
* <p>Constructor for derived classes.</p>
- *
+ *
* <p>The constructor does nothing.</p>
- *
+ *
* <p>Derived classes must create {@link SchemaFactory} objects that have
* <code>null</code> {@link ErrorHandler} and
* <code>null</code> {@link LSResourceResolver}.</p>
*/
protected SchemaFactory() {
}
-
+
/**
* <p>Lookup an implementation of the <code>SchemaFactory</code> that supports the specified
* schema language and return it.</p>
- *
+ *
* <p>To find a <code>SchemaFactory</code> object for a given schema language,
* this method looks the following places in the following order
* where "the class loader" refers to the context class loader:</p>
@@ -144,7 +144,7 @@
* Each potential service provider is required to implement the method:</p>
* <pre>
* {@link #isSchemaLanguageSupported(String schemaLanguage)}
- * </pre>
+ * </pre>
* The first service provider found in class loader order that supports the specified schema language is returned.
* </li>
* <li>
@@ -153,9 +153,9 @@
* <code>SchemaFactory</code> for W3C XML Schema.
* </li>
* </ol>
- *
+ *
* <p>If everything fails, {@link IllegalArgumentException} will be thrown.</p>
- *
+ *
* <p><strong>Tip for Trouble-shooting:</strong></p>
* <p>See {@link java.util.Properties#load(java.io.InputStream)} for
* exactly how a property file is parsed. In particular, colons ':'
@@ -164,30 +164,30 @@
* <pre>
* http\://www.w3.org/2001/XMLSchema=org.acme.foo.XSSchemaFactory
* </pre>
- *
+ *
* @param schemaLanguage
* Specifies the schema language which the returned
* SchemaFactory will understand. See
* <a href="#schemaLanguage">the list of available
* schema languages</a> for the possible values.
- *
+ *
* @return New instance of a <code>SchemaFactory</code>
- *
+ *
* @throws IllegalArgumentException
* If no implementation of the schema language is available.
- *
+ *
* @throws NullPointerException
* If the <tt>schemLanguage</tt> parameter is null.
*/
public static final SchemaFactory newInstance(String schemaLanguage) {
- ClassLoader cl;
+ ClassLoader cl;
cl = SecuritySupport.getContextClassLoader();
-
+
if (cl == null) {
//cl = ClassLoader.getSystemClassLoader();
//use the current class loader
cl = SchemaFactory.class.getClassLoader();
- }
+ }
SchemaFactory f = new SchemaFactoryFinder(cl).newFactory(schemaLanguage);
if (f == null) {
@@ -226,19 +226,19 @@
// return f;
// }
// END android-only
-
+
/**
* <p>Is specified schema supported by this <code>SchemaFactory</code>?</p>
- *
+ *
* @param schemaLanguage Specifies the schema language which the returned <code>SchemaFactory</code> will understand.
* <code>schemaLanguage</code> must specify a <a href="#schemaLanguage">valid</a> schema language.
- *
+ *
* @return <code>true</code> if <code>SchemaFactory</code> supports <code>schemaLanguage</code>, else <code>false</code>.
- *
+ *
* @throws NullPointerException If <code>schemaLanguage</code> is <code>null</code>.
* @throws IllegalArgumentException If <code>schemaLanguage.length() == 0</code>
- * or <code>schemaLanguage</code> does not specify a <a href="#schemaLanguage">valid</a> schema language.
- */
+ * or <code>schemaLanguage</code> does not specify a <a href="#schemaLanguage">valid</a> schema language.
+ */
public abstract boolean isSchemaLanguageSupported(String schemaLanguage);
/**
@@ -256,20 +256,20 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link SchemaFactory} recognizes the feature name but
+ * {@link SchemaFactory} recognizes the feature name but
* cannot determine its value at this time.
* @exception NullPointerException
* if the name parameter is null.
* @see #setFeature(String, boolean)
*/
public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
-
+
if (name == null) {
throw new NullPointerException("the name parameter is null");
- }
+ }
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a feature flag.
*
@@ -297,28 +297,28 @@
* regard to possible implementation limits.
* </li>
* </ul>
- *
+ *
* @param name The feature name, which is a non-null fully-qualified URI.
* @param value The requested value of the feature (true or false).
- *
+ *
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link SchemaFactory} recognizes the feature name but
+ * {@link SchemaFactory} recognizes the feature name but
* cannot set the requested value.
* @exception NullPointerException
* if the name parameter is null.
- *
+ *
* @see #getFeature(String)
*/
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
-
+
if (name == null) {
throw new NullPointerException("the name parameter is null");
- }
+ }
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a property.
*
@@ -334,19 +334,19 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link SchemaFactory} recognizes the property name but
+ * {@link SchemaFactory} recognizes the property name but
* cannot set the requested value.
* @exception NullPointerException
* if the name parameter is null.
*/
public void setProperty(String name, Object object) throws SAXNotRecognizedException, SAXNotSupportedException {
-
+
if (name == null) {
throw new NullPointerException("the name parameter is null");
- }
+ }
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Look up the value of a property.
*
@@ -365,51 +365,51 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
+ * XMLReader recognizes the property name but
* cannot determine its value at this time.
* @exception NullPointerException
* if the name parameter is null.
* @see #setProperty(String, Object)
*/
public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
-
+
if (name == null) {
throw new NullPointerException("the name parameter is null");
- }
+ }
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Sets the {@link ErrorHandler} to receive errors encountered
* during the <code>newSchema</code> method invocation.
- *
+ *
* <p>
* Error handler can be used to customize the error handling process
* during schema parsing. When an {@link ErrorHandler} is set,
* errors found during the parsing of schemas will be first sent
* to the {@link ErrorHandler}.
- *
+ *
* <p>
* The error handler can abort the parsing of a schema immediately
* by throwing {@link SAXException} from the handler. Or for example
* it can print an error to the screen and try to continue the
- * processing by returning normally from the {@link ErrorHandler}
- *
+ * processing by returning normally from the {@link ErrorHandler}
+ *
* <p>
* If any {@link Throwable} (or instances of its derived classes)
* is thrown from an {@link ErrorHandler},
* the caller of the <code>newSchema</code> method will be thrown
* the same {@link Throwable} object.
- *
+ *
* <p>
* {@link SchemaFactory} is not allowed to
* throw {@link SAXException} without first reporting it to
* {@link ErrorHandler}.
- *
+ *
* <p>
* Applications can call this method even during a {@link Schema}
- * is being parsed.
- *
+ * is being parsed.
+ *
* <p>
* When the {@link ErrorHandler} is null, the implementation will
* behave as if the following {@link ErrorHandler} is set:
@@ -426,36 +426,36 @@
* }
* }
* </pre>
- *
+ *
* <p>
* When a new {@link SchemaFactory} object is created, initially
* this field is set to null. This field will <em>NOT</em> be
- * inherited to {@link Schema}s, {@link Validator}s, or
+ * inherited to {@link Schema}s, {@link Validator}s, or
* {@link ValidatorHandler}s that are created from this {@link SchemaFactory}.
- *
- *
+ *
+ *
* @param errorHandler
* A new error handler to be set. This parameter can be null.
*/
public abstract void setErrorHandler(ErrorHandler errorHandler);
-
+
/**
* Gets the current {@link ErrorHandler} set to this {@link SchemaFactory}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setErrorHandler(ErrorHandler)} method, or null
* if that method has never been called since this {@link SchemaFactory}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract ErrorHandler getErrorHandler();
-
+
/**
* Sets the {@link LSResourceResolver} to customize
* resource resolution when parsing schemas.
- *
+ *
* <p>
* {@link SchemaFactory} uses a {@link LSResourceResolver}
* when it needs to locate external resources while parsing schemas,
@@ -463,11 +463,11 @@
* up to each schema language. For example, for W3C XML Schema,
* this includes files <tt><include></tt>d or <tt><import></tt>ed,
* and DTD referenced from schema files, etc.
- *
+ *
* <p>
* Applications can call this method even during a {@link Schema}
- * is being parsed.
- *
+ * is being parsed.
+ *
* <p>
* When the {@link LSResourceResolver} is null, the implementation will
* behave as if the following {@link LSResourceResolver} is set:
@@ -475,107 +475,107 @@
* class DumbDOMResourceResolver implements {@link LSResourceResolver} {
* public {@link org.w3c.dom.ls.LSInput} resolveResource(
* String publicId, String systemId, String baseURI) {
- *
+ *
* return null; // always return null
* }
* }
* </pre>
- *
+ *
* <p>
* If a {@link LSResourceResolver} throws a {@link RuntimeException}
* (or instances of its derived classes),
- * then the {@link SchemaFactory} will abort the parsing and
+ * then the {@link SchemaFactory} will abort the parsing and
* the caller of the <code>newSchema</code> method will receive
- * the same {@link RuntimeException}.
- *
+ * the same {@link RuntimeException}.
+ *
* <p>
* When a new {@link SchemaFactory} object is created, initially
* this field is set to null. This field will <em>NOT</em> be
- * inherited to {@link Schema}s, {@link Validator}s, or
+ * inherited to {@link Schema}s, {@link Validator}s, or
* {@link ValidatorHandler}s that are created from this {@link SchemaFactory}.
- *
+ *
* @param resourceResolver
* A new resource resolver to be set. This parameter can be null.
*/
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
-
+
/**
* Gets the current {@link LSResourceResolver} set to this {@link SchemaFactory}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setResourceResolver(LSResourceResolver)} method, or null
* if that method has never been called since this {@link SchemaFactory}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract LSResourceResolver getResourceResolver();
-
+
/**
* <p>Parses the specified source as a schema and returns it as a schema.</p>
- *
+ *
* <p>This is a convenience method for {@link #newSchema(Source[] schemas)}.</p>
- *
+ *
* @param schema Source that represents a schema.
- *
+ *
* @return New <code>Schema</code> from parsing <code>schema</code>.
- *
+ *
* @throws SAXException If a SAX error occurs during parsing.
* @throws NullPointerException if <tt>schema</tt> is null.
*/
public Schema newSchema(Source schema) throws SAXException {
return newSchema(new Source[]{schema});
}
-
+
/**
* <p>Parses the specified <code>File</code> as a schema and returns it as a <code>Schema</code>.</p>
- *
+ *
* <p>This is a convenience method for {@link #newSchema(Source schema)}.</p>
- *
+ *
* @param schema File that represents a schema.
- *
+ *
* @return New <code>Schema</code> from parsing <code>schema</code>.
- *
+ *
* @throws SAXException If a SAX error occurs during parsing.
* @throws NullPointerException if <tt>schema</tt> is null.
*/
public Schema newSchema(File schema) throws SAXException {
return newSchema(new StreamSource(schema));
}
-
+
/**
* <p>Parses the specified <code>URL</code> as a schema and returns it as a <code>Schema</code>.</p>
- *
+ *
* <p>This is a convenience method for {@link #newSchema(Source schema)}.</p>
- *
+ *
* @param schema <code>URL</code> that represents a schema.
- *
+ *
* @return New <code>Schema</code> from parsing <code>schema</code>.
- *
+ *
* @throws SAXException If a SAX error occurs during parsing.
* @throws NullPointerException if <tt>schema</tt> is null.
*/
public Schema newSchema(URL schema) throws SAXException {
return newSchema(new StreamSource(schema.toExternalForm()));
}
-
+
/**
* Parses the specified source(s) as a schema and returns it as a schema.
- *
+ *
* <p>
* The callee will read all the {@link Source}s and combine them into a
* single schema. The exact semantics of the combination depends on the schema
* language that this {@link SchemaFactory} object is created for.
- *
+ *
* <p>
* When an {@link ErrorHandler} is set, the callee will report all the errors
* found in sources to the handler. If the handler throws an exception, it will
* abort the schema compilation and the same exception will be thrown from
* this method. Also, after an error is reported to a handler, the callee is allowed
* to abort the further processing by throwing it. If an error handler is not set,
- * the callee will throw the first error it finds in the sources.
- *
+ * the callee will throw the first error it finds in the sources.
+ *
* <h2>W3C XML Schema 1.0</h2>
* <p>
* The resulting schema contains components from the specified sources.
@@ -590,30 +590,30 @@
* JAXP-compliant parsers may vary; in particular, parsers may choose
* to ignore all but the first <import> for a given namespace,
* regardless of information provided in schemaLocation.
- *
+ *
* <p>
* If the parsed set of schemas includes error(s) as
* specified in the section 5.1 of the XML Schema spec, then
* the error must be reported to the {@link ErrorHandler}.
- *
+ *
* <h2>RELAX NG</h2>
- *
+ *
* <p>For RELAX NG, this method must throw {@link UnsupportedOperationException}
- * if <tt>schemas.length!=1</tt>.
- *
- *
+ * if <tt>schemas.length!=1</tt>.
+ *
+ *
* @param schemas
* inputs to be parsed. {@link SchemaFactory} is required
- * to recognize {@link StreamSource},
+ * to recognize {@link StreamSource},
* {@link javax.xml.transform.sax.SAXSource},
* and {@link javax.xml.transform.dom.DOMSource}.
- *
+ *
* @return
* Always return a non-null valid {@link Schema} object.
* Note that when an error has been reported, there is no
* guarantee that the returned {@link Schema} object is
* meaningful.
- *
+ *
* @throws SAXException
* If an error is found during processing the specified inputs.
* When an {@link ErrorHandler} is set, errors are reported to
@@ -622,30 +622,30 @@
* If the <code>schemas</code> parameter itself is null or
* any item in the array is null.
* @throws IllegalArgumentException
- * If any item in the array is not recognized by this method.
+ * If any item in the array is not recognized by this method.
* @throws UnsupportedOperationException
* If the schema language doesn't support this operation.
*/
public abstract Schema newSchema(Source[] schemas) throws SAXException;
-
+
/**
* Creates a special {@link Schema} object.
- *
+ *
* <p>
* The exact semantics of the returned {@link Schema} object depends
* on the schema language that this {@link SchemaFactory} is created
* for.
- *
+ *
* <p>
* Also, implementations are allowed to use implementation-specific
* property/feature to alter the semantics of this method.
- *
- *
+ *
+ *
* <h2>W3C XML Schema 1.0</h2>
* <p>
* For XML Schema, this method creates a {@link Schema} object that
* performs validation by using location hints specified in documents.
- *
+ *
* <p>
* The returned {@link Schema} object assumes that if documents
* refer to the same URL in the schema location hints,
@@ -653,19 +653,19 @@
* assumption allows implementations to reuse parsed results of
* schema documents so that multiple validations against the same
* schema will run faster.
- *
+ *
* <p>
* Note that the use of schema location hints introduces a
- * vulnerability to denial-of-service attacks.
- *
- *
+ * vulnerability to denial-of-service attacks.
+ *
+ *
* <h2>RELAX NG</h2>
* <p>
- * RELAX NG does not support this operation.
- *
+ * RELAX NG does not support this operation.
+ *
* @return
* Always return non-null valid {@link Schema} object.
- *
+ *
* @throws UnsupportedOperationException
* If this operation is not supported by the callee.
* @throws SAXException
diff --git a/luni/src/main/java/javax/xml/validation/SchemaFactoryFinder.java b/luni/src/main/java/javax/xml/validation/SchemaFactoryFinder.java
index 5e4bc79..7b8cc03 100644
--- a/luni/src/main/java/javax/xml/validation/SchemaFactoryFinder.java
+++ b/luni/src/main/java/javax/xml/validation/SchemaFactoryFinder.java
@@ -34,16 +34,16 @@
/**
* Implementation of {@link SchemaFactory#newInstance(String)}.
- *
+ *
* @author <a href="Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 727367 $, $Date: 2008-12-17 05:05:26 -0800 (Wed, 17 Dec 2008) $
* @since 1.5
*/
final class SchemaFactoryFinder {
-
+
/** XML Schema language identifiers. */
private static final String W3C_XML_SCHEMA10_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.0";
- private static final String W3C_XML_SCHEMA11_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.1";
+ private static final String W3C_XML_SCHEMA11_NS_URI = "http://www.w3.org/XML/XMLSchema/v1.1";
/** debug support code. */
private static boolean debug = false;
@@ -52,17 +52,17 @@
* <p>Cache properties for performance.</p>
*/
private static Properties cacheProps = new Properties();
-
+
/**
* <p>First time requires initialization overhead.</p>
*/
private static boolean firstTime = true;
-
+
/**
* Default columns per line.
*/
private static final int DEFAULT_LINE_LENGTH = 80;
-
+
static {
// Use try/catch block to support applets
try {
@@ -76,7 +76,7 @@
/**
* <p>Conditional debug printing.</p>
- *
+ *
* @param msg to print
*/
private static void debugPrintln(String msg) {
@@ -84,16 +84,16 @@
System.err.println("JAXP: " + msg);
}
}
-
+
/**
* <p><code>ClassLoader</code> to use to find <code>SchemaFactory</code>.</p>
*/
private final ClassLoader classLoader;
-
+
/**
* <p>Constructor that specifies <code>ClassLoader</code> to use
* to find <code>SchemaFactory</code>.</p>
- *
+ *
* @param loader
* to be used to load resource, {@link SchemaFactory}, and
* {@link SchemaFactoryLoader} implementations during
@@ -107,7 +107,7 @@
debugDisplayClassLoader();
}
}
-
+
private void debugDisplayClassLoader() {
try {
if( classLoader == SecuritySupport.getContextClassLoader() ) {
@@ -124,9 +124,9 @@
throw td;
}
catch (Throwable _) {
- ; // getContextClassLoader() undefined in JDK1.1
+ ; // getContextClassLoader() undefined in JDK1.1
}
-
+
if( classLoader==ClassLoader.getSystemClassLoader() ) {
debugPrintln("using system class loader ("+classLoader+") for search");
return;
@@ -134,17 +134,17 @@
debugPrintln("using class loader ("+classLoader+") for search");
}
-
+
/**
* <p>Creates a new {@link SchemaFactory} object for the specified
* schema language.</p>
- *
+ *
* @param schemaLanguage
* See {@link SchemaFactory Schema Language} table in <code>SchemaFactory</code>
* for the list of available schema languages.
- *
+ *
* @return <code>null</code> if the callee fails to create one.
- *
+ *
* @throws NullPointerException
* If the <tt>schemaLanguage</tt> parameter is null.
*/
@@ -160,18 +160,18 @@
}
return f;
}
-
+
/**
* <p>Lookup a <code>SchemaFactory</code> for the given <code>schemaLanguage</code>.</p>
- *
+ *
* @param schemaLanguage Schema language to lookup <code>SchemaFactory</code> for.
- *
+ *
* @return <code>SchemaFactory</code> for the given <code>schemaLanguage</code>.
*/
private SchemaFactory _newFactory(String schemaLanguage) {
SchemaFactory sf;
String propertyName = SERVICE_CLASS.getName() + ":" + schemaLanguage;
-
+
// system property look up
try {
if (debug) debugPrintln("Looking up system property '"+propertyName+"'" );
@@ -180,7 +180,7 @@
if (debug) debugPrintln("The value is '"+r+"'");
sf = createInstance(r);
if(sf!=null) return sf;
- }
+ }
else if (debug) {
debugPrintln("The property is undefined.");
}
@@ -214,14 +214,14 @@
File f=new File( configFile );
firstTime = false;
if(SecuritySupport.doesFileExist(f)){
- if (debug) debugPrintln("Read properties file " + f);
+ if (debug) debugPrintln("Read properties file " + f);
cacheProps.load(SecuritySupport.getFileInputStream(f));
}
}
}
}
- factoryClassName = cacheProps.getProperty(propertyName);
- if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
+ factoryClassName = cacheProps.getProperty(propertyName);
+ if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
if (factoryClassName != null) {
sf = createInstance(factoryClassName);
@@ -232,7 +232,7 @@
} catch (Exception ex) {
if (debug) {
ex.printStackTrace();
- }
+ }
}
/**
@@ -256,7 +256,7 @@
}
}
*/
-
+
// try META-INF/services files
Iterator sitr = createServiceFileIterator();
while(sitr.hasNext()) {
@@ -272,7 +272,7 @@
}
}
}
-
+
// platform defaults
if (schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI) || schemaLanguage.equals(W3C_XML_SCHEMA10_NS_URI)) {
if (debug) debugPrintln("attempting to use the platform default XML Schema 1.0 validator");
@@ -282,19 +282,19 @@
if (debug) debugPrintln("attempting to use the platform default XML Schema 1.1 validator");
return createInstance("org.apache.xerces.jaxp.validation.XMLSchema11Factory");
}
-
+
if (debug) debugPrintln("all things were tried, but none was found. bailing out.");
return null;
}
-
+
/**
* <p>Creates an instance of the specified and returns it.</p>
- *
+ *
* @param className
* fully qualified class name to be instantiated.
- *
+ *
* @return null
- * if it fails. Error messages will be printed by this method.
+ * if it fails. Error messages will be printed by this method.
*/
SchemaFactory createInstance( String className ) {
try {
@@ -306,10 +306,10 @@
clazz = Class.forName(className);
if(debug) debugPrintln("loaded it from "+which(clazz));
Object o = clazz.newInstance();
-
+
if( o instanceof SchemaFactory )
return (SchemaFactory)o;
-
+
if (debug) debugPrintln(className+" is not assignable to "+SERVICE_CLASS.getName());
}
// The VM ran out of memory or there was some other serious problem. Re-throw.
@@ -326,11 +326,11 @@
}
return null;
}
-
+
/** Iterator that lazily computes one value and returns it. */
private static abstract class SingleIterator implements Iterator {
private boolean seen = false;
-
+
public final void remove() { throw new UnsupportedOperationException(); }
public final boolean hasNext() { return !seen; }
public final Object next() {
@@ -338,12 +338,12 @@
seen = true;
return value();
}
-
+
protected abstract Object value();
}
-
+
/**
- * Returns an {@link Iterator} that enumerates all
+ * Returns an {@link Iterator} that enumerates all
* the META-INF/services files that we care.
*/
private Iterator createServiceFileIterator() {
@@ -362,7 +362,7 @@
if(debug && !e.hasMoreElements()) {
debugPrintln("no "+SERVICE_ID+" file was found");
}
-
+
// wrap it into an Iterator.
return new Iterator() {
public void remove() {
@@ -386,12 +386,12 @@
}
}
}
-
+
/** Searches for a SchemaFactory for a given schema language in a META-INF/services file. */
private SchemaFactory loadFromServicesFile(String schemaLanguage, String resourceName, InputStream in) {
if (debug) debugPrintln("Reading "+resourceName );
-
+
// Read the service provider name in UTF-8 as specified in
// the jar spec. Unfortunately this fails in Microsoft
// VJ++, which does not implement the UTF-8
@@ -414,13 +414,13 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(in), DEFAULT_LINE_LENGTH);
}
-
+
String factoryClassName = null;
SchemaFactory resultFactory = null;
// See spec for provider-configuration files: http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Provider%20Configuration%20File
while (true) {
try {
- factoryClassName = rd.readLine();
+ factoryClassName = rd.readLine();
} catch (IOException x) {
// No provider found
break;
@@ -431,15 +431,15 @@
if (hashIndex != -1) {
factoryClassName = factoryClassName.substring(0, hashIndex);
}
-
+
// Ignore leading and trailing whitespace
factoryClassName = factoryClassName.trim();
-
+
// If there's no text left or if this was a blank line, go to the next one.
if (factoryClassName.length() == 0) {
continue;
}
-
+
try {
// Found the right SchemaFactory if its isSchemaLanguageSupported(schemaLanguage) method returns true.
SchemaFactory foundFactory = (SchemaFactory) createInstance(factoryClassName);
@@ -454,22 +454,22 @@
break;
}
}
-
+
try {
// try to close the reader.
rd.close();
}
// Ignore the exception.
catch (IOException exc) {}
-
+
return resultFactory;
}
-
+
private static final Class SERVICE_CLASS = SchemaFactory.class;
private static final String SERVICE_ID = "META-INF/services/" + SERVICE_CLASS.getName();
-
-
-
+
+
+
private static String which( Class clazz ) {
return which( clazz.getName(), clazz.getClassLoader() );
}
@@ -479,15 +479,15 @@
*
* @param classname the fully qualified name of the class to search for
* @param loader the classloader to search
- *
+ *
* @return the source location of the resource, or null if it wasn't found
*/
private static String which(String classname, ClassLoader loader) {
String classnameAsResource = classname.replace('.', '/') + ".class";
-
+
if( loader==null ) loader = ClassLoader.getSystemClassLoader();
-
+
//URL it = loader.getResource(classnameAsResource);
URL it = SecuritySupport.getResourceAsURL(loader, classnameAsResource);
if (it != null) {
diff --git a/luni/src/main/java/javax/xml/validation/SchemaFactoryLoader.java b/luni/src/main/java/javax/xml/validation/SchemaFactoryLoader.java
index 34c94a4..2ac0fd7 100644
--- a/luni/src/main/java/javax/xml/validation/SchemaFactoryLoader.java
+++ b/luni/src/main/java/javax/xml/validation/SchemaFactoryLoader.java
@@ -20,11 +20,11 @@
/**
* <p>This class was removed from JAXP 1.3 before it was finalized but
- * was mistakenly included in Java 5. It only exists now for compatibility
+ * was mistakenly included in Java 5. It only exists now for compatibility
* reasons. Applications should avoid using it.</p>
*/
public abstract class SchemaFactoryLoader {
-
+
protected SchemaFactoryLoader() {}
public abstract SchemaFactory newFactory(String schemaLanguage);
diff --git a/luni/src/main/java/javax/xml/validation/SecuritySupport.java b/luni/src/main/java/javax/xml/validation/SecuritySupport.java
index 5dfafa6..eb17feb 100644
--- a/luni/src/main/java/javax/xml/validation/SecuritySupport.java
+++ b/luni/src/main/java/javax/xml/validation/SecuritySupport.java
@@ -38,9 +38,9 @@
* Security related methods that only work on J2SE 1.2 and newer.
*/
final class SecuritySupport {
-
+
private SecuritySupport() {}
-
+
static ClassLoader getContextClassLoader() {
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
@@ -102,7 +102,7 @@
URL url;
if (cl == null) {
url = ClassLoader.getSystemResource(name);
- }
+ }
else {
url = cl.getResource(name);
}
@@ -121,7 +121,7 @@
Enumeration enumeration;
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
- }
+ }
else {
enumeration = cl.getResources(name);
}
@@ -132,7 +132,7 @@
throw (IOException)e.getException();
}
}
-
+
static InputStream getResourceAsStream(final ClassLoader cl,
final String name)
{
diff --git a/luni/src/main/java/javax/xml/validation/TypeInfoProvider.java b/luni/src/main/java/javax/xml/validation/TypeInfoProvider.java
index de1282a..5f5332c 100644
--- a/luni/src/main/java/javax/xml/validation/TypeInfoProvider.java
+++ b/luni/src/main/java/javax/xml/validation/TypeInfoProvider.java
@@ -22,156 +22,156 @@
/**
* This class provides access to the type information determined
- * by {@link ValidatorHandler}.
- *
+ * by {@link ValidatorHandler}.
+ *
* <p>
* Some schema languages, such as W3C XML Schema, encourages a validator
* to report the "type" it assigns to each attribute/element.
* Those applications who wish to access this type information can invoke
* methods defined on this "interface" to access such type information.
- *
+ *
* <p>
* Implementation of this "interface" can be obtained through the
* {@link ValidatorHandler#getTypeInfoProvider()} method.
- *
+ *
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 884939 $, $Date: 2009-11-27 10:20:46 -0800 (Fri, 27 Nov 2009) $
- * @see org.w3c.dom.TypeInfo
+ * @see org.w3c.dom.TypeInfo
* @since 1.5
*/
public abstract class TypeInfoProvider {
-
+
/**
* Constructor for the derived class.
- *
+ *
* <p>
* The constructor does nothing.
*/
protected TypeInfoProvider() {
}
-
+
/**
* <p>Returns the immutable {@link TypeInfo} object for the current element.</p>
- *
+ *
* <p>
* The method may only be called by the startElement and endElement event of
* the {@link org.xml.sax.ContentHandler} that the application sets to the
* {@link ValidatorHandler}.</p>
- *
+ *
* @throws IllegalStateException
* If this method is called from other {@link org.xml.sax.ContentHandler}
* methods.
* @return
* An immutable {@link TypeInfo} object that represents the
- * type of the current element.
+ * type of the current element.
* Note that the caller can keep references to the obtained
* {@link TypeInfo} longer than the callback scope.
- *
+ *
* Otherwise, this method returns
* null if the validator is unable to
* determine the type of the current element for some reason
* (for example, if the validator is recovering from
* an earlier error.)
- *
+ *
*/
public abstract TypeInfo getElementTypeInfo();
-
+
/**
* Returns the immutable {@link TypeInfo} object for the specified
* attribute of the current element.
- *
+ *
* <p>
* The method may only be called by the startElement event of
* the {@link org.xml.sax.ContentHandler} that the application sets to the
* {@link ValidatorHandler}.
- *
+ *
* @param index
* The index of the attribute. The same index for
* the {@link org.xml.sax.Attributes} object passed to the
* <tt>startElement</tt> callback.
- *
+ *
* @throws IndexOutOfBoundsException
* If the index is invalid.
* @throws IllegalStateException
* If this method is called from other {@link org.xml.sax.ContentHandler}
* methods.
- *
+ *
* @return
* An immutable {@link TypeInfo} object that represents the
- * type of the specified attribute.
+ * type of the specified attribute.
* Note that the caller can keep references to the obtained
* {@link TypeInfo} longer than the callback scope.
- *
+ *
* Otherwise, this method returns
* null if the validator is unable to
* determine the type.
*/
public abstract TypeInfo getAttributeTypeInfo(int index);
-
+
/**
* Returns <tt>true</tt> if the specified attribute is determined
* to be ID.
- *
+ *
* <p>
* Exactly how an attribute is "determined to be ID" is up to the
* schema language. In case of W3C XML Schema, this means
* that the actual type of the attribute is the built-in ID type
* or its derived type.
- *
+ *
* <p>
* A {@link javax.xml.parsers.DocumentBuilder} uses this information
* to properly implement {@link org.w3c.dom.Attr#isId()}.
- *
+ *
* <p>
* The method may only be called by the startElement event of
* the {@link org.xml.sax.ContentHandler} that the application sets to the
* {@link ValidatorHandler}.
- *
+ *
* @param index
* The index of the attribute. The same index for
* the {@link org.xml.sax.Attributes} object passed to the
* <tt>startElement</tt> callback.
- *
+ *
* @throws IndexOutOfBoundsException
* If the index is invalid.
* @throws IllegalStateException
* If this method is called from other {@link org.xml.sax.ContentHandler}
* methods.
- *
+ *
* @return true
* if the type of the specified attribute is ID.
*/
public abstract boolean isIdAttribute(int index);
-
+
/**
* Returns <tt>false</tt> if the attribute was added by the validator.
- *
+ *
* <p>
* This method provides information necessary for
* a {@link javax.xml.parsers.DocumentBuilder} to determine what
* the DOM tree should return from the {@link org.w3c.dom.Attr#getSpecified()} method.
- *
+ *
* <p>
* The method may only be called by the startElement event of
* the {@link org.xml.sax.ContentHandler} that the application sets to the
* {@link ValidatorHandler}.
- *
+ *
* <p>
* A general guideline for validators is to return true if
* the attribute was originally present in the pipeline, and
* false if it was added by the validator.
- *
+ *
* @param index
* The index of the attribute. The same index for
* the {@link org.xml.sax.Attributes} object passed to the
* <tt>startElement</tt> callback.
- *
+ *
* @throws IndexOutOfBoundsException
* If the index is invalid.
* @throws IllegalStateException
* If this method is called from other {@link org.xml.sax.ContentHandler}
* methods.
- *
+ *
* @return
* <tt>true</tt> if the attribute was present before the validator
* processes input. <tt>false</tt> if the attribute was added
diff --git a/luni/src/main/java/javax/xml/validation/Validator.java b/luni/src/main/java/javax/xml/validation/Validator.java
index 316f957..e0eaf90 100644
--- a/luni/src/main/java/javax/xml/validation/Validator.java
+++ b/luni/src/main/java/javax/xml/validation/Validator.java
@@ -31,7 +31,7 @@
/**
* <p>A processor that checks an XML document against {@link Schema}.</p>
- *
+ *
* <p>
* A validator is a thread-unsafe and non-reentrant object.
* In other words, it is the application's responsibility to make
@@ -50,13 +50,13 @@
* @since 1.5
*/
public abstract class Validator {
-
+
/**
* Constructor for derived classes.
- *
+ *
* <p>
* The constructor does nothing.
- *
+ *
* <p>
* Derived classes must create {@link Validator} objects that have
* <tt>null</tt> {@link ErrorHandler} and
@@ -64,15 +64,15 @@
*/
protected Validator() {
}
-
+
/**
* <p>Reset this <code>Validator</code> to its original configuration.</p>
- *
+ *
* <p><code>Validator</code> is reset to the same state as when it was created with
* {@link Schema#newValidator()}.
* <code>reset()</code> is designed to allow the reuse of existing <code>Validator</code>s
* thus saving resources associated with the creation of new <code>Validator</code>s.</p>
- *
+ *
* <p>The reset <code>Validator</code> is not guaranteed to have the same {@link LSResourceResolver} or {@link ErrorHandler}
* <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal
* <code>LSResourceResolver</code> and <code>ErrorHandler</code>.</p>
@@ -81,27 +81,27 @@
/**
* Validates the specified input.
- *
+ *
* <p>
* This is just a convenience method of:
* <pre>
* validate(source,null);
* </pre>
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public void validate(Source source) throws SAXException, IOException {
validate(source, null);
}
-
+
/**
* Validates the specified input and send the augmented validation
* result to the specified output.
- *
+ *
* <p>
* This method places the following restrictions on the types of
* the {@link Source}/{@link Result} accepted.
- *
+ *
* <h4>{@link Source}/{@link Result} accepted:</h4>
* <table border=1>
* <thead>
@@ -147,24 +147,24 @@
* <p>
* To validate one {@link Source} into another kind of {@link Result}, use the identity transformer
* (see {@link javax.xml.transform.TransformerFactory#newTransformer()}).
- *
+ *
* <p>
* Errors found during the validation is sent to the specified
* {@link ErrorHandler}.
- *
+ *
* <p>
* If a document is valid, or if a document contains some errors
* but none of them were fatal and the {@link ErrorHandler} didn't
* throw any exception, then the method returns normally.
- *
+ *
* @param source
* XML to be validated. Must not be null.
- *
+ *
* @param result
* The {@link Result} object that receives (possibly augmented)
* XML. This parameter can be null if the caller is not interested
* in it.
- *
+ *
* Note that when a {@link javax.xml.transform.dom.DOMResult} is used,
* a validator might just pass the same DOM node from
* {@link javax.xml.transform.dom.DOMSource} to
@@ -172,58 +172,58 @@
* (in which case <tt>source.getNode()==result.getNode()</tt>),
* it might copy the entire DOM tree, or it might alter the
* node given by the source.
- *
+ *
* @throws IllegalArgumentException
* If the {@link Result} type doesn't match the {@link Source} type,
* or if the specified source is not a
* {@link javax.xml.transform.sax.SAXSource},
* {@link javax.xml.transform.dom.DOMSource} or
- * {@link javax.xml.transform.stream.StreamSource}.
- *
+ * {@link javax.xml.transform.stream.StreamSource}.
+ *
* @throws SAXException
* If the {@link ErrorHandler} throws a {@link SAXException} or
* if a fatal error is found and the {@link ErrorHandler} returns
* normally.
- *
+ *
* @throws IOException
* If the validator is processing a
* {@link javax.xml.transform.sax.SAXSource} and the
* underlying {@link org.xml.sax.XMLReader} throws an
* {@link IOException}.
- *
+ *
* @throws NullPointerException
* If the <tt>source</tt> parameter is null.
- *
+ *
* @see #validate(Source)
*/
public abstract void validate(Source source, Result result) throws SAXException, IOException;
-
+
/**
* Sets the {@link ErrorHandler} to receive errors encountered
* during the <code>validate</code> method invocation.
- *
+ *
* <p>
* Error handler can be used to customize the error handling process
* during a validation. When an {@link ErrorHandler} is set,
* errors found during the validation will be first sent
* to the {@link ErrorHandler}.
- *
+ *
* <p>
* The error handler can abort further validation immediately
* by throwing {@link SAXException} from the handler. Or for example
* it can print an error to the screen and try to continue the
- * validation by returning normally from the {@link ErrorHandler}
- *
+ * validation by returning normally from the {@link ErrorHandler}
+ *
* <p>
* If any {@link Throwable} is thrown from an {@link ErrorHandler},
* the caller of the <code>validate</code> method will be thrown
* the same {@link Throwable} object.
- *
+ *
* <p>
* {@link Validator} is not allowed to
* throw {@link SAXException} without first reporting it to
* {@link ErrorHandler}.
- *
+ *
* <p>
* When the {@link ErrorHandler} is null, the implementation will
* behave as if the following {@link ErrorHandler} is set:
@@ -240,39 +240,39 @@
* }
* }
* </pre>
- *
+ *
* <p>
* When a new {@link Validator} object is created, initially
* this field is set to null.
- *
+ *
* @param errorHandler
* A new error handler to be set. This parameter can be null.
*/
public abstract void setErrorHandler(ErrorHandler errorHandler);
-
+
/**
* Gets the current {@link ErrorHandler} set to this {@link Validator}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setErrorHandler(ErrorHandler)} method, or null
* if that method has never been called since this {@link Validator}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract ErrorHandler getErrorHandler();
-
+
/**
* Sets the {@link LSResourceResolver} to customize
* resource resolution while in a validation episode.
- *
+ *
* <p>
* {@link Validator} uses a {@link LSResourceResolver}
* when it needs to locate external resources while a validation,
* although exactly what constitutes "locating external resources" is
* up to each schema language.
- *
+ *
* <p>
* When the {@link LSResourceResolver} is null, the implementation will
* behave as if the following {@link LSResourceResolver} is set:
@@ -280,43 +280,43 @@
* class DumbLSResourceResolver implements {@link LSResourceResolver} {
* public {@link org.w3c.dom.ls.LSInput} resolveResource(
* String publicId, String systemId, String baseURI) {
- *
+ *
* return null; // always return null
* }
* }
* </pre>
- *
+ *
* <p>
* If a {@link LSResourceResolver} throws a {@link RuntimeException}
* (or instances of its derived classes),
- * then the {@link Validator} will abort the parsing and
+ * then the {@link Validator} will abort the parsing and
* the caller of the <code>validate</code> method will receive
- * the same {@link RuntimeException}.
- *
+ * the same {@link RuntimeException}.
+ *
* <p>
* When a new {@link Validator} object is created, initially
* this field is set to null.
- *
+ *
* @param resourceResolver
* A new resource resolver to be set. This parameter can be null.
*/
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
-
+
/**
* Gets the current {@link LSResourceResolver} set to this {@link Validator}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setResourceResolver(LSResourceResolver)} method, or null
* if that method has never been called since this {@link Validator}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract LSResourceResolver getResourceResolver();
-
-
-
+
+
+
/**
* Look up the value of a feature flag.
*
@@ -334,7 +334,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link Validator} recognizes the feature name but
+ * {@link Validator} recognizes the feature name but
* cannot determine its value at this time.
* @throws NullPointerException
* When the name parameter is null.
@@ -344,7 +344,7 @@
if(name==null) throw new NullPointerException("the name parameter is null");
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a feature flag.
*
@@ -356,36 +356,36 @@
* <p>The feature name is any fully-qualified URI. It is
* possible for a {@link Validator} to expose a feature value but
* to be unable to change the current value.
- * Some feature values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some feature values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a validation.</p>
*
* @param name The feature name, which is a non-null fully-qualified URI.
* @param value The requested value of the feature (true or false).
- *
+ *
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link Validator} recognizes the feature name but
+ * {@link Validator} recognizes the feature name but
* cannot set the requested value.
* @throws NullPointerException
* When the name parameter is null.
- *
+ *
* @see #getFeature(String)
*/
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
if(name==null) throw new NullPointerException("the name parameter is null");
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a property.
*
* <p>The property name is any fully-qualified URI. It is
* possible for a {@link Validator} to recognize a property name but
* to be unable to change the current value.
- * Some property values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some property values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a validation.</p>
*
* <p>{@link Validator}s are not required to recognize setting
@@ -396,7 +396,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link Validator} recognizes the property name but
+ * {@link Validator} recognizes the property name but
* cannot set the requested value.
* @throws NullPointerException
* When the name parameter is null.
@@ -405,7 +405,7 @@
if(name==null) throw new NullPointerException("the name parameter is null");
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Look up the value of a property.
*
@@ -426,7 +426,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
+ * XMLReader recognizes the property name but
* cannot determine its value at this time.
* @throws NullPointerException
* When the name parameter is null.
diff --git a/luni/src/main/java/javax/xml/validation/ValidatorHandler.java b/luni/src/main/java/javax/xml/validation/ValidatorHandler.java
index 0ab5edf..9606193 100644
--- a/luni/src/main/java/javax/xml/validation/ValidatorHandler.java
+++ b/luni/src/main/java/javax/xml/validation/ValidatorHandler.java
@@ -26,19 +26,19 @@
/**
* Streaming validator that works on SAX stream.
- *
+ *
* <p>
* A {@link ValidatorHandler} object is a thread-unsafe, non-reentrant object.
* In other words, it is the application's responsibility to make
* sure that one {@link ValidatorHandler} object is not used from
* more than one thread at any given time.
- *
+ *
* <p>
- * {@link ValidatorHandler} checks if the SAX events follow
+ * {@link ValidatorHandler} checks if the SAX events follow
* the set of constraints described in the associated {@link Schema},
* and additionally it may modify the SAX events (for example
* by adding default values, etc.)
- *
+ *
* <p>
* {@link ValidatorHandler} extends from {@link ContentHandler},
* but it refines the underlying {@link ContentHandler} in
@@ -49,7 +49,7 @@
* even though SAX allows some of them to be null.
* Similarly, the user-specified {@link ContentHandler} will receive non-null
* Strings for all three parameters.
- *
+ *
* <li>Applications must ensure that {@link ValidatorHandler}'s
* {@link ContentHandler#startPrefixMapping(String,String)} and
* {@link ContentHandler#endPrefixMapping(String)} are invoked
@@ -58,60 +58,60 @@
* If the {@link ValidatorHandler} introduces additional namespace
* bindings, the user-specified {@link ContentHandler} will receive
* additional startPrefixMapping/endPrefixMapping events.
- *
+ *
* <li>{@link org.xml.sax.Attributes} for the
* {@link ContentHandler#startElement(String,String,String,Attributes)} method
* may or may not include xmlns* attributes.
* </ol>
- *
+ *
* <p>
* A {@link ValidatorHandler} is automatically reset every time
* the startDocument method is invoked.
- *
+ *
* <h2>Recognized Properties and Features</h2>
* <p>
* This spec defines the following feature that must be recognized
* by all {@link ValidatorHandler} implementations.
- *
+ *
* <h3><code>http://xml.org/sax/features/namespace-prefixes</code></h3>
* <p>
* This feature controls how a {@link ValidatorHandler} introduces
* namespace bindings that were not present in the original SAX event
* stream.
* When this feature is set to true, it must make
- * sure that the user's {@link ContentHandler} will see
+ * sure that the user's {@link ContentHandler} will see
* the corresponding <code>xmlns*</code> attribute in
* the {@link org.xml.sax.Attributes} object of the
* {@link ContentHandler#startElement(String,String,String,Attributes)}
* callback. Otherwise, <code>xmlns*</code> attributes must not be
* added to {@link org.xml.sax.Attributes} that's passed to the
* user-specified {@link ContentHandler}.
- * <p>
+ * <p>
* (Note that regardless of this switch, namespace bindings are
- * always notified to applications through
+ * always notified to applications through
* {@link ContentHandler#startPrefixMapping(String,String)} and
* {@link ContentHandler#endPrefixMapping(String)} methods of the
* {@link ContentHandler} specified by the user.)
- *
+ *
* <p>
* Note that this feature does <em>NOT</em> affect the way
* a {@link ValidatorHandler} receives SAX events. It merely
* changes the way it augments SAX events.
- *
+ *
* <p>This feature is set to <code>false</code> by default.</p>
- *
+ *
* @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 446598 $, $Date: 2006-09-15 05:55:40 -0700 (Fri, 15 Sep 2006) $
* @since 1.5
*/
public abstract class ValidatorHandler implements ContentHandler {
-
+
/**
* Constructor for derived classes.
- *
+ *
* <p>
* The constructor does nothing.
- *
+ *
* <p>
* Derived classes must create {@link ValidatorHandler} objects that have
* <tt>null</tt> {@link ErrorHandler} and
@@ -119,7 +119,7 @@
*/
protected ValidatorHandler() {
}
-
+
/**
* Sets the {@link ContentHandler} which receives
* the augmented validation result.
@@ -129,16 +129,16 @@
* {@link ValidatorHandler} will work as a filter
* and basically copy the incoming events to the
* specified {@link ContentHandler}.
- *
+ *
* <p>
* In doing so, a {@link ValidatorHandler} may modify
* the events, for example by adding defaulted attributes.
- *
+ *
* <p>
* A {@link ValidatorHandler} may buffer events to certain
* extent, but to allow {@link ValidatorHandler} to be used
* by a parser, the following requirement has to be met.
- *
+ *
* <ol>
* <li>When
* {@link ContentHandler#startElement(String, String, String, Attributes)},
@@ -151,65 +151,65 @@
* returns.
* <li>{@link ValidatorHandler} may not introduce new elements that
* were not present in the input.
- *
+ *
* <li>{@link ValidatorHandler} may not remove attributes that were
* present in the input.
- * </ol>
- *
+ * </ol>
+ *
* <p>
* When a callback method on the specified {@link ContentHandler}
* throws an exception, the same exception object must be thrown
* from the {@link ValidatorHandler}. The {@link ErrorHandler}
* should not be notified of such an exception.
- *
+ *
* <p>
* This method can be called even during a middle of a validation.
*
* @param receiver
- * A {@link ContentHandler} or a null value.
+ * A {@link ContentHandler} or a null value.
*/
public abstract void setContentHandler(ContentHandler receiver);
-
+
/**
* Gets the {@link ContentHandler} which receives the
* augmented validation result.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #getContentHandler()} method, or null
* if that method has never been called since this {@link ValidatorHandler}
* has created.
- *
+ *
* @see #setContentHandler(ContentHandler)
*/
public abstract ContentHandler getContentHandler();
-
+
/**
* Sets the {@link ErrorHandler} to receive errors encountered
* during the validation.
- *
+ *
* <p>
* Error handler can be used to customize the error handling process
* during a validation. When an {@link ErrorHandler} is set,
* errors found during the validation will be first sent
* to the {@link ErrorHandler}.
- *
+ *
* <p>
* The error handler can abort further validation immediately
* by throwing {@link org.xml.sax.SAXException} from the handler. Or for example
* it can print an error to the screen and try to continue the
- * validation by returning normally from the {@link ErrorHandler}
- *
+ * validation by returning normally from the {@link ErrorHandler}
+ *
* <p>
* If any {@link Throwable} is thrown from an {@link ErrorHandler},
* the same {@link Throwable} object will be thrown toward the
* root of the call stack.
- *
+ *
* <p>
* {@link ValidatorHandler} is not allowed to
* throw {@link org.xml.sax.SAXException} without first reporting it to
* {@link ErrorHandler}.
- *
+ *
* <p>
* When the {@link ErrorHandler} is null, the implementation will
* behave as if the following {@link ErrorHandler} is set:
@@ -226,39 +226,39 @@
* }
* }
* </pre>
- *
+ *
* <p>
* When a new {@link ValidatorHandler} object is created, initially
* this field is set to null.
- *
+ *
* @param errorHandler
* A new error handler to be set. This parameter can be null.
*/
public abstract void setErrorHandler(ErrorHandler errorHandler);
-
+
/**
* Gets the current {@link ErrorHandler} set to this {@link ValidatorHandler}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setErrorHandler(ErrorHandler)} method, or null
* if that method has never been called since this {@link ValidatorHandler}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract ErrorHandler getErrorHandler();
-
+
/**
* Sets the {@link LSResourceResolver} to customize
* resource resolution while in a validation episode.
- *
+ *
* <p>
* {@link ValidatorHandler} uses a {@link LSResourceResolver}
* when it needs to locate external resources while a validation,
* although exactly what constitutes "locating external resources" is
* up to each schema language.
- *
+ *
* <p>
* When the {@link LSResourceResolver} is null, the implementation will
* behave as if the following {@link LSResourceResolver} is set:
@@ -266,63 +266,63 @@
* class DumbLSResourceResolver implements {@link LSResourceResolver} {
* public {@link org.w3c.dom.ls.LSInput} resolveResource(
* String publicId, String systemId, String baseURI) {
- *
+ *
* return null; // always return null
* }
* }
* </pre>
- *
+ *
* <p>
* If a {@link LSResourceResolver} throws a {@link RuntimeException}
* (or instances of its derived classes),
- * then the {@link ValidatorHandler} will abort the parsing and
+ * then the {@link ValidatorHandler} will abort the parsing and
* the caller of the <code>validate</code> method will receive
- * the same {@link RuntimeException}.
- *
+ * the same {@link RuntimeException}.
+ *
* <p>
* When a new {@link ValidatorHandler} object is created, initially
* this field is set to null.
- *
+ *
* @param resourceResolver
* A new resource resolver to be set. This parameter can be null.
*/
public abstract void setResourceResolver(LSResourceResolver resourceResolver);
-
+
/**
* Gets the current {@link LSResourceResolver} set to this {@link ValidatorHandler}.
- *
+ *
* @return
* This method returns the object that was last set through
* the {@link #setResourceResolver(LSResourceResolver)} method, or null
* if that method has never been called since this {@link ValidatorHandler}
* has created.
- *
+ *
* @see #setErrorHandler(ErrorHandler)
*/
public abstract LSResourceResolver getResourceResolver();
-
+
/**
* Obtains the {@link TypeInfoProvider} implementation of this
* {@link ValidatorHandler}.
- *
+ *
* <p>
* The obtained {@link TypeInfoProvider} can be queried during a parse
* to access the type information determined by the validator.
- *
+ *
* <p>
* Some schema languages do not define the notion of type,
* for those languages, this method may not be supported.
* However, to be compliant with this specification, implementations
- * for W3C XML Schema 1.0 must support this operation.
- *
+ * for W3C XML Schema 1.0 must support this operation.
+ *
* @return
* null if the validator / schema language does not support
* the notion of {@link org.w3c.dom.TypeInfo}.
* Otherwise a non-null valid {@link TypeInfoProvider}.
*/
public abstract TypeInfoProvider getTypeInfoProvider();
-
-
+
+
/**
* Look up the value of a feature flag.
*
@@ -340,7 +340,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link ValidatorHandler} recognizes the feature name but
+ * {@link ValidatorHandler} recognizes the feature name but
* cannot determine its value at this time.
* @throws NullPointerException
* When the name parameter is null.
@@ -351,7 +351,7 @@
throw new NullPointerException();
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a feature flag.
*
@@ -363,21 +363,21 @@
* <p>The feature name is any fully-qualified URI. It is
* possible for a {@link ValidatorHandler} to expose a feature value but
* to be unable to change the current value.
- * Some feature values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some feature values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a validation.</p>
*
* @param name The feature name, which is a non-null fully-qualified URI.
* @param value The requested value of the feature (true or false).
- *
+ *
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link ValidatorHandler} recognizes the feature name but
+ * {@link ValidatorHandler} recognizes the feature name but
* cannot set the requested value.
* @throws NullPointerException
* When the name parameter is null.
- *
+ *
* @see #getFeature(String)
*/
public void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException {
@@ -385,15 +385,15 @@
throw new NullPointerException();
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Set the value of a property.
*
* <p>The property name is any fully-qualified URI. It is
* possible for a {@link ValidatorHandler} to recognize a property name but
* to be unable to change the current value.
- * Some property values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some property values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a validation.</p>
*
* <p>{@link ValidatorHandler}s are not required to recognize setting
@@ -401,11 +401,11 @@
*
* @param name The property name, which is a non-null fully-qualified URI.
* @param object The requested value for the property.
- *
+ *
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * {@link ValidatorHandler} recognizes the property name but
+ * {@link ValidatorHandler} recognizes the property name but
* cannot set the requested value.
* @throws NullPointerException
* When the name parameter is null.
@@ -415,7 +415,7 @@
throw new NullPointerException();
throw new SAXNotRecognizedException(name);
}
-
+
/**
* Look up the value of a property.
*
@@ -436,7 +436,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
+ * XMLReader recognizes the property name but
* cannot determine its value at this time.
* @throws NullPointerException
* When the name parameter is null.
diff --git a/luni/src/main/java/javax/xml/xpath/SecuritySupport.java b/luni/src/main/java/javax/xml/xpath/SecuritySupport.java
index a97829f..edf7185 100644
--- a/luni/src/main/java/javax/xml/xpath/SecuritySupport.java
+++ b/luni/src/main/java/javax/xml/xpath/SecuritySupport.java
@@ -38,9 +38,9 @@
* Security related methods that only work on J2SE 1.2 and newer.
*/
final class SecuritySupport {
-
+
private SecuritySupport() {}
-
+
static ClassLoader getContextClassLoader() {
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
@@ -102,7 +102,7 @@
URL url;
if (cl == null) {
url = ClassLoader.getSystemResource(name);
- }
+ }
else {
url = cl.getResource(name);
}
@@ -121,7 +121,7 @@
Enumeration enumeration;
if (cl == null) {
enumeration = ClassLoader.getSystemResources(name);
- }
+ }
else {
enumeration = cl.getResources(name);
}
@@ -132,7 +132,7 @@
throw (IOException)e.getException();
}
}
-
+
static InputStream getResourceAsStream(final ClassLoader cl,
final String name)
{
diff --git a/luni/src/main/java/javax/xml/xpath/XPath.java b/luni/src/main/java/javax/xml/xpath/XPath.java
index 70d6ff1..1d0e203 100644
--- a/luni/src/main/java/javax/xml/xpath/XPath.java
+++ b/luni/src/main/java/javax/xml/xpath/XPath.java
@@ -76,7 +76,7 @@
* </td>
* </tr>
* </table>
- *
+ *
* @author <a href="Norman.Walsh@Sun.com">Norman Walsh</a>
* @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
* @version $Revision: 569998 $, $Date: 2007-08-26 21:40:02 -0700 (Sun, 26 Aug 2007) $
@@ -84,15 +84,15 @@
* @since 1.5
*/
public interface XPath {
-
+
/**
* <p>Reset this <code>XPath</code> to its original configuration.</p>
- *
+ *
* <p><code>XPath</code> is reset to the same state as when it was created with
* {@link XPathFactory#newXPath()}.
* <code>reset()</code> is designed to allow the reuse of existing <code>XPath</code>s
* thus saving resources associated with the creation of new <code>XPath</code>s.</p>
- *
+ *
* <p>The reset <code>XPath</code> is not guaranteed to have the same {@link XPathFunctionResolver}, {@link XPathVariableResolver}
* or {@link NamespaceContext} <code>Object</code>s, e.g. {@link Object#equals(Object obj)}.
* It is guaranteed to have a functionally equal <code>XPathFunctionResolver</code>, <code>XPathVariableResolver</code>
@@ -102,78 +102,78 @@
/**
* <p>Establish a variable resolver.</p>
- *
+ *
* <p>A <code>NullPointerException</code> is thrown if <code>resolver</code> is <code>null</code>.</p>
- *
+ *
* @param resolver Variable resolver.
- *
+ *
* @throws NullPointerException If <code>resolver</code> is <code>null</code>.
*/
public void setXPathVariableResolver(XPathVariableResolver resolver);
/**
* <p>Return the current variable resolver.</p>
- *
+ *
* <p><code>null</code> is returned in no variable resolver is in effect.</p>
- *
+ *
* @return Current variable resolver.
*/
public XPathVariableResolver getXPathVariableResolver();
/**
* <p>Establish a function resolver.</p>
- *
+ *
* <p>A <code>NullPointerException</code> is thrown if <code>resolver</code> is <code>null</code>.</p>
- *
+ *
* @param resolver XPath function resolver.
- *
+ *
* @throws NullPointerException If <code>resolver</code> is <code>null</code>.
*/
public void setXPathFunctionResolver(XPathFunctionResolver resolver);
/**
* <p>Return the current function resolver.</p>
- *
+ *
* <p><code>null</code> is returned in no function resolver is in effect.</p>
- *
+ *
* @return Current function resolver.
*/
public XPathFunctionResolver getXPathFunctionResolver();
/**
* <p>Establish a namespace context.</p>
- *
+ *
* <p>A <code>NullPointerException</code> is thrown if <code>nsContext</code> is <code>null</code>.</p>
- *
+ *
* @param nsContext Namespace context to use.
- *
+ *
* @throws NullPointerException If <code>nsContext</code> is <code>null</code>.
*/
public void setNamespaceContext(NamespaceContext nsContext);
/**
* <p>Return the current namespace context.</p>
- *
+ *
* <p><code>null</code> is returned in no namespace context is in effect.</p>
- *
+ *
* @return Current Namespace context.
*/
public NamespaceContext getNamespaceContext();
- /**
+ /**
* <p>Compile an XPath expression for later evaluation.</p>
- *
+ *
* <p>If <code>expression</code> contains any {@link XPathFunction}s,
* they must be available via the {@link XPathFunctionResolver}.
* An {@link XPathExpressionException} will be thrown if the <code>XPathFunction</code>
* cannot be resolved with the <code>XPathFunctionResolver</code>.</p>
- *
- * <p>If <code>expression</code> is <code>null</code>, a <code>NullPointerException</code> is thrown.</p>
+ *
+ * <p>If <code>expression</code> is <code>null</code>, a <code>NullPointerException</code> is thrown.</p>
*
* @param expression The XPath expression.
- *
+ *
* @return Compiled XPath expression.
-
+
* @throws XPathExpressionException If <code>expression</code> cannot be compiled.
* @throws NullPointerException If <code>expression</code> is <code>null</code>.
*/
@@ -185,7 +185,7 @@
*
* <p>See <a href="#XPath-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and <code>QName</code> resolution and return type conversion.</p>
- *
+ *
* <p>If <code>returnType</code> is not one of the types defined in {@link XPathConstants} (
* {@link XPathConstants#NUMBER NUMBER},
* {@link XPathConstants#STRING STRING},
@@ -193,8 +193,8 @@
* {@link XPathConstants#NODE NODE} or
* {@link XPathConstants#NODESET NODESET})
* then an <code>IllegalArgumentException</code> is thrown.</p>
- *
- * <p>If a <code>null</code> value is provided for
+ *
+ * <p>If a <code>null</code> value is provided for
* <code>item</code>, an empty document will be used for the
* context.
* If <code>expression</code> or <code>returnType</code> is <code>null</code>, then a
@@ -203,9 +203,9 @@
* @param expression The XPath expression.
* @param item The starting context (node or node list, for example).
* @param returnType The desired return type.
- *
+ *
* @return Result of evaluating an XPath expression as an <code>Object</code> of <code>returnType</code>.
- *
+ *
* @throws XPathExpressionException If <code>expression</code> cannot be evaluated.
* @throws IllegalArgumentException If <code>returnType</code> is not one of the types defined in {@link XPathConstants}.
* @throws NullPointerException If <code>expression</code> or <code>returnType</code> is <code>null</code>.
@@ -218,21 +218,21 @@
*
* <p>This method calls {@link #evaluate(String expression, Object item, QName returnType)} with a <code>returnType</code> of
* {@link XPathConstants#STRING}.</p>
- *
+ *
* <p>See <a href="#XPath-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
*
- * <p>If a <code>null</code> value is provided for
+ * <p>If a <code>null</code> value is provided for
* <code>item</code>, an empty document will be used for the
* context.
* If <code>expression</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param expression The XPath expression.
* @param item The starting context (node or node list, for example).
- *
+ *
* @return The <code>String</code> that is the result of evaluating the expression and
* converting the result to a <code>String</code>.
- *
+ *
* @throws XPathExpressionException If <code>expression</code> cannot be evaluated.
* @throws NullPointerException If <code>expression</code> is <code>null</code>.
*/
@@ -248,19 +248,19 @@
*
* <p>See <a href="#XPath-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
+ *
* <p>If <code>returnType</code> is not one of the types defined in {@link XPathConstants},
* then an <code>IllegalArgumentException</code> is thrown.</p>
- *
+ *
* <p>If <code>expression</code>, <code>source</code> or <code>returnType</code> is <code>null</code>,
* then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param expression The XPath expression.
* @param source The input source of the document to evaluate over.
* @param returnType The desired return type.
- *
+ *
* @return The <code>Object</code> that encapsulates the result of evaluating the expression.
- *
+ *
* @throws XPathExpressionException If expression cannot be evaluated.
* @throws IllegalArgumentException If <code>returnType</code> is not one of the types defined in {@link XPathConstants}.
* @throws NullPointerException If <code>expression</code>, <code>source</code> or <code>returnType</code>
@@ -281,16 +281,16 @@
*
* <p>See <a href="#XPath-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
+ *
* <p>If <code>expression</code> or <code>source</code> is <code>null</code>,
* then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param expression The XPath expression.
* @param source The <code>InputSource</code> of the document to evaluate over.
- *
+ *
* @return The <code>String</code> that is the result of evaluating the expression and
* converting the result to a <code>String</code>.
- *
+ *
* @throws XPathExpressionException If expression cannot be evaluated.
* @throws NullPointerException If <code>expression</code> or <code>source</code> is <code>null</code>.
*/
diff --git a/luni/src/main/java/javax/xml/xpath/XPathConstants.java b/luni/src/main/java/javax/xml/xpath/XPathConstants.java
index 25f1b53..2ff3622 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathConstants.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathConstants.java
@@ -30,43 +30,43 @@
* @since 1.5
*/
public class XPathConstants {
-
+
/**
* <p>Private constructor to prevent instantiation.</p>
*/
private XPathConstants() { }
-
+
/**
* <p>The XPath 1.0 number data type.</p>
- *
+ *
* <p>Maps to Java {@link Double}.</p>
*/
public static final QName NUMBER = new QName("http://www.w3.org/1999/XSL/Transform", "NUMBER");
/**
* <p>The XPath 1.0 string data type.</p>
- *
+ *
* <p>Maps to Java {@link String}.</p>
*/
public static final QName STRING = new QName("http://www.w3.org/1999/XSL/Transform", "STRING");
/**
* <p>The XPath 1.0 boolean data type.</p>
- *
+ *
* <p>Maps to Java {@link Boolean}.</p>
*/
public static final QName BOOLEAN = new QName("http://www.w3.org/1999/XSL/Transform", "BOOLEAN");
/**
* <p>The XPath 1.0 NodeSet data type.</p>
- *
+ *
* <p>Maps to Java {@link org.w3c.dom.NodeList}.</p>
*/
public static final QName NODESET = new QName("http://www.w3.org/1999/XSL/Transform", "NODESET");
/**
* <p>The XPath 1.0 NodeSet data type.
- *
+ *
* <p>Maps to Java {@link org.w3c.dom.Node}.</p>
*/
public static final QName NODE = new QName("http://www.w3.org/1999/XSL/Transform", "NODE");
diff --git a/luni/src/main/java/javax/xml/xpath/XPathException.java b/luni/src/main/java/javax/xml/xpath/XPathException.java
index 04d7a75..8db369b 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathException.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathException.java
@@ -31,7 +31,7 @@
public class XPathException extends Exception {
private final Throwable cause;
-
+
/**
* <p>Stream Unique Identifier.</p>
*/
@@ -70,7 +70,7 @@
throw new NullPointerException ( "cause can't be null");
}
}
-
+
public Throwable getCause() {
return cause;
}
@@ -83,7 +83,7 @@
super.printStackTrace(s);
}
-
+
public void printStackTrace() {
printStackTrace(System.err);
}
diff --git a/luni/src/main/java/javax/xml/xpath/XPathExpression.java b/luni/src/main/java/javax/xml/xpath/XPathExpression.java
index 68296ed..51946d0 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathExpression.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathExpression.java
@@ -80,30 +80,30 @@
* @since 1.5
*/
public interface XPathExpression {
-
+
/**
* <p>Evaluate the compiled XPath expression in the specified context and return the result as the specified type.</p>
*
* <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
+ *
* <p>If <code>returnType</code> is not one of the types defined in {@link XPathConstants},
* then an <code>IllegalArgumentException</code> is thrown.</p>
- *
- * <p>If a <code>null</code> value is provided for
+ *
+ * <p>If a <code>null</code> value is provided for
* <code>item</code>, an empty document will be used for the
* context.
- * If <code>returnType</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
+ * If <code>returnType</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
*
* @param item The starting context (node or node list, for example).
* @param returnType The desired return type.
- *
+ *
* @return The <code>Object</code> that is the result of evaluating the expression and converting the result to
* <code>returnType</code>.
- *
+ *
* @throws XPathExpressionException If the expression cannot be evaluated.
* @throws IllegalArgumentException If <code>returnType</code> is not one of the types defined in {@link XPathConstants}.
- * @throws NullPointerException If <code>returnType</code> is <code>null</code>.
+ * @throws NullPointerException If <code>returnType</code> is <code>null</code>.
*/
public Object evaluate(Object item, QName returnType)
throws XPathExpressionException;
@@ -113,19 +113,19 @@
*
* <p>This method calls {@link #evaluate(Object item, QName returnType)} with a <code>returnType</code> of
* {@link XPathConstants#STRING}.</p>
- *
+ *
* <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
- * <p>If a <code>null</code> value is provided for
+ *
+ * <p>If a <code>null</code> value is provided for
* <code>item</code>, an empty document will be used for the
* context.
*
* @param item The starting context (node or node list, for example).
- *
- * @return The <code>String</code> that is the result of evaluating the expression and converting the result to a
+ *
+ * @return The <code>String</code> that is the result of evaluating the expression and converting the result to a
* <code>String</code>.
- *
+ *
* @throws XPathExpressionException If the expression cannot be evaluated.
*/
public String evaluate(Object item)
@@ -137,48 +137,48 @@
*
* <p>This method builds a data model for the {@link InputSource} and calls
* {@link #evaluate(Object item, QName returnType)} on the resulting document object.</p>
- *
+ *
* <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
+ *
* <p>If <code>returnType</code> is not one of the types defined in {@link XPathConstants},
* then an <code>IllegalArgumentException</code> is thrown.</p>
- *
+ *
* <p>If <code>source</code> or <code>returnType</code> is <code>null</code>,
- * then a <code>NullPointerException</code> is thrown.</p>
+ * then a <code>NullPointerException</code> is thrown.</p>
*
* @param source The <code>InputSource</code> of the document to evaluate over.
* @param returnType The desired return type.
- *
+ *
* @return The <code>Object</code> that is the result of evaluating the expression and converting the result to
* <code>returnType</code>.
- *
+ *
* @throws XPathExpressionException If the expression cannot be evaluated.
* @throws IllegalArgumentException If <code>returnType</code> is not one of the types defined in {@link XPathConstants}.
- * @throws NullPointerException If <code>source</code> or <code>returnType</code> is <code>null</code>.
+ * @throws NullPointerException If <code>source</code> or <code>returnType</code> is <code>null</code>.
*/
public Object evaluate(InputSource source, QName returnType)
throws XPathExpressionException;
-
+
/**
* <p>Evaluate the compiled XPath expression in the context of the specified <code>InputSource</code> and return the result as a
* <code>String</code>.</p>
*
* <p>This method calls {@link #evaluate(InputSource source, QName returnType)} with a <code>returnType</code> of
* {@link XPathConstants#STRING}.</p>
- *
+ *
* <p>See <a href="#XPathExpression-evaluation">Evaluation of XPath Expressions</a> for context item evaluation,
* variable, function and QName resolution and return type conversion.</p>
- *
- * <p>If <code>source</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
+ *
+ * <p>If <code>source</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
*
* @param source The <code>InputSource</code> of the document to evaluate over.
- *
- * @return The <code>String</code> that is the result of evaluating the expression and converting the result to a
+ *
+ * @return The <code>String</code> that is the result of evaluating the expression and converting the result to a
* <code>String</code>.
- *
+ *
* @throws XPathExpressionException If the expression cannot be evaluated.
- * @throws NullPointerException If <code>source</code> is <code>null</code>.
+ * @throws NullPointerException If <code>source</code> is <code>null</code>.
*/
public String evaluate(InputSource source)
throws XPathExpressionException;
diff --git a/luni/src/main/java/javax/xml/xpath/XPathFactory.java b/luni/src/main/java/javax/xml/xpath/XPathFactory.java
index eaeca9b..55f886e 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathFactory.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathFactory.java
@@ -31,7 +31,7 @@
*/
public abstract class XPathFactory {
-
+
/**
* <p>The default property name according to the JAXP spec.</p>
*/
@@ -41,10 +41,10 @@
* <p>Default Object Model URI.</p>
*/
public static final String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom";
-
+
/**
* <p>Protected constructor as {@link #newInstance()}, {@link #newInstance(String uri)}
- * or {@link #newInstance(String uri, String factoryClassName, ClassLoader classLoader)}
+ * or {@link #newInstance(String uri, String factoryClassName, ClassLoader classLoader)}
* should be used to create a new instance of an <code>XPathFactory</code>.</p>
*/
protected XPathFactory() {
@@ -54,20 +54,20 @@
* <p>Get a new <code>XPathFactory</code> instance using the default object model,
* {@link #DEFAULT_OBJECT_MODEL_URI},
* the W3C DOM.</p>
- *
+ *
* <p>This method is functionally equivalent to:</p>
* <pre>
* newInstance(DEFAULT_OBJECT_MODEL_URI)
* </pre>
- *
- * <p>Since the implementation for the W3C DOM is always available, this method will never fail.</p>
- *
+ *
+ * <p>Since the implementation for the W3C DOM is always available, this method will never fail.</p>
+ *
* @return Instance of an <code>XPathFactory</code>.
*/
public static final XPathFactory newInstance() {
try {
return newInstance(DEFAULT_OBJECT_MODEL_URI);
- }
+ }
catch (XPathFactoryConfigurationException xpathFactoryConfigurationException) {
throw new RuntimeException(
"XPathFactory#newInstance() failed to create an XPathFactory for the default object model: "
@@ -80,7 +80,7 @@
/**
* <p>Get a new <code>XPathFactory</code> instance using the specified object model.</p>
- *
+ *
* <p>To find a <code>XPathFactory</code> object,
* this method looks the following places in the following order where "the class loader" refers to the context class loader:</p>
* <ol>
@@ -110,7 +110,7 @@
* </li>
* </ol>
* <p>If everything fails, an <code>XPathFactoryConfigurationException</code> will be thrown.</p>
- *
+ *
* <p>Tip for Trouble-shooting:</p>
* <p>See {@link java.util.Properties#load(java.io.InputStream)} for exactly how a property file is parsed.
* In particular, colons ':' need to be escaped in a property file, so make sure the URIs are properly escaped in it.
@@ -118,16 +118,16 @@
* <pre>
* http\://java.sun.com/jaxp/xpath/dom=org.acme.DomXPathFactory
* </pre>
- *
+ *
* @param uri Identifies the underlying object model.
* The specification only defines the URI {@link #DEFAULT_OBJECT_MODEL_URI},
* <code>http://java.sun.com/jaxp/xpath/dom</code> for the W3C DOM,
* the org.w3c.dom package, and implementations are free to introduce other URIs for other object models.
- *
+ *
* @return Instance of an <code>XPathFactory</code>.
- *
+ *
* @throws XPathFactoryConfigurationException If the specified object model is unavailable.
- * @throws NullPointerException If <code>uri</code> is <code>null</code>.
+ * @throws NullPointerException If <code>uri</code> is <code>null</code>.
* @throws IllegalArgumentException If <code>uri.length() == 0</code>.
*/
public static final XPathFactory newInstance(final String uri)
@@ -143,10 +143,10 @@
);
}
ClassLoader classLoader = SecuritySupport.getContextClassLoader();
- if (classLoader == null) {
+ if (classLoader == null) {
//use the current class loader
classLoader = XPathFactory.class.getClassLoader();
- }
+ }
XPathFactory xpathFactory = new XPathFactoryFinder(classLoader).newFactory(uri);
if (xpathFactory == null) {
throw new XPathFactoryConfigurationException(
@@ -156,12 +156,12 @@
}
return xpathFactory;
}
-
+
/**
* @return Instance of an <code>XPathFactory</code>.
- *
+ *
* @throws XPathFactoryConfigurationException If the specified object model is unavailable.
- * @throws NullPointerException If <code>uri</code> is <code>null</code>.
+ * @throws NullPointerException If <code>uri</code> is <code>null</code>.
* @throws IllegalArgumentException If <code>uri.length() == 0</code>.
*/
public static XPathFactory newInstance(String uri, String factoryClassName,
@@ -194,11 +194,11 @@
/**
* <p>Is specified object model supported by this <code>XPathFactory</code>?</p>
- *
+ *
* @param objectModel Specifies the object model which the returned <code>XPathFactory</code> will understand.
- *
+ *
* @return <code>true</code> if <code>XPathFactory</code> supports <code>objectModel</code>, else <code>false</code>.
- *
+ *
* @throws NullPointerException If <code>objectModel</code> is <code>null</code>.
* @throws IllegalArgumentException If <code>objectModel.length() == 0</code>.
*/
@@ -206,7 +206,7 @@
/**
* <p>Set a feature for this <code>XPathFactory</code> and <code>XPath</code>s created by this factory.</p>
- *
+ *
* <p>
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -214,17 +214,17 @@
* it creates cannot support the feature.
* It is possible for an <code>XPathFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* <p>
* All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
* When the feature is <code>true</code>, any reference to an external function is an error.
* Under these conditions, the implementation must not call the {@link XPathFunctionResolver}
* and must throw an {@link XPathFunctionException}.
* </p>
- *
+ *
* @param name Feature name.
* @param value Is feature state <code>true</code> or <code>false</code>.
- *
+ *
* @throws XPathFactoryConfigurationException if this <code>XPathFactory</code> or the <code>XPath</code>s
* it creates cannot support this feature.
* @throws NullPointerException if <code>name</code> is <code>null</code>.
@@ -234,7 +234,7 @@
/**
* <p>Get the state of the named feature.</p>
- *
+ *
* <p>
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -242,11 +242,11 @@
* it creates cannot support the feature.
* It is possible for an <code>XPathFactory</code> to expose a feature value but be unable to change its state.
* </p>
- *
+ *
* @param name Feature name.
- *
+ *
* @return State of the named feature.
- *
+ *
* @throws XPathFactoryConfigurationException if this <code>XPathFactory</code> or the <code>XPath</code>s
* it creates cannot support this feature.
* @throws NullPointerException if <code>name</code> is <code>null</code>.
@@ -259,25 +259,25 @@
*
* <p>Any <code>XPath</code> objects constructed from this factory will use
* the specified resolver by default.</p>
- *
+ *
* <p>A <code>NullPointerException</code> is thrown if <code>resolver</code> is <code>null</code>.</p>
- *
+ *
* @param resolver Variable resolver.
- *
+ *
* @throws NullPointerException If <code>resolver</code> is <code>null</code>.
*/
public abstract void setXPathVariableResolver(XPathVariableResolver resolver);
/**
* <p>Establish a default function resolver.</p>
- *
+ *
* <p>Any <code>XPath</code> objects constructed from this factory will use
* the specified resolver by default.</p>
*
* <p>A <code>NullPointerException</code> is thrown if <code>resolver</code> is <code>null</code>.</p>
- *
+ *
* @param resolver XPath function resolver.
- *
+ *
* @throws NullPointerException If <code>resolver</code> is <code>null</code>.
*/
public abstract void setXPathFunctionResolver(XPathFunctionResolver resolver);
@@ -285,7 +285,7 @@
/**
* <p>Return a new <code>XPath</code> using the underlying object
* model determined when the <code>XPathFactory</code> was instantiated.</p>
- *
+ *
* @return New instance of an <code>XPath</code>.
*/
public abstract XPath newXPath();
diff --git a/luni/src/main/java/javax/xml/xpath/XPathFactoryConfigurationException.java b/luni/src/main/java/javax/xml/xpath/XPathFactoryConfigurationException.java
index f6f64c2..0d19b22 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathFactoryConfigurationException.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathFactoryConfigurationException.java
@@ -27,19 +27,19 @@
* @since 1.5
*/
public class XPathFactoryConfigurationException extends XPathException {
-
+
/**
* <p>Stream Unique Identifier.</p>
*/
- private static final long serialVersionUID = -1837080260374986980L;
-
+ private static final long serialVersionUID = -1837080260374986980L;
+
/**
* <p>Constructs a new <code>XPathFactoryConfigurationException</code> with the specified detail <code>message</code>.</p>
- *
+ *
* <p>The <code>cause</code> is not initialized.</p>
- *
+ *
* <p>If <code>message</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param message The detail message.
*/
public XPathFactoryConfigurationException(String message) {
@@ -48,11 +48,11 @@
/**
* <p>Constructs a new <code>XPathFactoryConfigurationException</code> with the specified <code>cause</code>.</p>
- *
+ *
* <p>If <code>cause</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param cause The cause.
- *
+ *
* @throws NullPointerException if <code>cause</code> is <code>null</code>.
*/
public XPathFactoryConfigurationException(Throwable cause) {
diff --git a/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java b/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java
index f9d365c..cd66401 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathFactoryFinder.java
@@ -34,21 +34,21 @@
/**
* Implementation of {@link XPathFactory#newInstance(String)}.
- *
+ *
* @author <a href="Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
* @version $Revision: 670432 $, $Date: 2008-06-22 19:02:08 -0700 (Sun, 22 Jun 2008) $
* @since 1.5
*/
final class XPathFactoryFinder {
-
+
/** debug support code. */
private static boolean debug = false;
-
+
/**
* Default columns per line.
*/
private static final int DEFAULT_LINE_LENGTH = 80;
-
+
static {
// Use try/catch block to support applets
try {
@@ -64,15 +64,15 @@
* <p>Cache properties for performance.</p>
*/
private static Properties cacheProps = new Properties();
-
+
/**
* <p>First time requires initialization overhead.</p>
*/
private static boolean firstTime = true;
-
+
/**
* <p>Conditional debug printing.</p>
- *
+ *
* @param msg to print
*/
private static void debugPrintln(String msg) {
@@ -80,16 +80,16 @@
System.err.println("JAXP: " + msg);
}
}
-
+
/**
* <p><code>ClassLoader</code> to use to find <code>SchemaFactory</code>.</p>
*/
private final ClassLoader classLoader;
-
+
/**
* <p>Constructor that specifies <code>ClassLoader</code> to use
* to find <code>SchemaFactory</code>.</p>
- *
+ *
* @param loader
* to be used to load resource, {@link SchemaFactory}, and
* {@link SchemaFactoryLoader} implementations during
@@ -103,7 +103,7 @@
debugDisplayClassLoader();
}
}
-
+
private void debugDisplayClassLoader() {
try {
if( classLoader == SecuritySupport.getContextClassLoader() ) {
@@ -120,9 +120,9 @@
throw td;
}
catch (Throwable _) {
- ; // getContextClassLoader() undefined in JDK1.1
+ ; // getContextClassLoader() undefined in JDK1.1
}
-
+
if( classLoader==ClassLoader.getSystemClassLoader() ) {
debugPrintln("using system class loader ("+classLoader+") for search");
return;
@@ -130,16 +130,16 @@
debugPrintln("using class loader ("+classLoader+") for search");
}
-
+
/**
* <p>Creates a new {@link XPathFactory} object for the specified
* schema language.</p>
- *
+ *
* @param uri
* Identifies the underlying object model.
- *
+ *
* @return <code>null</code> if the callee fails to create one.
- *
+ *
* @throws NullPointerException
* If the parameter is null.
*/
@@ -155,19 +155,19 @@
}
return f;
}
-
+
/**
* <p>Lookup a {@link XPathFactory} for the given object model.</p>
- *
+ *
* @param uri identifies the object model.
- *
+ *
* @return {@link XPathFactory} for the given object model.
*/
private XPathFactory _newFactory(String uri) {
XPathFactory xpf;
-
+
String propertyName = SERVICE_CLASS.getName() + ":" + uri;
-
+
// system property look up
try {
if (debug) debugPrintln("Looking up system property '"+propertyName+"'" );
@@ -176,7 +176,7 @@
if (debug) debugPrintln("The value is '"+r+"'");
xpf = createInstance(r);
if(xpf!=null) return xpf;
- }
+ }
else if (debug) {
debugPrintln("The property is undefined.");
}
@@ -195,7 +195,7 @@
t.printStackTrace();
}
}
-
+
String javah = SecuritySupport.getSystemProperty( "java.home" );
String configFile = javah + File.separator +
"lib" + File.separator + "jaxp.properties";
@@ -210,14 +210,14 @@
File f=new File( configFile );
firstTime = false;
if(SecuritySupport.doesFileExist(f)){
- if (debug) debugPrintln("Read properties file " + f);
+ if (debug) debugPrintln("Read properties file " + f);
cacheProps.load(SecuritySupport.getFileInputStream(f));
}
}
}
}
- factoryClassName = cacheProps.getProperty(propertyName);
- if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
+ factoryClassName = cacheProps.getProperty(propertyName);
+ if (debug) debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties");
if (factoryClassName != null) {
xpf = createInstance(factoryClassName);
@@ -228,9 +228,9 @@
} catch (Exception ex) {
if (debug) {
ex.printStackTrace();
- }
+ }
}
-
+
// try META-INF/services files
Iterator sitr = createServiceFileIterator();
while(sitr.hasNext()) {
@@ -246,25 +246,25 @@
}
}
}
-
+
// platform default
if(uri.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) {
if (debug) debugPrintln("attempting to use the platform default W3C DOM XPath lib");
return createInstance("org.apache.xpath.jaxp.XPathFactoryImpl");
}
-
+
if (debug) debugPrintln("all things were tried, but none was found. bailing out.");
return null;
}
-
+
/**
* <p>Creates an instance of the specified and returns it.</p>
- *
+ *
* @param className
* fully qualified class name to be instanciated.
- *
+ *
* @return null
- * if it fails. Error messages will be printed by this method.
+ * if it fails. Error messages will be printed by this method.
*/
XPathFactory createInstance( String className ) {
try {
@@ -276,10 +276,10 @@
clazz = Class.forName(className);
if(debug) debugPrintln("loaded it from "+which(clazz));
Object o = clazz.newInstance();
-
+
if( o instanceof XPathFactory )
return (XPathFactory)o;
-
+
if (debug) debugPrintln(className+" is not assignable to "+SERVICE_CLASS.getName());
}
// The VM ran out of memory or there was some other serious problem. Re-throw.
@@ -298,11 +298,11 @@
}
return null;
}
-
+
/** Iterator that lazily computes one value and returns it. */
private static abstract class SingleIterator implements Iterator {
private boolean seen = false;
-
+
public final void remove() { throw new UnsupportedOperationException(); }
public final boolean hasNext() { return !seen; }
public final Object next() {
@@ -310,28 +310,28 @@
seen = true;
return value();
}
-
+
protected abstract Object value();
}
-
+
/** Searches for a XPathFactory for a given uri in a META-INF/services file. */
private XPathFactory loadFromServicesFile(String uri, String resourceName, InputStream in) {
if (debug) debugPrintln("Reading " + resourceName );
-
+
BufferedReader rd;
try {
rd = new BufferedReader(new InputStreamReader(in, "UTF-8"), DEFAULT_LINE_LENGTH);
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(in), DEFAULT_LINE_LENGTH);
}
-
+
String factoryClassName = null;
XPathFactory resultFactory = null;
// See spec for provider-configuration files: http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Provider%20Configuration%20File
while (true) {
try {
- factoryClassName = rd.readLine();
+ factoryClassName = rd.readLine();
} catch (IOException x) {
// No provider found
break;
@@ -342,15 +342,15 @@
if (hashIndex != -1) {
factoryClassName = factoryClassName.substring(0, hashIndex);
}
-
+
// Ignore leading and trailing whitespace
factoryClassName = factoryClassName.trim();
-
+
// If there's no text left or if this was a blank line, go to the next one.
if (factoryClassName.length() == 0) {
continue;
}
-
+
try {
// Found the right XPathFactory if its isObjectModelSupported(String uri) method returns true.
XPathFactory foundFactory = (XPathFactory) createInstance(factoryClassName);
@@ -365,19 +365,19 @@
break;
}
}
-
+
try {
// try to close the reader.
rd.close();
}
// Ignore the exception.
catch (IOException exc) {}
-
+
return resultFactory;
}
-
+
/**
- * Returns an {@link Iterator} that enumerates all
+ * Returns an {@link Iterator} that enumerates all
* the META-INF/services files that we care.
*/
private Iterator createServiceFileIterator() {
@@ -396,7 +396,7 @@
if (debug && !e.hasMoreElements()) {
debugPrintln("no "+SERVICE_ID+" file was found");
}
-
+
// wrap it into an Iterator.
return new Iterator() {
public void remove() {
@@ -420,12 +420,12 @@
}
}
}
-
+
private static final Class SERVICE_CLASS = XPathFactory.class;
private static final String SERVICE_ID = "META-INF/services/" + SERVICE_CLASS.getName();
-
-
-
+
+
+
private static String which( Class clazz ) {
return which( clazz.getName(), clazz.getClassLoader() );
}
@@ -435,15 +435,15 @@
*
* @param classname the fully qualified name of the class to search for
* @param loader the classloader to search
- *
+ *
* @return the source location of the resource, or null if it wasn't found
*/
private static String which(String classname, ClassLoader loader) {
String classnameAsResource = classname.replace('.', '/') + ".class";
-
+
if( loader==null ) loader = ClassLoader.getSystemClassLoader();
-
+
//URL it = loader.getResource(classnameAsResource);
URL it = SecuritySupport.getResourceAsURL(loader, classnameAsResource);
if (it != null) {
diff --git a/luni/src/main/java/javax/xml/xpath/XPathFunction.java b/luni/src/main/java/javax/xml/xpath/XPathFunction.java
index e64560e..1d80169 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathFunction.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathFunction.java
@@ -38,11 +38,11 @@
* definition of extension functions. The implementation evaluating an
* XPath expression is under no obligation to call extension functions in
* any particular order or any particular number of times.</p>
- *
+ *
* @param args The arguments, <code>null</code> is a valid value.
- *
+ *
* @return The result of evaluating the <code>XPath</code> function as an <code>Object</code>.
- *
+ *
* @throws XPathFunctionException If <code>args</code> cannot be evaluated with this <code>XPath</code> function.
*/
public Object evaluate(List args)
diff --git a/luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java b/luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java
index 7dae4d7..c8236d4 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathFunctionResolver.java
@@ -44,16 +44,16 @@
* @since 1.5
*/
public interface XPathFunctionResolver {
- /**
+ /**
* <p>Find a function in the set of available functions.</p>
- *
+ *
* <p>If <code>functionName</code> or <code>arity</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
*
* @param functionName The function name.
* @param arity The number of arguments that the returned function must accept.
- *
+ *
* @return The function or <code>null</code> if no function named <code>functionName</code> with <code>arity</code> arguments exists.
- *
+ *
* @throws NullPointerException If <code>functionName</code> or <code>arity</code> is <code>null</code>.
*/
public XPathFunction resolveFunction(QName functionName, int arity);
diff --git a/luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java b/luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java
index c173db5..f8938a8 100644
--- a/luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java
+++ b/luni/src/main/java/javax/xml/xpath/XPathVariableResolver.java
@@ -35,16 +35,16 @@
* @since 1.5
*/
public interface XPathVariableResolver {
- /**
+ /**
* <p>Find a variable in the set of available variables.</p>
- *
+ *
* <p>If <code>variableName</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
- *
+ *
* @param variableName The <code>QName</code> of the variable name.
- *
+ *
* @return The variables value, or <code>null</code> if no variable named <code>variableName</code>
* exists. The value returned must be of a type appropriate for the underlying object model.
- *
+ *
* @throws NullPointerException If <code>variableName</code> is <code>null</code>.
*/
public Object resolveVariable(QName variableName);
diff --git a/luni/src/main/java/org/apache/harmony/archive/util/Util.java b/luni/src/main/java/org/apache/harmony/archive/util/Util.java
index 2ac4e90..0875540 100644
--- a/luni/src/main/java/org/apache/harmony/archive/util/Util.java
+++ b/luni/src/main/java/org/apache/harmony/archive/util/Util.java
@@ -25,7 +25,7 @@
/**
* Returns whether the given source string ends with the suffix, ignoring
* case and assuming that the strings are ascii encoded.
- *
+ *
* @param source
* the string to match.
* @param suffix
@@ -52,7 +52,7 @@
/**
* Compares the given byte arrays and returns whether they are equal,
* ignoring case differences and assuming they are ascii-encoded strings.
- *
+ *
* @param buf1
* first byte array to compare.
* @param buf2
@@ -83,7 +83,7 @@
/**
* Compares the given strings and returns whether they are equal, ignoring
* case differences and assuming they are ascii-encoded strings.
- *
+ *
* @param s1
* first string to compare.
* @param s2
diff --git a/luni/src/main/java/org/apache/harmony/auth/internal/nls/Messages.java b/luni/src/main/java/org/apache/harmony/auth/internal/nls/Messages.java
index 511aa7a..5b5ee93 100644
--- a/luni/src/main/java/org/apache/harmony/auth/internal/nls/Messages.java
+++ b/luni/src/main/java/org/apache/harmony/auth/internal/nls/Messages.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,7 @@
/*
* THE FILE HAS BEEN AUTOGENERATED BY MSGTOOL TOOL.
- * All changes made to this file manually will be overwritten
+ * All changes made to this file manually will be overwritten
* if this tool runs again. Better make changes in the template file.
*/
@@ -50,7 +50,7 @@
* is looked up, or resource bundle support is not available, the key itself
* will be returned as the associated message. This means that the <em>KEY</em>
* should a reasonable human-readable (english) string.
- *
+ *
*/
public class Messages {
@@ -61,7 +61,7 @@
/**
* Retrieves a message which has no arguments.
- *
+ *
* @param msg
* String the key to look up.
* @return String the message for that key in the system message bundle.
@@ -74,7 +74,7 @@
/**
* Retrieves a message which takes 1 argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -87,7 +87,7 @@
/**
* Retrieves a message which takes 1 integer argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -100,7 +100,7 @@
/**
* Retrieves a message which takes 1 character argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -113,7 +113,7 @@
/**
* Retrieves a message which takes 2 arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param arg1
@@ -128,7 +128,7 @@
/**
* Retrieves a message which takes several arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param args
diff --git a/luni/src/main/java/org/apache/harmony/crypto/internal/NullCipherSpi.java b/luni/src/main/java/org/apache/harmony/crypto/internal/NullCipherSpi.java
index 4ffdf53..380ed72 100644
--- a/luni/src/main/java/org/apache/harmony/crypto/internal/NullCipherSpi.java
+++ b/luni/src/main/java/org/apache/harmony/crypto/internal/NullCipherSpi.java
@@ -41,7 +41,7 @@
/**
* CipherSpi implementation for javax.crypto.NullCipher
- *
+ *
*/
public class NullCipherSpi extends CipherSpi {
@@ -125,7 +125,7 @@
try {
output.put(input);
} catch (java.nio.BufferOverflowException e) {
- throw new ShortBufferException(Messages.getString("crypto.0F", e));
+ throw new ShortBufferException(Messages.getString("crypto.0F", e));
}
return result;
}
@@ -158,18 +158,18 @@
@Override
public byte[] engineWrap(Key key) throws IllegalBlockSizeException,
InvalidKeyException {
- throw new UnsupportedOperationException(Messages.getString("crypto.44"));
+ throw new UnsupportedOperationException(Messages.getString("crypto.44"));
}
@Override
public Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm,
int wrappedKeyType) throws InvalidKeyException,
NoSuchAlgorithmException {
- throw new UnsupportedOperationException(Messages.getString("crypto.45"));
+ throw new UnsupportedOperationException(Messages.getString("crypto.45"));
}
@Override
public int engineGetKeySize(Key key) throws InvalidKeyException {
- throw new UnsupportedOperationException(Messages.getString("crypto.46"));
+ throw new UnsupportedOperationException(Messages.getString("crypto.46"));
}
}
\ No newline at end of file
diff --git a/luni/src/main/java/org/apache/harmony/crypto/internal/nls/Messages.java b/luni/src/main/java/org/apache/harmony/crypto/internal/nls/Messages.java
index c55a601..5472f5f 100644
--- a/luni/src/main/java/org/apache/harmony/crypto/internal/nls/Messages.java
+++ b/luni/src/main/java/org/apache/harmony/crypto/internal/nls/Messages.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,7 @@
/*
* THE FILE HAS BEEN AUTOGENERATED BY MSGTOOL TOOL.
- * All changes made to this file manually will be overwritten
+ * All changes made to this file manually will be overwritten
* if this tool runs again. Better make changes in the template file.
*/
@@ -50,18 +50,18 @@
* is looked up, or resource bundle support is not available, the key itself
* will be returned as the associated message. This means that the <em>KEY</em>
* should a reasonable human-readable (english) string.
- *
+ *
*/
public class Messages {
// BEGIN android-changed
private static final String sResource =
- "org.apache.harmony.crypto.internal.nls.messages";
+ "org.apache.harmony.crypto.internal.nls.messages";
// END android-changed
/**
* Retrieves a message which has no arguments.
- *
+ *
* @param msg
* String the key to look up.
* @return String the message for that key in the system message bundle.
@@ -74,7 +74,7 @@
/**
* Retrieves a message which takes 1 argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -87,7 +87,7 @@
/**
* Retrieves a message which takes 1 integer argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -100,7 +100,7 @@
/**
* Retrieves a message which takes 1 character argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -113,7 +113,7 @@
/**
* Retrieves a message which takes 2 arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param arg1
@@ -128,7 +128,7 @@
/**
* Retrieves a message which takes several arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param args
diff --git a/luni/src/main/java/org/apache/harmony/kernel/vm/LangAccess.java b/luni/src/main/java/org/apache/harmony/kernel/vm/LangAccess.java
index 8b321e4..28c3546 100644
--- a/luni/src/main/java/org/apache/harmony/kernel/vm/LangAccess.java
+++ b/luni/src/main/java/org/apache/harmony/kernel/vm/LangAccess.java
@@ -61,15 +61,15 @@
if (theInstance == null) {
throw new UnsupportedOperationException("not yet initialized");
}
-
+
return theInstance;
}
-
+
/**
* Gets a shared array of the enum constants of a given class in
* declaration (ordinal) order. It is not safe to hand out this
* array to any user code.
- *
+ *
* @param clazz non-null; the class in question
* @return null-ok; the class's list of enumerated constants in
* declaration order or <code>null</code> if the given class is
@@ -78,15 +78,15 @@
public abstract <T> T[] getEnumValuesInOrder(Class<T> clazz);
/**
- * Unparks the given thread. This unblocks the thread it if it was
+ * Unparks the given thread. This unblocks the thread it if it was
* previously parked, or indicates that the thread is "preemptively
* unparked" if it wasn't already parked. The latter means that the
* next time the thread is told to park, it will merely clear its
* latent park bit and carry on without blocking.
- *
+ *
* <p>See {@link java.util.concurrent.locks.LockSupport} for more
* in-depth information of the behavior of this method.</p>
- *
+ *
* @param thread non-null; the thread to unpark
*/
public abstract void unpark(Thread thread);
@@ -99,10 +99,10 @@
* cancels that unparking and returns immediately. This method may
* also return spuriously (that is, without the thread being told to
* unpark and without the indicated amount of time elapsing).
- *
+ *
* <p>See {@link java.util.concurrent.locks.LockSupport} for more
* in-depth information of the behavior of this method.</p>
- *
+ *
* @param nanos number of nanoseconds to park for or <code>0</code>
* to park indefinitely
* @throws IllegalArgumentException thrown if <code>nanos < 0</code>
@@ -121,7 +121,7 @@
*
* <p>See {@link java.util.concurrent.locks.LockSupport} for more
* in-depth information of the behavior of this method.</p>
- *
+ *
* @param time the time after which the thread should be unparked,
* in absolute milliseconds-since-the-epoch
*/
diff --git a/luni/src/main/java/org/apache/harmony/kernel/vm/ReflectionAccess.java b/luni/src/main/java/org/apache/harmony/kernel/vm/ReflectionAccess.java
index 1487ba1..fc2dcd1 100644
--- a/luni/src/main/java/org/apache/harmony/kernel/vm/ReflectionAccess.java
+++ b/luni/src/main/java/org/apache/harmony/kernel/vm/ReflectionAccess.java
@@ -29,7 +29,7 @@
public interface ReflectionAccess {
/**
* Gets a clone of the given method.
- *
+ *
* @param method non-null; the method to clone
* @return non-null; the clone
*/
@@ -37,7 +37,7 @@
/**
* Gets a clone of the given field.
- *
+ *
* @param field non-null; the field to clone
* @return non-null; the clone
*/
@@ -46,7 +46,7 @@
/**
* Gets a clone of the given method, where the clone has
* its "accessible" flag set to <code>true</code>
- *
+ *
* @param method non-null; the method to clone
* @return non-null; the accessible clone
*/
@@ -55,7 +55,7 @@
/**
* Sets the accessible flag on a given {@link AccessibleObject}
* without doing any checks.
- *
+ *
* @param ao non-null; the instance in question
* @param flag the new value for the accessible flag
*/
diff --git a/luni/src/main/java/org/apache/harmony/kernel/vm/StringUtils.java b/luni/src/main/java/org/apache/harmony/kernel/vm/StringUtils.java
index b392388..01d0e30 100644
--- a/luni/src/main/java/org/apache/harmony/kernel/vm/StringUtils.java
+++ b/luni/src/main/java/org/apache/harmony/kernel/vm/StringUtils.java
@@ -26,11 +26,11 @@
private StringUtils() {
// This space intentionally left blank.
}
-
+
/**
* Combine a list of strings in an <code>Object[]</code> into a single
* string.
- *
+ *
* @param list non-null; the strings to combine
* @return non-null; the combined form
*/
@@ -53,11 +53,11 @@
}
StringBuilder sb = new StringBuilder(strLength);
-
+
for (int i = 0; i < listLength; i++) {
sb.append(list[i]);
}
-
+
return sb.toString();
}
}
diff --git a/luni/src/main/java/org/apache/harmony/kernel/vm/VM.java b/luni/src/main/java/org/apache/harmony/kernel/vm/VM.java
index 8aa7c4b..2e2ccc0 100644
--- a/luni/src/main/java/org/apache/harmony/kernel/vm/VM.java
+++ b/luni/src/main/java/org/apache/harmony/kernel/vm/VM.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,7 +49,7 @@
* NOT the classes of receivers.</li>
* <li>The item at depth zero is the caller of this method</li>
* </ul>
- *
+ *
* @param depth the stack depth of the requested ClassLoader
* @return the ClassLoader at the specified depth
* @see java.lang.ClassLoader#getStackClassLoader
@@ -68,7 +68,7 @@
* stack of the calling thread. If no such ClassLoader is found, null is
* returned. Notes: 1) This method operates on the defining classes of
* methods on stack. NOT the classes of receivers.
- *
+ *
* @return the first non-bootstrap ClassLoader on the stack
*/
static public final ClassLoader getNonBootstrapClassLoader() {
@@ -77,7 +77,7 @@
/**
* Initialize the classloader.
- *
+ *
* @param loader ClassLoader the ClassLoader instance
* @param bootLoader boolean true for the bootstrap class loader
*/
@@ -87,14 +87,14 @@
/**
* This method must be provided by the vm vendor.
- *
+ *
* Searches an internal table of strings for a string equal to the specified
* String. If the string is not in the table, it is added. Returns the
* string contained in the table which is equal to the specified String. The
* same string object is always answered for strings which are equal.
- *
+ *
* @param string the String to intern
- *
+ *
* @return the interned string equal to the specified String
*/
public static final String intern(String string) {
@@ -103,7 +103,7 @@
/**
* Native used to find and load a class using the VM
- *
+ *
* @return java.lang.Class the class or null.
* @param className String the name of the class to search for.
* @param classLoader the classloader to do the work
@@ -119,7 +119,7 @@
* Returns the ClassLoader of the method that called the caller. i.e. A.x()
* calls B.y() calls callerClassLoader(), A's ClassLoader will be returned.
* Returns null for the bootstrap ClassLoader.
- *
+ *
* @return a ClassLoader or null for the bootstrap ClassLoader
* @throws SecurityException when called from a non-bootstrap Class
*/
@@ -133,13 +133,13 @@
* ClassLoader. MsgHelp uses the bootstrap ClassLoader to find the resource
* bundle of messages packaged with the bootstrap classes. The reference
* implementation of this method uses the getStackClassLoader() method.
- *
+ *
* Returns the ClassLoader of the method that called the caller. i.e. A.x()
* calls B.y() calls callerClassLoader(), A's ClassLoader will be returned.
* Returns null for the bootstrap ClassLoader.
- *
+ *
* @return a ClassLoader
- *
+ *
* @throws SecurityException when called from a non-bootstrap Class
*/
public static ClassLoader bootCallerClassLoader() {
@@ -148,7 +148,7 @@
/**
* Native used to dump a string to the system console for debugging.
- *
+ *
* @param str String the String to display
*/
public static void dumpString(String str) {
@@ -159,7 +159,7 @@
* Get the classpath entry that was used to load the class that is the arg.
* <p>
* This method is for internal use only.
- *
+ *
* @param targetClass Class the class to set the classpath of.
* @see java.lang.Class
*/
@@ -169,7 +169,7 @@
/**
* Does internal initialization required by VM.
- *
+ *
*/
static void initializeVM() {
}
@@ -177,7 +177,7 @@
/**
* Registers a new virtual-machine shutdown hook. This is equivalent to the
* 1.3 API of the same name.
- *
+ *
* @param hook the hook (a Thread) to register
*/
public static void addShutdownHook(Thread hook) {
@@ -187,7 +187,7 @@
/**
* De-registers a previously-registered virtual-machine shutdown hook. This
* is equivalent to the 1.3 API of the same name.
- *
+ *
* @param hook the hook (a Thread) to de-register
* @return true if the hook could be de-registered
*/
@@ -230,10 +230,10 @@
* Return the type of the specified entry on the class path for a
* ClassLoader. Valid types are: CPE_TYPE_UNKNOWN CPE_TYPE_DIRECTORY
* CPE_TYPE_JAR CPE_TYPE_TCP - this is obsolete CPE_TYPE_UNUSABLE
- *
+ *
* @param classLoader the ClassLoader
* @param cpIndex the index on the class path
- *
+ *
* @return a int which specifies the class path entry type
*/
static final int getClassPathEntryType(Object classLoader, int cpIndex) {
@@ -245,7 +245,7 @@
* broken into optionString and extraInfo. This only returns the
* optionString part.
* <p>
- *
+ *
* @return a String array containing the optionString part of command line
* arguments
*/
@@ -255,7 +255,7 @@
/**
* Return the number of entries on the bootclasspath.
- *
+ *
* @return an int which is the number of entries on the bootclasspath
*/
static int getClassPathCount() {
@@ -264,9 +264,9 @@
/**
* Return the specified bootclasspath entry.
- *
- * @param index the index of the bootclasspath entry
- *
+ *
+ * @param index the index of the bootclasspath entry
+ *
* @return a byte array containing the bootclasspath entry
* specified in the vm options
*/
diff --git a/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationFactory.java b/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationFactory.java
index a898f54..ba979da 100644
--- a/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationFactory.java
+++ b/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationFactory.java
@@ -38,34 +38,34 @@
/**
* The annotation implementation based on dynamically generated proxy instances.
* It conforms to all requirements stated in public APIs, see in particular
- * {@link java.lang.reflect.AnnotatedElement java.lang.reflect.AnnotatedElement}
+ * {@link java.lang.reflect.AnnotatedElement java.lang.reflect.AnnotatedElement}
* and {@link java.lang.annotation.Annotation java.lang.annotation.Annotation}.
* Namely, annotation instances are immutable and serializable; they provide
* conforming access to annotation member values and required implementations of
* methods declared in Annotation interface.
- *
+ *
* @see android.lang.annotation.AnnotationMember
* @see java.lang.annotation.Annotation
- *
+ *
* @author Alexey V. Varlamov, Serguei S. Zapreyev
* @version $Revision$
*/
@SuppressWarnings({"serial"})
public final class AnnotationFactory implements InvocationHandler, Serializable {
-
- private static final transient
- Map<Class<? extends Annotation>, AnnotationMember[]>
+
+ private static final transient
+ Map<Class<? extends Annotation>, AnnotationMember[]>
cache = new WeakHashMap<Class<? extends Annotation>, AnnotationMember[]>();
-
+
/**
- * Reflects specified annotation type and returns an array
+ * Reflects specified annotation type and returns an array
* of member element definitions with default values.
*/
public static AnnotationMember[] getElementsDescription(Class<? extends Annotation> annotationType ) {
AnnotationMember[] desc = cache.get(annotationType);
if (desc == null) {
if (!annotationType.isAnnotation()) {
- throw new IllegalArgumentException("Type is not annotation: "
+ throw new IllegalArgumentException("Type is not annotation: "
+ annotationType.getName());
}
Method[] m = annotationType.getDeclaredMethods();
@@ -75,7 +75,7 @@
String name = element.getName();
Class<?> type = element.getReturnType();
try {
- desc[idx] = new AnnotationMember(name,
+ desc[idx] = new AnnotationMember(name,
element.getDefaultValue(), type, element);
} catch (Throwable t) {
desc[idx] = new AnnotationMember(name, t, type, element);
@@ -86,7 +86,7 @@
}
return desc;
}
-
+
/**
* Provides a new annotation instance.
* @param annotationType the annotation type definition
@@ -94,11 +94,11 @@
* @return a new annotation instance
*/
public static Annotation createAnnotation(
- Class<? extends Annotation> annotationType,
- AnnotationMember[] elements)
+ Class<? extends Annotation> annotationType,
+ AnnotationMember[] elements)
{
- AnnotationFactory antn = new AnnotationFactory(annotationType, elements);
- return (Annotation)Proxy.newProxyInstance( annotationType.getClassLoader(),
+ AnnotationFactory antn = new AnnotationFactory(annotationType, elements);
+ return (Annotation)Proxy.newProxyInstance( annotationType.getClassLoader(),
new Class[]{annotationType}, antn);
}
@@ -111,7 +111,7 @@
* instead.
*
* @param klzz class defining the annotation type
- * @param values actual element values
+ * @param values actual element values
*/
private AnnotationFactory(Class<? extends Annotation> klzz, AnnotationMember[] values) {
klazz = klzz;
@@ -132,20 +132,20 @@
}
}
}
-
+
/**
- * Reads the object, obtains actual member definitions for the annotation type,
+ * Reads the object, obtains actual member definitions for the annotation type,
* and merges deserialized values with the new definitions.
*/
- private void readObject(ObjectInputStream os) throws IOException,
+ private void readObject(ObjectInputStream os) throws IOException,
ClassNotFoundException {
os.defaultReadObject();
// Annotation type members can be changed arbitrarily
- // So there may be zombi elements from the previous life;
- // they hardly fit into this new annotation's incarnation,
+ // So there may be zombi elements from the previous life;
+ // they hardly fit into this new annotation's incarnation,
// as we have no defining methods for them.
- // Reasonably just drop such elements,
- // but seems better to keep them for compatibility
+ // Reasonably just drop such elements,
+ // but seems better to keep them for compatibility
AnnotationMember[] defs = getElementsDescription(klazz);
AnnotationMember[] old = elements;
List<AnnotationMember> merged = new ArrayList<AnnotationMember>(
@@ -168,18 +168,18 @@
}
}
merged.add(def); // brand new element
- }
+ }
elements = merged.toArray(new AnnotationMember[merged.size()]);
}
-
+
/**
* Returns true if the specified object represents the same annotation instance.
- * That is, if it implements the same annotation type and
- * returns the same element values.
+ * That is, if it implements the same annotation type and
+ * returns the same element values.
* <br>Note, actual underlying implementation mechanism does not matter - it may
* differ completely from this class.
- * @return true if the passed object is equivalent annotation instance,
- * false otherwise.
+ * @return true if the passed object is equivalent annotation instance,
+ * false otherwise.
* @see android.lang.annotation.AnnotationMember#equals(Object)
*/
public boolean equals(Object obj) {
@@ -190,7 +190,7 @@
return false;
}
Object handler = null;
- if (Proxy.isProxyClass(obj.getClass())
+ if (Proxy.isProxyClass(obj.getClass())
&& (handler = Proxy.getInvocationHandler(obj)) instanceof AnnotationFactory ) {
AnnotationFactory other = (AnnotationFactory) handler;
if (elements.length != other.elements.length) {
@@ -207,7 +207,7 @@
return true;
} else {
// encountered foreign annotation implementaton
- // so have to obtain element values via invocation
+ // so have to obtain element values via invocation
// of corresponding methods
for (final AnnotationMember el : elements) {
if (el.tag == ERROR) {
@@ -227,7 +227,7 @@
}
Object otherValue = el.definingMethod.invoke(obj);
if (otherValue != null ) {
- if (el.tag == ARRAY) {
+ if (el.tag == ARRAY) {
if (!el.equalArrayValue(otherValue)) {
return false;
}
@@ -248,8 +248,8 @@
}
/**
- * Returns a hash code composed as a sum of hash codes of member elements,
- * including elements with default values.
+ * Returns a hash code composed as a sum of hash codes of member elements,
+ * including elements with default values.
* @see android.lang.annotation.AnnotationMember#hashCode()
*/
public int hashCode() {
@@ -269,20 +269,20 @@
String res = "@" + klazz.getName() + "(";
for(int i = 0; i < elements.length; i++) {
if ( i != 0 ) {
- res += ", ";
+ res += ", ";
}
res += elements[i].toString();;
}
return res + ")";
}
-
+
/**
* Processes a method invocation request to this annotation instance.
- * Recognizes the methods declared in the
+ * Recognizes the methods declared in the
* {@link java.lang.annotation.Annotation java.lang.annotation.Annotation}
* interface, and member-defining methods of the implemented annotation type.
* @throws IllegalArgumentException If the specified method is none of the above
- * @return the invocation result
+ * @return the invocation result
*/
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
@@ -296,14 +296,14 @@
} else if ("hashCode".equals(name)) {
return hashCode();
}
-
+
// this must be element value request
AnnotationMember element = null;
for (AnnotationMember el : elements) {
if (name.equals(el.name)) {
element = el;
break;
- }
+ }
}
if (element == null || !method.equals(element.definingMethod)) {
throw new IllegalArgumentException(method.toString());
diff --git a/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationMember.java b/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationMember.java
index f8dea31..f64332a 100644
--- a/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationMember.java
+++ b/luni/src/main/java/org/apache/harmony/lang/annotation/AnnotationMember.java
@@ -28,31 +28,31 @@
import java.util.Arrays;
/**
- * This class represents member element of an annotation.
+ * This class represents member element of an annotation.
* It consists of name and value, supplemented with element
- * definition information (such as declared type of element).
+ * definition information (such as declared type of element).
* <br>The value may be one of the following types:
* <ul>
* <li> boxed primitive
* <li> Class
* <li> enum constant
* <li> annotation (nested)
- * <li> one-dimensional array of the above
- * <li> Throwable
+ * <li> one-dimensional array of the above
+ * <li> Throwable
* </ul>
* The last type is specific for this implementation; a Throwable value
* means that the error occured during parsing or resolution of corresponding
* class-data structures and throwing is delayed until the element
- * is requested for value.
- *
+ * is requested for value.
+ *
* @see android.lang.annotation.AnnotationFactory
- *
+ *
* @author Alexey V. Varlamov, Serguei S. Zapreyev
* @version $Revision$
*/
@SuppressWarnings({"serial"})
public class AnnotationMember implements Serializable {
-
+
/**
* Tag description of a Throwable value type.
*/
@@ -62,12 +62,12 @@
* Tag description of an array value type.
*/
protected static final char ARRAY = '[';
-
+
/**
* Tag description of all value types except arrays and Throwables.
*/
protected static final char OTHER = '*';
-
+
// public static final char INT = 'I';
// public static final char CHAR = 'C';
// public static final char DOUBLE = 'D';
@@ -81,7 +81,7 @@
// public static final char ANTN = '@';
private enum DefaultValues {NO_VALUE}
-
+
/**
* Singleton representing missing element value.
*/
@@ -89,20 +89,20 @@
protected final String name;
protected final Object value; // a primitive value is wrapped to the corresponding wrapper class
- protected final char tag;
+ protected final char tag;
// no sense to serialize definition info as it can be changed arbitrarily
- protected transient Class<?> elementType;
+ protected transient Class<?> elementType;
protected transient Method definingMethod;
-
-
+
+
/**
* Creates a new element with specified name and value.
- * Definition info will be provided later when this
+ * Definition info will be provided later when this
* element becomes actual annotation member.
* @param name element name, must not be null
- * @param val element value, should be of addmissible type,
+ * @param val element value, should be of addmissible type,
* as specified in the description of this class
- *
+ *
* @see #setDefinition(AnnotationMember)
*/
public AnnotationMember(String name, Object val) {
@@ -116,21 +116,21 @@
tag = OTHER;
}
}
-
+
/**
* Creates the completely defined element.
* @param name element name, must not be null
- * @param value element value, should be of addmissible type,
+ * @param value element value, should be of addmissible type,
* as specified in the description of this class
* @param m element-defining method, reflected on the annotation type
- * @param type declared type of this element
+ * @param type declared type of this element
* (return type of the defining method)
*/
public AnnotationMember(String name, Object val, Class type, Method m) {
this(name, val);
-
+
definingMethod = m;
-
+
if (type == int.class) {
elementType = Integer.class;
} else if (type == boolean.class) {
@@ -151,7 +151,7 @@
elementType = type;
}
}
-
+
/**
* Fills in element's definition info and returns this.
*/
@@ -160,9 +160,9 @@
elementType = copy.elementType;
return this;
}
-
+
/**
- * Returns readable description of this annotation value.
+ * Returns readable description of this annotation value.
*/
public String toString() {
if (tag == ARRAY) {
@@ -178,20 +178,20 @@
return name+ "=" +value;
}
}
-
+
/**
* Returns true if the specified object represents equal element
- * (equivalent name-value pair).
- * <br> A special case is the contained Throwable value; it is considered
+ * (equivalent name-value pair).
+ * <br> A special case is the contained Throwable value; it is considered
* transcendent so no other element would be equal.
* @return true if passed object is equivalent element representation,
- * false otherwise
+ * false otherwise
* @see #equalArrayValue(Object)
* @see java.lang.annotation.Annotation#equals(Object)
*/
public boolean equals(Object obj) {
if (obj == this) {
- // not a mere optimization,
+ // not a mere optimization,
// this is needed for consistency with hashCode()
return true;
}
@@ -210,11 +210,11 @@
}
return false;
}
-
+
/**
* Returns true if the contained value and a passed object are equal arrays,
- * false otherwise. Appropriate overloaded method of Arrays.equals()
- * is used for equality testing.
+ * false otherwise. Appropriate overloaded method of Arrays.equals()
+ * is used for equality testing.
* @see java.util.Arrays#equals(java.lang.Object[], java.lang.Object[])
* @return true if the value is array and is equal to specified object,
* false otherwise
@@ -246,7 +246,7 @@
}
return false;
}
-
+
/**
* Computes hash code of this element. The formula is as follows:
* <code> (name.hashCode() * 127) ^ value.hashCode() </code>
@@ -282,7 +282,7 @@
return hash ^ value.hashCode();
}
}
-
+
/**
* Throws contained error (if any) with a renewed stack trace.
*/
@@ -291,8 +291,8 @@
// need to throw cloned exception for thread safety
// besides it is better to provide actual stack trace
// rather than recorded during parsing
-
- // first check for expected types
+
+ // first check for expected types
if (value instanceof TypeNotPresentException) {
TypeNotPresentException tnpe = (TypeNotPresentException)value;
throw new TypeNotPresentException(tnpe.typeName(), tnpe.getCause());
@@ -318,20 +318,20 @@
ObjectInputStream ois = new ObjectInputStream(bis);
error = (Throwable)ois.readObject();
ois.close();
-
+
throw error;
}
}
-
+
/**
* Validates contained value against its member definition
* and if ok returns the value.
- * Otherwise, if the value type mismatches definition
- * or the value itself describes an error,
+ * Otherwise, if the value type mismatches definition
+ * or the value itself describes an error,
* throws appropriate exception.
- * <br> Note, this method may return null if this element was constructed
- * with such value.
- *
+ * <br> Note, this method may return null if this element was constructed
+ * with such value.
+ *
* @see #rethrowError()
* @see #copyValue()
* @return actual valid value or null if no value
@@ -339,23 +339,23 @@
public Object validateValue() throws Throwable {
if (tag == ERROR) {
rethrowError();
- }
+ }
if (value == NO_VALUE) {
return null;
}
- if (elementType == value.getClass()
+ if (elementType == value.getClass()
|| elementType.isInstance(value)) { // nested annotation value
return copyValue();
} else {
- throw new AnnotationTypeMismatchException(definingMethod,
+ throw new AnnotationTypeMismatchException(definingMethod,
value.getClass().getName());
}
- }
+ }
-
+
/**
- * Provides mutation-safe access to contained value. That is, caller is free
+ * Provides mutation-safe access to contained value. That is, caller is free
* to modify the returned value, it will not affect the contained data value.
* @return cloned value if it is mutable or the original immutable value
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java
index 0aed57e..ea320ef 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/MimeTable.java
@@ -29,13 +29,13 @@
/**
* Instances of this class map file extensions to MIME content types based on a
* default MIME table.
- *
+ *
* The default values can be overridden by modifying the contents of the file
* "content-types.properties".
*/
public class MimeTable implements FileNameMap {
- public static final String UNKNOWN = "content/unknown";
+ public static final String UNKNOWN = "content/unknown";
/**
* A hash table containing the mapping between extensions and mime types.
@@ -44,15 +44,15 @@
// Default mapping.
static {
- types.setProperty("text", "text/plain");
- types.setProperty("txt", "text/plain");
- types.setProperty("htm", "text/html");
- types.setProperty("html", "text/html");
+ types.setProperty("text", "text/plain");
+ types.setProperty("txt", "text/plain");
+ types.setProperty("htm", "text/html");
+ types.setProperty("html", "text/html");
}
/**
* Constructs a MIME table using the default values defined in this class.
- *
+ *
* It then augments this table by reading pairs of extensions and
* corresponding content types from the file "content-types.properties",
* which is represented in standard java.util.Properties.load(...) format.
@@ -81,15 +81,15 @@
/**
* Answer an InputStream over an external properties file containing the
* MIME types.
- *
+ *
* Looks in the location specified in the user property, and then in the
* expected location.
- *
+ *
* @return the InputStream, or null if none.
*/
private InputStream getContentTypes() {
// User override?
- String userTable = System.getProperty("content.types.user.table");
+ String userTable = System.getProperty("content.types.user.table");
if (userTable != null) {
try {
return new FileInputStream(userTable);
@@ -99,9 +99,9 @@
}
// Standard location?
- String javahome = System.getProperty("java.home");
- File contentFile = new File(javahome, "lib"
- + File.separator + "content-types.properties");
+ String javahome = System.getProperty("java.home");
+ File contentFile = new File(javahome, "lib"
+ + File.separator + "content-types.properties");
try {
return new FileInputStream(contentFile);
} catch (IOException e) {
@@ -113,24 +113,24 @@
/**
* Determines the MIME type for the given filename.
- *
+ *
* @param filename
* The file whose extension will be mapped.
- *
+ *
* @return The mime type associated with the file's extension or null if no
* mapping is known.
*/
public String getContentTypeFor(String filename) {
- if (filename.endsWith("/")) {
+ if (filename.endsWith("/")) {
// a directory, return html
- return (String) types.get("html");
+ return (String) types.get("html");
}
int lastCharInExtension = filename.lastIndexOf('#');
if (lastCharInExtension < 0) {
lastCharInExtension = filename.length();
}
int firstCharInExtension = filename.lastIndexOf('.') + 1;
- String ext = "";
+ String ext = "";
if (firstCharInExtension > filename.lastIndexOf('/')) {
ext = filename.substring(firstCharInExtension, lastCharInExtension);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
index 915bc9c..1247e07 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/FileURLConnection.java
@@ -60,7 +60,7 @@
super(url);
fileName = url.getFile();
if (fileName == null) {
- fileName = "";
+ fileName = "";
}
fileName = Util.decode(fileName, false);
}
@@ -69,7 +69,7 @@
* This methods will attempt to obtain the input stream of the file pointed
* by this <code>URL</code>. If the file is a directory, it will return
* that directory listing as an input stream.
- *
+ *
* @throws IOException
* if an IO error occurs while connecting
*/
@@ -89,9 +89,9 @@
/**
* Returns the length of the file in bytes.
- *
+ *
* @return the length of the file
- *
+ *
* @see #getContentType()
*/
@Override
@@ -109,7 +109,7 @@
/**
* Returns the content type of the resource. Just takes a guess based on the
* name.
- *
+ *
* @return the content type
*/
@Override
@@ -122,7 +122,7 @@
return MimeTable.UNKNOWN;
}
if (isDir) {
- return "text/plain";
+ return "text/plain";
}
String result = guessContentTypeFromName(url.getFile());
if (result != null) {
@@ -143,20 +143,20 @@
/**
* Returns the directory listing of the file component as an input stream.
- *
+ *
* @return the input stream of the directory listing
*/
private InputStream getDirectoryListing(File f) {
String fileList[] = f.list();
ByteArrayOutputStream bytes = new java.io.ByteArrayOutputStream();
PrintStream out = new PrintStream(bytes);
- out.print("<title>Directory Listing</title>\n");
- out.print("<base href=\"file:");
- out.print(f.getPath().replace('\\', '/') + "/\"><h1>" + f.getPath()
- + "</h1>\n<hr>\n");
+ out.print("<title>Directory Listing</title>\n");
+ out.print("<base href=\"file:");
+ out.print(f.getPath().replace('\\', '/') + "/\"><h1>" + f.getPath()
+ + "</h1>\n<hr>\n");
int i;
for (i = 0; i < fileList.length; i++) {
- out.print(fileList[i] + "<br>\n");
+ out.print(fileList[i] + "<br>\n");
}
out.close();
return new ByteArrayInputStream(bytes.toByteArray());
@@ -165,14 +165,14 @@
/**
* Returns the input stream of the object referred to by this
* <code>URLConnection</code>
- *
+ *
* File Sample : "/ZIP211/+/harmony/tools/javac/resources/javac.properties"
* Invalid File Sample:
* "/ZIP/+/harmony/tools/javac/resources/javac.properties"
* "ZIP211/+/harmony/tools/javac/resources/javac.properties"
- *
+ *
* @return input stream of the object
- *
+ *
* @throws IOException
* if an IO error occurs
*/
@@ -188,9 +188,9 @@
* Returns the permission, in this case the subclass, FilePermission object
* which represents the permission necessary for this URLConnection to
* establish the connection.
- *
+ *
* @return the permission required for this URLConnection.
- *
+ *
* @throws IOException
* if an IO exception occurs while creating the permission.
*/
@@ -201,7 +201,7 @@
if (File.separatorChar != '/') {
path = path.replace('/', File.separatorChar);
}
- permission = new FilePermission(path, "read");
+ permission = new FilePermission(path, "read");
}
return permission;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
index 6c7632c..722bdba 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
@@ -34,11 +34,11 @@
/**
* Returns a connection to the a file pointed by this <code>URL</code> in
* the file system
- *
+ *
* @return A connection to the resource pointed by this url.
* @param url
* URL The URL to which the connection is pointing to
- *
+ *
*/
@Override
public URLConnection openConnection(URL url) throws IOException {
@@ -48,13 +48,13 @@
/**
* The behaviour of this method is the same as openConnection(URL).
* <code>proxy</code> is not used in FileURLConnection.
- *
+ *
* @param url
* the URL which the connection is pointing to
* @param proxy
* Proxy
* @return a connection to the resource pointed by this url.
- *
+ *
* @throws IOException
* if this handler fails to establish a connection.
* @throws IllegalArgumentException
@@ -67,17 +67,17 @@
throws IOException {
if (null == url) {
// K034b=url and proxy can not be null
- throw new IllegalArgumentException(Msg.getString("K034b"));
+ throw new IllegalArgumentException(Msg.getString("K034b"));
}
String host = url.getHost();
if (host == null || host.length() == 0
- || host.equalsIgnoreCase("localhost")) {
+ || host.equalsIgnoreCase("localhost")) {
return new FileURLConnection(url);
}
// If a hostname is specified try to get the resource using FTP
- URL ftpURL = new URL("ftp", host, url.getFile());
+ URL ftpURL = new URL("ftp", host, url.getFile());
return (proxy == null) ? ftpURL.openConnection() : ftpURL
.openConnection(proxy);
}
@@ -86,7 +86,7 @@
* Parse the <code>string</code>str into <code>URL</code> u which
* already have the context properties. The string generally have the
* following format: <code><center>/c:/windows/win.ini</center></code>.
- *
+ *
* @param u
* The URL object that's parsed into
* @param str
@@ -95,7 +95,7 @@
* The index in the spec string from which to begin parsing
* @param end
* The index to stop parsing
- *
+ *
* @see java.net.URLStreamHandler#toExternalForm(URL)
* @see java.net.URL
*/
@@ -104,7 +104,7 @@
if (end < start) {
return;
}
- String parseString = "";
+ String parseString = "";
if (start < end) {
parseString = str.substring(start, end).replace('\\', '/');
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
index 39e0fa2..be64c20 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
@@ -87,9 +87,9 @@
private int dataPort;
- private String username = "anonymous";
+ private String username = "anonymous";
- private String password = "";
+ private String password = "";
private String replyCode;
@@ -103,7 +103,7 @@
/**
* FtpURLConnection constructor comment.
- *
+ *
* @param url
*/
protected FtpURLConnection(URL url) {
@@ -129,7 +129,7 @@
/**
* FtpURLConnection constructor.
- *
+ *
* @param url
* @param proxy
*/
@@ -146,14 +146,14 @@
if (idx > 0) {
String dir = url.getFile().substring(0, idx);
- write("CWD " + dir + "\r\n");
+ write("CWD " + dir + "\r\n");
int reply = getReply();
if (reply != FTP_FILEOK && dir.length() > 0 && dir.charAt(0) == '/') {
- write("CWD " + dir.substring(1) + "\r\n");
+ write("CWD " + dir.substring(1) + "\r\n");
reply = getReply();
}
if (reply != FTP_FILEOK) {
- throw new IOException(Msg.getString("K0094"));
+ throw new IOException(Msg.getString("K0094"));
}
}
}
@@ -161,7 +161,7 @@
/**
* Establishes the connection to the resource specified by this
* <code>URL</code>
- *
+ *
* @see #connected
* @see java.io.IOException
* @see URLStreamHandler
@@ -184,7 +184,7 @@
ProxySelector selector = ProxySelector.getDefault();
Iterator<Proxy> iter = proxyList.iterator();
boolean connectOK = false;
- String failureReason = "";
+ String failureReason = "";
while (iter.hasNext() && !connectOK) {
currentProxy = iter.next();
try {
@@ -201,7 +201,7 @@
}
if (!connectOK) {
// K0097=Unable to connect to server\: {0}
- throw new IOException(Msg.getString("K0097", failureReason));
+ throw new IOException(Msg.getString("K0097", failureReason));
}
}
}
@@ -247,7 +247,7 @@
dataSocket.setSoTimeout(getReadTimeout());
acceptSocket.close();
} catch (InterruptedIOException e) {
- throw new IOException(Msg.getString("K0095"));
+ throw new IOException(Msg.getString("K0095"));
}
if (getDoInput()) {
inputStream = new FtpURLInputStream(
@@ -271,29 +271,29 @@
private void getFile() throws IOException {
int reply;
String file = url.getFile();
- write("RETR " + file + "\r\n");
+ write("RETR " + file + "\r\n");
reply = getReply();
if (reply == FTP_NOTFOUND && file.length() > 0 && file.charAt(0) == '/') {
- write("RETR " + file.substring(1) + "\r\n");
+ write("RETR " + file.substring(1) + "\r\n");
reply = getReply();
}
if (!(reply == FTP_OPENDATA || reply == FTP_TRANSFEROK)) {
- throw new FileNotFoundException(Msg.getString("K0096", reply));
+ throw new FileNotFoundException(Msg.getString("K0096", reply));
}
}
/**
* Creates a input stream for writing to this URL Connection.
- *
+ *
* @return The input stream to write to
* @throws IOException
* Cannot read from URL or error creating InputStream
- *
+ *
* @see #getContent()
* @see #getOutputStream()
* @see java.io.InputStream
* @see java.io.IOException
- *
+ *
*/
@Override
public InputStream getInputStream() throws IOException {
@@ -307,7 +307,7 @@
* Returns the permission object (in this case, SocketPermission) with the
* host and the port number as the target name and "resolve, connect" as the
* action list.
- *
+ *
* @return the permission object required for this connection
* @throws IOException
* thrown when an IO exception occurs during the creation of the
@@ -319,20 +319,20 @@
if (port <= 0) {
port = FTP_PORT;
}
- return new SocketPermission(hostName + ":" + port, "connect, resolve");
+ return new SocketPermission(hostName + ":" + port, "connect, resolve");
}
/**
* Creates a output stream for writing to this URL Connection.
- *
+ *
* @return The output stream to write to
* @throws IOException
* when the OutputStream could not be created
- *
+ *
* @see #getContent()
* @see #getInputStream()
* @see java.io.IOException
- *
+ *
*/
@Override
public OutputStream getOutputStream() throws IOException {
@@ -351,8 +351,8 @@
}
code[i] = (byte) tmp;
}
- replyCode = new String(code, "ISO8859_1");
-
+ replyCode = new String(code, "ISO8859_1");
+
boolean multiline = false;
if (ctrlInput.read() == '-') {
multiline = true;
@@ -362,7 +362,7 @@
while (readMultiLine()) {/* Read all of a multiline reply */
}
}
-
+
try {
return Integer.parseInt(replyCode);
} catch (NumberFormatException e) {
@@ -375,31 +375,31 @@
reply = getReply();
if (reply == FTP_USERREADY) {
} else {
- throw new IOException(Msg.getString("K0097", url.getHost()));
+ throw new IOException(Msg.getString("K0097", url.getHost()));
}
- write("USER " + username + "\r\n");
+ write("USER " + username + "\r\n");
reply = getReply();
if (reply == FTP_PASWD || reply == FTP_LOGGEDIN) {
} else {
- throw new IOException(Msg.getString("K0098", url.getHost()));
+ throw new IOException(Msg.getString("K0098", url.getHost()));
}
if (reply == FTP_PASWD) {
- write("PASS " + password + "\r\n");
+ write("PASS " + password + "\r\n");
reply = getReply();
if (!(reply == FTP_OK || reply == FTP_USERREADY || reply == FTP_LOGGEDIN)) {
- throw new IOException(Msg.getString("K0098", url.getHost()));
+ throw new IOException(Msg.getString("K0098", url.getHost()));
}
}
}
private void port() throws IOException {
- write("PORT "
+ write("PORT "
+ controlSocket.getLocalAddress().getHostAddress().replace('.',
',') + ',' + (dataPort >> 8) + ','
+ (dataPort & 255)
- + "\r\n");
+ + "\r\n");
if (getReply() != FTP_OK) {
- throw new IOException(Msg.getString("K0099"));
+ throw new IOException(Msg.getString("K0099"));
}
}
@@ -432,12 +432,12 @@
*/
private void sendFile() throws IOException {
int reply;
- write("STOR "
+ write("STOR "
+ url.getFile().substring(url.getFile().lastIndexOf('/') + 1,
- url.getFile().length()) + "\r\n");
+ url.getFile().length()) + "\r\n");
reply = getReply();
if (!(reply == FTP_OPENDATA || reply == FTP_OK || reply == FTP_DATAOPEN)) {
- throw new IOException(Msg.getString("K009a"));
+ throw new IOException(Msg.getString("K009a"));
}
}
@@ -445,11 +445,11 @@
* Set the flag if this <code>URLConnection</code> supports input (read).
* It cannot be set after the connection is made. FtpURLConnections cannot
* support both input and output
- *
+ *
* @param newValue *
* @throws IllegalAccessError
* when this method attempts to change the flag after connected
- *
+ *
* @see #doInput
* @see #getDoInput()
* @see java.lang.IllegalAccessError
@@ -468,12 +468,12 @@
* Set the flag if this <code>URLConnection</code> supports output(read).
* It cannot be set after the connection is made.\ FtpURLConnections cannot
* support both input and output.
- *
+ *
* @param newValue
- *
+ *
* @throws IllegalAccessError
* when this method attempts to change the flag after connected
- *
+ *
* @see #doOutput
* @see java.lang.IllegalAccessError
* @see #setDoOutput(boolean)
@@ -491,13 +491,13 @@
* Set the type of the file transfer. Only Image is supported
*/
private void setType() throws IOException {
- write("TYPE I\r\n");
+ write("TYPE I\r\n");
if (getReply() != FTP_OK) {
- throw new IOException(Msg.getString("K009b"));
+ throw new IOException(Msg.getString("K009b"));
}
}
private void write(String command) throws IOException {
- ctrlOutput.write(command.getBytes("ISO8859_1"));
+ ctrlOutput.write(command.getBytes("ISO8859_1"));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
index 0ad7425..30ff664 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
@@ -39,13 +39,13 @@
* to the FTP server specified by this <code>URL</code>. If
* <code>proxy</code> is DIRECT type, the connection is made in normal
* way.
- *
+ *
* @param u
* the URL which the connection is pointing to
* @param proxy
* the proxy which is used to make the connection
* @return a connection to the resource pointed by this url.
- *
+ *
* @throws IOException
* if this handler fails to establish a connection.
* @throws IllegalArgumentException
@@ -57,7 +57,7 @@
protected URLConnection openConnection(URL u, Proxy proxy)
throws IOException {
if (null == u || null == proxy) {
- throw new IllegalArgumentException(Msg.getString("K034b"));
+ throw new IllegalArgumentException(Msg.getString("K034b"));
}
return new FtpURLConnection(u, proxy);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
index af906ec..f61eb28 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
@@ -34,11 +34,11 @@
/**
* Returns a connection to the HTTP server specified by this
* <code>URL</code>.
- *
+ *
* @param u
* the URL to which the connection is pointing to
* @return a connection to the resource pointed by this url.
- *
+ *
* @throws IOException
* if this handler fails to establish a connection
*/
@@ -52,13 +52,13 @@
* to the HTTP server specified by this <code>URL</code>. If the
* <code>proxy</code> is DIRECT type, the connection is made in normal
* way.
- *
+ *
* @param u
* the URL which the connection is pointing to
* @param proxy
* the proxy which is used to make the connection
* @return a connection to the resource pointed by this url.
- *
+ *
* @throws IOException
* if this handler fails to establish a connection.
* @throws IllegalArgumentException
@@ -70,7 +70,7 @@
protected URLConnection openConnection(URL u, Proxy proxy)
throws IOException {
if (null == u || null == proxy) {
- throw new IllegalArgumentException(Msg.getString("K034b"));
+ throw new IllegalArgumentException(Msg.getString("K034b"));
}
return new HttpURLConnectionImpl(u, getDefaultPort(), proxy);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
index 2c4aaf7..38d65ed 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Header.java
@@ -52,7 +52,7 @@
/**
* The alternative constructor which sets the input map as its initial
* keyTable.
- *
+ *
* @param map
* the initial keyTable as a map
*/
@@ -93,7 +93,7 @@
/**
* Add a field with the specified value.
- *
+ *
* @param key
* @param value
*/
@@ -209,7 +209,7 @@
/**
* Sets the status line in the header request example: GET / HTTP/1.1
* response example: HTTP/1.1 200 OK
- *
+ *
* @param statusLine
*/
public void setStatusLine(String statusLine) {
@@ -228,7 +228,7 @@
/**
* Gets the status line in the header request example: GET / HTTP/1.1
* response example: HTTP/1.1 200 OK
- *
+ *
* @return the status line
*/
public String getStatusLine() {
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
index 2465de1..9dc9c7a 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConfiguration.java
@@ -27,9 +27,9 @@
* An <code>HttpConfiguration</code> contains all the details needed to create an http connection
* and to compare whether or not two connections are the same. An HttpConfiguration
* will either consist of a <code>Proxy<code> or a port number (<code>int</code>)
- * and host name (<code>String</code>) or all three, depending on whether or not a
+ * and host name (<code>String</code>) or all three, depending on whether or not a
* <code>Proxy</code> is used and the type of <code>Proxy</code> it is.
- *
+ *
* <code>HttpConfiguration</code> is used as a key by <code>HttpConnectionPool</code>
* to retrieve <code>HttpConnection</code>s from its connection pool.
*/
@@ -45,7 +45,7 @@
this.hostName = uri.getHost();
this.hostPort = uri.getPort();
if(hostPort == -1) {
- if(uri.getScheme().equals("https")) {
+ if(uri.getScheme().equals("https")) {
hostPort = 443;
} else {
hostPort = 80;
@@ -60,7 +60,7 @@
SocketAddress proxyAddr = proxy.address();
if (!(proxyAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", proxyAddr.getClass()));
+ "K0316", proxyAddr.getClass()));
}
InetSocketAddress iProxyAddr = (InetSocketAddress) proxyAddr;
this.hostName = iProxyAddr.getHostName();
@@ -70,7 +70,7 @@
this.hostName = uri.getHost();
this.hostPort = uri.getPort();
if(hostPort == -1) {
- if(uri.getScheme().equals("https")) {
+ if(uri.getScheme().equals("https")) {
hostPort = 443;
} else {
hostPort = 80;
@@ -81,7 +81,7 @@
SocketAddress proxyAddr = proxy.address();
if (!(proxyAddr instanceof InetSocketAddress)) {
throw new IllegalArgumentException(Msg.getString(
- "K0316", proxyAddr.getClass()));
+ "K0316", proxyAddr.getClass()));
}
InetSocketAddress iProxyAddr = (InetSocketAddress) proxyAddr;
this.hostName = iProxyAddr.getHostName();
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
index 2ef1a9b..6adbe1a 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpConnection.java
@@ -153,7 +153,7 @@
public HttpConfiguration getHttpConfiguration() {
return config;
}
-
+
public SSLSocket getSecureSocket(SSLSocketFactory sslSocketFactory, HostnameVerifier hostnameVerifier) throws IOException {
if (!usingSecureSocket) {
String hostName = config.getHostName();
@@ -171,7 +171,7 @@
Socket getSocket() {
return socket;
}
-
+
/*
* This method has been copied from the Apache Jakarta Commons HttpClient project
* http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/HttpClient/src/java/org/apache/commons/httpclient/HttpConnection.java r480424
@@ -231,13 +231,13 @@
|| socket.isOutputShutdown());
}
// END android-added
-
+
/*
* This field has been copied from the Apache Jakarta Commons HttpClient project
* http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/HttpClient/src/java/org/apache/commons/httpclient/HttpConnection.java r480424
*/
static private final Class SOCKET_TIMEOUT_CLASS = SocketTimeoutExceptionClass();
-
+
/*
* This method has been copied from the Apache Jakarta Commons HttpClient project
* http://svn.apache.org/repos/asf/jakarta/commons/proper/httpclient/trunk/HttpClient/src/java/org/apache/commons/httpclient/HttpConnection.java r480424
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
index 023e287..9d2c06f 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
@@ -40,7 +40,7 @@
throws IOException {
if ((url == null) || (proxy == null)) {
// K034b=url and proxy can not be null
- throw new IllegalArgumentException(Msg.getString("K034b"));
+ throw new IllegalArgumentException(Msg.getString("K034b"));
}
return new HttpsURLConnectionImpl(url, getDefaultPort(), proxy);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
index 1b29902..a1a6b4e 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/HttpsURLConnectionImpl.java
@@ -52,13 +52,13 @@
super(url);
httpsEngine = new HttpsEngine(url, port, proxy);
}
-
+
private void checkConnected() {
if (sslSocket == null) {
throw new IllegalStateException("Connection has not yet been established");
}
}
-
+
@Override
public String getCipherSuite() {
checkConnected();
@@ -365,7 +365,7 @@
// keep request method
String save_meth = method;
// make SSL Tunnel
- method = "CONNECT";
+ method = "CONNECT";
try {
doRequest();
endRequest();
@@ -399,13 +399,13 @@
if (makingSSLTunnel) {
// we are making the SSL Tunneling, return remotehost:port
int port = url.getPort();
- return (port > 0) ? url.getHost() + ":" + port
+ return (port > 0) ? url.getHost() + ":" + port
: url.getHost();
}
// we has made SSL Tunneling, return /requested.data
String file = url.getFile();
if (file == null || file.length() == 0) {
- file = "/";
+ file = "/";
}
return file;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
index 02fa246..cb8647c 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
@@ -30,12 +30,12 @@
/**
* Returns a connection to the jar file pointed by this <code>URL</code>
* in the file system
- *
+ *
* @return java.net.URLConnection A connection to the resource pointed by
* this url.
* @param u
* java.net.URL The URL to which the connection is pointing to
- *
+ *
* @throws IOException
* thrown if an IO error occurs when this method tries to
* establish connection.
@@ -46,7 +46,7 @@
}
/**
- *
+ *
* @param url
* URL the context URL
* @param spec
@@ -60,15 +60,15 @@
protected void parseURL(URL url, String spec, int start, int limit) {
String file = url.getFile();
if (file == null) {
- file = "";
+ file = "";
}
if (limit > start) {
spec = spec.substring(start, limit);
} else {
- spec = "";
+ spec = "";
}
- if (spec.indexOf("!/") == -1 && (file.indexOf("!/") == -1)) {
- throw new NullPointerException(Msg.getString("K01b6"));
+ if (spec.indexOf("!/") == -1 && (file.indexOf("!/") == -1)) {
+ throw new NullPointerException(Msg.getString("K01b6"));
}
if (file.equals("")) {
file = spec;
@@ -87,12 +87,12 @@
} catch (MalformedURLException e) {
throw new NullPointerException(e.toString());
}
- setURL(url, "jar", "", -1, null, null, file, null, null);
+ setURL(url, "jar", "", -1, null, null, file, null, null);
}
/**
* Build and return the externalized string representation of url.
- *
+ *
* @return String the externalized string representation of url
* @param url
* a URL
@@ -100,7 +100,7 @@
@Override
protected String toExternalForm(URL url) {
StringBuilder sb = new StringBuilder();
- sb.append("jar:");
+ sb.append("jar:");
sb.append(url.getFile());
String ref = url.getRef();
if (ref != null) {
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
index 19a3b36..b70d817 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
@@ -92,7 +92,7 @@
/**
* Returns the Jar file referred by this {@code URLConnection}.
- *
+ *
* @return the JAR file referenced by this connection
*
* @throws IOException
@@ -107,7 +107,7 @@
/**
* Returns the Jar file referred by this {@code URLConnection}
- *
+ *
* @throws IOException
* if an IO error occurs while connecting to the resource.
*/
@@ -191,9 +191,9 @@
/**
* Returns the JarEntry of the entry referenced by this {@code
* URLConnection}.
- *
+ *
* @return the JarEntry referenced
- *
+ *
* @throws IOException
* if an IO error occurs while getting the entry
*/
@@ -230,7 +230,7 @@
public InputStream getInputStream() throws IOException {
if (closed) {
// KA027=Inputstream of the JarURLConnection has been closed
- throw new IllegalStateException(Msg.getString("KA027"));
+ throw new IllegalStateException(Msg.getString("KA027"));
}
connect();
if (jarInput != null) {
@@ -238,7 +238,7 @@
}
if (jarEntry == null) {
// K00fc=Jar entry not specified
- throw new IOException(Msg.getString("K00fc"));
+ throw new IOException(Msg.getString("K00fc"));
}
return jarInput = new JarURLConnectionInputStream(jarFile
.getInputStream(jarEntry), jarFile);
@@ -249,14 +249,14 @@
* "x-java/jar" should be returned, for jar entries the content type of the
* entry should be returned. Returns non-null results ("content/unknown" for
* unknown types).
- *
+ *
* @return the content type
*/
@Override
public String getContentType() {
- if (url.getFile().endsWith("!/")) {
+ if (url.getFile().endsWith("!/")) {
// the type for jar file itself is always "x-java/jar"
- return "x-java/jar";
+ return "x-java/jar";
}
String cType = null;
String entryName = getEntryName();
@@ -273,7 +273,7 @@
}
}
if (cType == null) {
- cType = "content/unknown";
+ cType = "content/unknown";
}
return cType;
}
@@ -305,12 +305,12 @@
* pointing to a Jar File (no Jar Entry), this method will return a {@code
* JarFile} If there is a Jar Entry, it will return the object corresponding
* to the Jar entry content type.
- *
+ *
* @return a non-null object
*
* @throws IOException
* if an IO error occurred
- *
+ *
* @see ContentHandler
* @see ContentHandlerFactory
* @see java.io.IOException
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/util/TimezoneGetter.java b/luni/src/main/java/org/apache/harmony/luni/internal/util/TimezoneGetter.java
index 9d751b2..a31ecc0 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/util/TimezoneGetter.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/util/TimezoneGetter.java
@@ -21,12 +21,12 @@
* access the current timezone.
*/
public abstract class TimezoneGetter {
-
+
private static TimezoneGetter instance;
/**
* Retrieves the singleton instance of this class.
- *
+ *
* @return TimezoneGetter the single instance of this class.
*/
public static TimezoneGetter getInstance() {
@@ -35,7 +35,7 @@
/**
* Sets the singleton instance of this class.
- *
+ *
* @param instance
* TimezoneGetter the single instance of this class.
*/
@@ -48,7 +48,7 @@
/**
* Retrieves the ID of the current time zone.
- *
+ *
* @return String the ID of the current time zone.
*/
public abstract String getId();
diff --git a/luni/src/main/java/org/apache/harmony/luni/internal/util/ZoneInfo.java b/luni/src/main/java/org/apache/harmony/luni/internal/util/ZoneInfo.java
index 6a6f39e..db1d136 100644
--- a/luni/src/main/java/org/apache/harmony/luni/internal/util/ZoneInfo.java
+++ b/luni/src/main/java/org/apache/harmony/luni/internal/util/ZoneInfo.java
@@ -45,14 +45,14 @@
{
return null;
}
-
+
try {
return ZoneInfoDB._getTimeZone(name);
} catch (IOException e) {
return null;
}
}
-
+
private static String nullName(byte[] data, int where, int off) {
if (off < 0)
return null;
@@ -219,14 +219,14 @@
private boolean mUseDst;
private String mDaylightName;
private String mStandardName;
-
+
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ZoneInfo)) {
- return false;
+ return false;
}
ZoneInfo other = (ZoneInfo) obj;
return mUseDst == other.mUseDst
@@ -241,7 +241,7 @@
&& Arrays.equals(mTypes, other.mTypes)
&& Arrays.equals(mTransitions, other.mTransitions);
}
-
+
@Override
public int hashCode() {
final int prime = 31;
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/GenericSignatureParser.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/GenericSignatureParser.java
index 2ea0b5a..1c7c0e0 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/GenericSignatureParser.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/GenericSignatureParser.java
@@ -27,23 +27,23 @@
* Implements a parser for the generics signature attribute.
* Uses a top-down, resursive descent parsing approach for the following grammar:
* <pre>
- * ClassSignature ::=
+ * ClassSignature ::=
* OptFormalTypeParams SuperclassSignature {SuperinterfaceSignature}.
* SuperclassSignature ::= ClassTypeSignature.
* SuperinterfaceSignature ::= ClassTypeSignature.
*
- * OptFormalTypeParams ::=
+ * OptFormalTypeParams ::=
* ["<" FormalTypeParameter {FormalTypeParameter} ">"].
*
* FormalTypeParameter ::= Ident ClassBound {InterfaceBound}.
* ClassBound ::= ":" [FieldTypeSignature].
* InterfaceBound ::= ":" FieldTypeSignature.
*
- * FieldTypeSignature ::=
+ * FieldTypeSignature ::=
* ClassTypeSignature | ArrayTypeSignature | TypeVariableSignature.
* ArrayTypeSignature ::= "[" TypSignature.
*
- * ClassTypeSignature ::=
+ * ClassTypeSignature ::=
* "L" {Ident "/"} Ident OptTypeArguments {"." Ident OptTypeArguments} ";".
*
* OptTypeArguments ::= "<" TypeArgument {TypeArgument} ">".
@@ -56,7 +56,7 @@
* TypSignature ::= FieldTypeSignature | BaseType.
* BaseType ::= "B" | "C" | "D" | "F" | "I" | "J" | "S" | "Z".
*
- * MethodTypeSignature ::=
+ * MethodTypeSignature ::=
* OptFormalTypeParams "(" {TypeSignature} ")" ReturnType {ThrowsSignature}.
* ThrowsSignature ::= ("^" ClassTypeSignature) | ("^" TypeVariableSignature).
*
@@ -74,7 +74,7 @@
public ListOfTypes interfaceTypes;
public Type superclassType;
public ClassLoader loader;
-
+
GenericDeclaration genericDecl;
/*
@@ -84,7 +84,7 @@
String identifier;
- /*
+ /*
* Scanner:
* eof is private to the scan methods
* and it's set only when a scan is issued at the end of the buffer.
@@ -113,11 +113,11 @@
/**
* Parses the generic signature of a class and creates the data structure
* representing the signature.
- *
+ *
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
- public void parseForClass(GenericDeclaration genericDecl,
+ public void parseForClass(GenericDeclaration genericDecl,
String signature) {
setInput(genericDecl, signature);
if (!eof) {
@@ -139,11 +139,11 @@
/**
* Parses the generic signature of a method and creates the data structure
* representing the signature.
- *
+ *
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
- public void parseForMethod(GenericDeclaration genericDecl,
+ public void parseForMethod(GenericDeclaration genericDecl,
String signature) {
setInput(genericDecl, signature);
if (!eof) {
@@ -163,15 +163,15 @@
}
}
}
-
+
/**
- * Parses the generic signature of a constructor and creates the data
+ * Parses the generic signature of a constructor and creates the data
* structure representing the signature.
- *
+ *
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
- public void parseForConstructor(GenericDeclaration genericDecl,
+ public void parseForConstructor(GenericDeclaration genericDecl,
String signature) {
setInput(genericDecl, signature);
if (!eof) {
@@ -191,13 +191,13 @@
}
/**
- * Parses the generic signature of a field and creates the data structure
+ * Parses the generic signature of a field and creates the data structure
* representing the signature.
- *
+ *
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
- public void parseForField(GenericDeclaration genericDecl,
+ public void parseForField(GenericDeclaration genericDecl,
String signature) {
setInput(genericDecl, signature);
if (!eof) {
@@ -211,7 +211,7 @@
//
void parseClassSignature() {
- // ClassSignature ::=
+ // ClassSignature ::=
// OptFormalTypeParameters SuperclassSignature {SuperinterfaceSignature}.
parseOptFormalTypeParameters();
@@ -227,7 +227,7 @@
}
void parseOptFormalTypeParameters() {
- // OptFormalTypeParameters ::=
+ // OptFormalTypeParameters ::=
// ["<" FormalTypeParameter {FormalTypeParameter} ">"].
ListOfVariables typeParams = new ListOfVariables();
@@ -267,7 +267,7 @@
}
Type parseFieldTypeSignature() {
- // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
+ // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
// | TypeVariableSignature.
switch (symbol) {
@@ -285,7 +285,7 @@
}
Type parseClassTypeSignature() {
- // ClassTypeSignature ::= "L" {Ident "/"} Ident
+ // ClassTypeSignature ::= "L" {Ident "/"} Ident
// OptTypeArguments {"." Ident OptTypeArguments} ";".
expect('L');
@@ -301,7 +301,7 @@
qualIdent.append(this.identifier);
ListOfTypes typeArgs = parseOptTypeArguments();
- ImplForType parentType =
+ ImplForType parentType =
new ImplForType(null, qualIdent.toString(), typeArgs, loader);
ImplForType type = parentType;
@@ -311,7 +311,7 @@
scanIdentifier();
qualIdent.append("$").append(identifier); // FIXME: is "$" correct?
typeArgs = parseOptTypeArguments();
- type = new ImplForType(parentType, qualIdent.toString(), typeArgs,
+ type = new ImplForType(parentType, qualIdent.toString(), typeArgs,
loader);
}
@@ -388,7 +388,7 @@
}
void parseMethodTypeSignature() {
- // MethodTypeSignature ::= [FormalTypeParameters]
+ // MethodTypeSignature ::= [FormalTypeParameters]
// "(" {TypeSignature} ")" ReturnType {ThrowsSignature}.
parseOptFormalTypeParameters();
@@ -462,7 +462,7 @@
}
// PRE: symbol is the first char of the identifier.
- // POST: symbol = the next symbol AFTER the identifier.
+ // POST: symbol = the next symbol AFTER the identifier.
void scanIdentifier() {
if (!eof) {
StringBuilder identBuf = new StringBuilder(32);
@@ -487,7 +487,7 @@
// Ident starts with incorrect char.
symbol = 0;
eof = true;
- throw new GenericSignatureFormatError();
+ throw new GenericSignatureFormatError();
}
} else {
throw new GenericSignatureFormatError();
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForArray.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForArray.java
index 9d0d940..c9b76b1 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForArray.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForArray.java
@@ -27,10 +27,10 @@
}
public Type getGenericComponentType() {
- try {
- return ((ImplForType)componentType).getResolvedType();
- } catch (ClassCastException e) {
- return componentType;
+ try {
+ return ((ImplForType)componentType).getResolvedType();
+ } catch (ClassCastException e) {
+ return componentType;
}
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForType.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForType.java
index 70f05b4..b1f05d4 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForType.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForType.java
@@ -28,7 +28,7 @@
private ClassLoader loader;
- public ImplForType(ImplForType ownerType, String rawTypeName,
+ public ImplForType(ImplForType ownerType, String rawTypeName,
ListOfTypes args, ClassLoader loader) {
this.ownerType0 = ownerType;
this.rawTypeName = rawTypeName;
@@ -55,7 +55,7 @@
public Class getRawType() {
if (rawType == null) {
- // Here the actual loading of the class has to be performed and the
+ // Here the actual loading of the class has to be performed and the
// Exceptions have to be re-thrown TypeNotPresent...
// How to deal with member (nested) classes?
try {
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForVariable.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForVariable.java
index 8e6144b..7a102fb 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForVariable.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForVariable.java
@@ -23,27 +23,27 @@
import java.lang.reflect.TypeVariable;
-public final class ImplForVariable<D extends GenericDeclaration>
+public final class ImplForVariable<D extends GenericDeclaration>
implements TypeVariable<D> {
private ImplForVariable<D> formalVar;
private final GenericDeclaration declOfVarUser;
private final String name;
private D genericDeclaration;
private ListOfTypes bounds;
-
-
+
+
@Override
public boolean equals(Object o) {
if(!(o instanceof TypeVariable)) {
return false;
}
TypeVariable<?> that = (TypeVariable<?>) o;
- return getName().equals(that.getName()) &&
- getGenericDeclaration().equals(that.getGenericDeclaration());
+ return getName().equals(that.getName()) &&
+ getGenericDeclaration().equals(that.getGenericDeclaration());
}
-
-
- @Override
+
+
+ @Override
public int hashCode() {
return 31 * getName().hashCode() + getGenericDeclaration().hashCode();
}
@@ -87,11 +87,11 @@
if (decl instanceof Class) {
// FIXME: Is the following hierarchy correct?:
Class cl = (Class)decl;
- decl = cl.getEnclosingMethod();
+ decl = cl.getEnclosingMethod();
if (decl != null) {
return decl;
}
- decl = cl.getEnclosingConstructor();
+ decl = cl.getEnclosingConstructor();
if (decl != null) {
return decl;
}
@@ -101,7 +101,7 @@
} else if (decl instanceof Constructor) {
return ((Constructor)decl).getDeclaringClass();
}
- throw new RuntimeException("unknown GenericDeclaration2: "
+ throw new RuntimeException("unknown GenericDeclaration2: "
+ decl.toString());
}
@@ -114,8 +114,8 @@
if (var != null) break;
else {
curLayer = nextLayer(curLayer);
- if (curLayer == null) break; // FIXME: SHOULD NEVER HAPPEN!
- // throw exception: illegal
+ if (curLayer == null) break; // FIXME: SHOULD NEVER HAPPEN!
+ // throw exception: illegal
// type variable reference.
}
} while (true);
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForWildcard.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForWildcard.java
index ee43370..d80b260 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForWildcard.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ImplForWildcard.java
@@ -30,32 +30,32 @@
this.superBound = superBound;
}
- public Type[] getLowerBounds() throws TypeNotPresentException,
+ public Type[] getLowerBounds() throws TypeNotPresentException,
MalformedParameterizedTypeException {
return superBound.getResolvedTypes().clone();
}
- public Type[] getUpperBounds() throws TypeNotPresentException,
+ public Type[] getUpperBounds() throws TypeNotPresentException,
MalformedParameterizedTypeException {
return extendsBound.getResolvedTypes().clone();
}
-
+
@Override
public boolean equals(Object o) {
if(!(o instanceof WildcardType)) {
return false;
}
WildcardType that = (WildcardType) o;
- return Arrays.equals(getLowerBounds(), that.getLowerBounds()) &&
+ return Arrays.equals(getLowerBounds(), that.getLowerBounds()) &&
Arrays.equals(getUpperBounds(), that.getUpperBounds());
}
-
+
@Override
public int hashCode() {
- return 31 * Arrays.hashCode(getLowerBounds()) +
+ return 31 * Arrays.hashCode(getLowerBounds()) +
Arrays.hashCode(getUpperBounds());
}
-
+
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
diff --git a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ListOfTypes.java b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ListOfTypes.java
index a3f0fe8..13ae54c 100644
--- a/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ListOfTypes.java
+++ b/luni/src/main/java/org/apache/harmony/luni/lang/reflect/ListOfTypes.java
@@ -64,10 +64,10 @@
resolvedTypes = new Type[list.size()];
int i = 0;
for (Type t : list) {
- try {
+ try {
resolvedTypes[i] = ((ImplForType)t).getResolvedType();
- } catch (ClassCastException e) {
- resolvedTypes[i] = t;
+ } catch (ClassCastException e) {
+ resolvedTypes[i] = t;
}
i++;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/GenericIPMreq.java b/luni/src/main/java/org/apache/harmony/luni/net/GenericIPMreq.java
index 8a0bd55..54a9ed8 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/GenericIPMreq.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/GenericIPMreq.java
@@ -62,9 +62,9 @@
/**
* This constructor is used to create an instance of the object
- *
+ *
* @param addr multicast address to join/leave
- *
+ *
*/
GenericIPMreq(InetAddress addr) {
multiaddr = addr;
@@ -75,7 +75,7 @@
/**
* This constructor is used to create an instance of the object
- *
+ *
* @param addr multicast address to join/leave
* @param netInterface the NetworkInterface object identifying the interface
* on which to join/leave
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/NetUtil.java b/luni/src/main/java/org/apache/harmony/luni/net/NetUtil.java
index 15b933b..bc337e2 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/NetUtil.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/NetUtil.java
@@ -28,7 +28,7 @@
/**
* Returns whether to use a SOCKS proxy.
- *
+ *
* @param proxy java.net.Proxy <code>proxy</code> is used to determine
* whether using SOCKS proxy.
* @return true if only the type of <code>proxy</code> is
@@ -43,7 +43,7 @@
/**
* Answer whether to prefer IPV6 address
- *
+ *
* @return boolean
*/
public static boolean preferIPv6Addresses() {
@@ -53,7 +53,7 @@
/**
* Answer whether to prefer IPV4 stack
- *
+ *
* @return boolean
*/
public static boolean preferIPv4Stack() {
@@ -63,7 +63,7 @@
/**
* Gets proxy list according to the URI by system ProxySelector.
- *
+ *
* @param uri
* @return a list of proxy for the URI. Returns null if no proxy is
* available.
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java b/luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java
index d5ce4e8..9ff831d 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/PlainDatagramSocketImpl.java
@@ -107,8 +107,8 @@
@Override
public void bind(int port, InetAddress addr) throws SocketException {
- String prop = AccessController.doPrivileged(new PriviAction<String>("bindToDevice"));
- boolean useBindToDevice = prop != null && prop.toLowerCase().equals("true");
+ String prop = AccessController.doPrivileged(new PriviAction<String>("bindToDevice"));
+ boolean useBindToDevice = prop != null && prop.toLowerCase().equals("true");
netImpl.bind(fd, addr, port);
if (0 != port) {
localPort = port;
@@ -249,7 +249,7 @@
/**
* Set the nominated socket option. As the timeouts are not set as options
* in the IP stack, the value is stored in an instance field.
- *
+ *
* @throws SocketException thrown if the option value is unsupported or
* invalid
*/
@@ -311,7 +311,7 @@
} catch (UnknownHostException e) {
// this is never expected to happen as we should not have gotten
// here if the address is not resolvable
- throw new SocketException(Msg.getString("K0317", inetAddr.getHostName()));
+ throw new SocketException(Msg.getString("K0317", inetAddr.getHostName()));
}
connectedPort = port;
isNativeConnected = true;
@@ -353,7 +353,7 @@
* Datagram socket is connected at the native level and the
* recvConnnectedDatagramImpl does not update the packet with address from
* which the packet was received
- *
+ *
* @param packet
* the packet to be updated
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java b/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
index 27d5709..e4a9419 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/PlainSocketImpl.java
@@ -119,7 +119,7 @@
// if newImpl is not an instance of PlainSocketImpl, use
// reflection to get/set protected fields.
if (null == fdField) {
- fdField = getSocketImplField("fd");
+ fdField = getSocketImplField("fd");
}
FileDescriptor newFd = (FileDescriptor) fdField.get(newImpl);
// BEGIN android-changed
@@ -128,7 +128,7 @@
// END android-cahnged
if (null == localportField) {
- localportField = getSocketImplField("localport");
+ localportField = getSocketImplField("localport");
}
localportField.setInt(newImpl, getLocalPort());
}
@@ -276,7 +276,7 @@
@Override
protected synchronized OutputStream getOutputStream() throws IOException {
if (!fd.valid()) {
- throw new SocketException(Msg.getString("K003d"));
+ throw new SocketException(Msg.getString("K003d"));
}
return new SocketOutputStream(this);
}
@@ -365,7 +365,7 @@
}
} catch (Exception e) {
- throw new SocketException(Msg.getString("K003e", e));
+ throw new SocketException(Msg.getString("K003e", e));
}
socksRequestConnection(applicationServerAddress, applicationServerPort);
@@ -425,13 +425,13 @@
netImpl.connect(fd, trafficClass, socksGetServerAddress(),
socksGetServerPort());
} catch (Exception e) {
- throw new IOException(Msg.getString("K003f", e));
+ throw new IOException(Msg.getString("K003f", e));
}
// There must be a connection to an application host for the bind to
// work.
if (lastConnectedAddress == null) {
- throw new SocketException(Msg.getString("K0040"));
+ throw new SocketException(Msg.getString("K0040"));
}
// Use the last connected address and port in the bind request.
@@ -468,7 +468,7 @@
request.setCommandOrResult(command);
request.setPort(port);
request.setIP(address.getAddress());
- request.setUserId("default");
+ request.setUserId("default");
getOutputStream().write(request.getBytes(), 0, request.getLength());
}
@@ -488,7 +488,7 @@
bytesRead += count;
}
if (Socks4Message.REPLY_LENGTH != bytesRead) {
- throw new SocketException(Msg.getString("KA011"));
+ throw new SocketException(Msg.getString("KA011"));
}
return reply;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/SocketInputStream.java b/luni/src/main/java/org/apache/harmony/luni/net/SocketInputStream.java
index 4e3cad8..2406019 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/SocketInputStream.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/SocketInputStream.java
@@ -36,7 +36,7 @@
/**
* Constructs a SocketInputStream for the <code>socket</code>. Read
* operations are forwarded to the <code>socket</code>.
- *
+ *
* @param socket the socket to be read
* @see Socket
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/SocketOutputStream.java b/luni/src/main/java/org/apache/harmony/luni/net/SocketOutputStream.java
index 920be0f..42dc711 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/SocketOutputStream.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/SocketOutputStream.java
@@ -31,7 +31,7 @@
/**
* Constructs a SocketOutputStream for the <code>socket</code>. Write
* operations are forwarded to the <code>socket</code>.
- *
+ *
* @param socket the socket to be written
* @see Socket
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/net/Socks4Message.java b/luni/src/main/java/org/apache/harmony/luni/net/Socks4Message.java
index ee4f99b..96f5620 100644
--- a/luni/src/main/java/org/apache/harmony/luni/net/Socks4Message.java
+++ b/luni/src/main/java/org/apache/harmony/luni/net/Socks4Message.java
@@ -162,13 +162,13 @@
public String getErrorString(int error) {
switch (error) {
case RETURN_FAILURE:
- return Msg.getString("K00cd");
+ return Msg.getString("K00cd");
case RETURN_CANNOT_CONNECT_TO_IDENTD:
- return Msg.getString("K00ce");
+ return Msg.getString("K00ce");
case RETURN_DIFFERENT_USER_IDS:
- return Msg.getString("K00cf");
+ return Msg.getString("K00cf");
default:
- return Msg.getString("K00d0");
+ return Msg.getString("K00d0");
}
}
@@ -208,7 +208,7 @@
index++;
}
try {
- result = new String(buffer, offset, index - offset, "ISO8859_1");
+ result = new String(buffer, offset, index - offset, "ISO8859_1");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.toString());
}
@@ -236,7 +236,7 @@
private void setString(int offset, int maxLength, String theString) {
byte[] stringBytes;
try {
- stringBytes = theString.getBytes("ISO8859_1");
+ stringBytes = theString.getBytes("ISO8859_1");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.toString());
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java b/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
index ea7de21..cda54b2 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
@@ -26,7 +26,7 @@
/**
* Abstract implementation for the OS memory spies.
- *
+ *
*/
abstract class AbstractMemorySpy implements IMemorySpy {
@@ -76,7 +76,7 @@
if (wrapper == null) {
// Attempt to free memory we didn't alloc
System.err
- .println("Memory Spy! Fixed attempt to free memory that was not allocated " + address);
+ .println("Memory Spy! Fixed attempt to free memory that was not allocated " + address);
}
return wrapper != null;
}
@@ -88,7 +88,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.harmony.luni.platform.struct.IMemorySpy#autoFree(org.apache.harmony.luni.platform.struct.PlatformAddress)
*/
public void autoFree(PlatformAddress address) {
@@ -110,7 +110,7 @@
// There is a leak if we were not auto-freeing this memory.
if (!wrapper.autoFree) {
System.err
- .println("Memory Spy! Fixed memory leak by freeing " + wrapper.shadow);
+ .println("Memory Spy! Fixed memory leak by freeing " + wrapper.shadow);
}
wrapper.shadow.free();
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java b/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
index 3fba713..c381d23 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,19 +19,19 @@
/**
* Endianness
- *
+ *
*/
public final class Endianness {
/**
* Private mapping mode (equivalent to copy on write).
*/
- public static final Endianness BIG_ENDIAN = new Endianness("BIG_ENDIAN");
+ public static final Endianness BIG_ENDIAN = new Endianness("BIG_ENDIAN");
/**
* Read-only mapping mode.
*/
public static final Endianness LITTLE_ENDIAN = new Endianness(
- "LITTLE_ENDIAN");
+ "LITTLE_ENDIAN");
// The string used to display the mapping mode.
private final String displayName;
@@ -46,7 +46,7 @@
/**
* Returns a string version of the endianness
- *
+ *
* @return the mode string.
*/
public String toString() {
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/FileDescriptorHandler.java b/luni/src/main/java/org/apache/harmony/luni/platform/FileDescriptorHandler.java
index 9afee7e..0f1b578 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/FileDescriptorHandler.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/FileDescriptorHandler.java
@@ -26,7 +26,7 @@
/**
* Get the wrapped <code>FileDescriptor</code>.
- *
+ *
* @return the wrapped <code>FileDescriptor</code>.
*/
FileDescriptor getFD();
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/ICommonDataTypes.java b/luni/src/main/java/org/apache/harmony/luni/platform/ICommonDataTypes.java
index 11f55cc..4bd8ac3 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/ICommonDataTypes.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/ICommonDataTypes.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,7 @@
/**
* Defines some C scalar types.
- *
+ *
*/
public interface ICommonDataTypes {
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java b/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
index 1b9187d..785c8ad 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
@@ -27,7 +27,7 @@
/**
* TODO Type description
- *
+ *
*/
public interface IFileSystem {
@@ -48,7 +48,7 @@
public final int O_RDWR = 0x00000010;
public final int O_RDWRSYNC = 0x00000020;
-
+
public final int O_APPEND = 0x00000100;
public final int O_CREAT = 0x00001000;
@@ -112,9 +112,9 @@
// public long ttyAvailable() throws IOException;
// public long ttyRead(byte[] bytes, int offset, int length) throws IOException;
// END android-deleted
-
+
// BEGIN android-added
public int ioctlAvailable(FileDescriptor fileDescriptor) throws IOException;
// END android-added
-
+
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySpy.java b/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySpy.java
index a56c84d..6f9cf9c 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySpy.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySpy.java
@@ -21,7 +21,7 @@
/**
* This is the interface that the memory watchers implement -- what they do with
* this information is largely undefined.
- *
+ *
*/
public interface IMemorySpy {
@@ -38,7 +38,7 @@
* garbage. If the address is alredy freed, or has not been notified as
* allocated via this memory spy, then this call has no effect and completes
* quietly.
- *
+ *
* @param address
* the address to be freed.
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java b/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
index 2bbbeac..66535ea 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
@@ -26,7 +26,7 @@
/**
* IMemorySystem
- *
+ *
*/
public interface IMemorySystem {
@@ -51,14 +51,14 @@
/**
* Returns true if the platform is little endian, otherwise it may be
* assumed to be big endian..
- *
+ *
* @return true if the platform is little endian.
*/
public boolean isLittleEndian();
/**
* Returns the platform pointer size.
- *
+ *
* @return the native platform pointer size, in bytes.
*/
public int getPointerSize();
@@ -68,7 +68,7 @@
* <code>length</code> bytes. The space is uninitialized and may be larger
* than the number of bytes requested; however, the guaranteed usable memory
* block is exactly <code>length</code> bytes long.
- *
+ *
* @param length
* number of bytes requested.
* @return the address of the start of the memory block.
@@ -86,7 +86,7 @@
* Freeing a pointer to a memory block that was not allocated by
* <code>malloc()</code> has unspecified effect.
* </p>
- *
+ *
* @param address
* the address of the memory block to deallocate.
*/
@@ -100,7 +100,7 @@
* <code>(address ... address + length)</code> is not wholly within the
* range that was previously allocated using <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the address of the first memory location.
* @param value
@@ -123,7 +123,7 @@
* within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param destAddress
* the address of the destination memory block.
* @param srcAddress
@@ -142,7 +142,7 @@
* <code>(address ... address + length)</code> is not within a memory
* block that was allocated using {@link #malloc(int) malloc(long)}.
* </p>
- *
+ *
* @param address
* the address of the OS memory block from which to copy bytes.
* @param bytes
@@ -169,7 +169,7 @@
* <code>(address ... address + length)</code> is not within a memory
* block that was allocated using {@link #malloc(int) malloc(long)}.
* </p>
- *
+ *
* @param address
* the address of the OS memory block into which to copy the
* bytes.
@@ -199,7 +199,7 @@
* <code>(address ... address + length*2)</code> is not within a memory
* block that was allocated using {@link #malloc(int) malloc(long)}.
* </p>
- *
+ *
* @param address
* the address of the OS memory block into which to copy the
* shorts.
@@ -231,7 +231,7 @@
* <code>(address ... address + length*4)</code> is not within a memory
* block that was allocated using {@link #malloc(int) malloc(long)}.
* </p>
- *
+ *
* @param address
* the address of the OS memory block into which to copy the
* ints.
@@ -274,7 +274,7 @@
* The behavior is unspecified if <code>address</code> is not in the range
* that was previously allocated using <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the address at which to set the byte value.
* @param value
@@ -290,7 +290,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the two-byte value.
* @return the value of the two-byte integer as a Java <code>short</code>.
@@ -322,7 +322,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the two-byte value.
* @param value
@@ -340,7 +340,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the four-byte value.
* @return the value of the four-byte integer as a Java <code>int</code>.
@@ -357,7 +357,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the four-byte value.
* @param value
@@ -375,7 +375,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @return the value of the eight-byte integer as a Java <code>long</code>.
@@ -392,7 +392,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @param value
@@ -411,7 +411,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @return the value of the four-byte float as a Java <code>float</code>.
@@ -428,7 +428,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @param value
@@ -446,7 +446,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @return the value of the eight-byte float as a Java <code>double</code>.
@@ -463,7 +463,7 @@
* is not wholly within the range that was previously allocated using
* <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the eight-byte value.
* @param value
@@ -484,7 +484,7 @@
* <code>(address ... address + POINTER_SIZE)</code> is not wholly within
* the range that was previously allocated using <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the platform pointer.
* @return the value of the platform pointer as a Java <code>long</code>.
@@ -502,7 +502,7 @@
* <code>(address ... address + POINTER_SIZE)</code> is not wholly within
* the range that was previously allocated using <code>malloc()</code>.
* </p>
- *
+ *
* @param address
* the platform address of the start of the platform pointer.
* @param value
@@ -535,7 +535,7 @@
/**
* TODO: JavaDoc
- *
+ *
* @param addr
* @throws IOException
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java b/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
index 6a1a954..b488c45 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
@@ -53,13 +53,13 @@
public int read(FileDescriptor aFD, byte[] data, int offset, int count,
int timeout) throws IOException;
-
+
public int readDirect(FileDescriptor aFD, int address, int count,
int timeout) throws IOException;
public int write(FileDescriptor fd, byte[] data, int offset, int count)
throws IOException;
-
+
public int writeDirect(FileDescriptor fd, int address, int offset, int count)
throws IOException;
@@ -75,7 +75,7 @@
public int sendDatagram(FileDescriptor fd, byte[] data, int offset,
int length, int port, boolean bindToDevice, int trafficClass,
InetAddress inetAddress) throws IOException;
-
+
public int sendDatagramDirect(FileDescriptor fd, int address, int offset,
int length, int port, boolean bindToDevice, int trafficClass,
InetAddress inetAddress) throws IOException;
@@ -83,7 +83,7 @@
public int receiveDatagram(FileDescriptor aFD, DatagramPacket packet,
byte[] data, int offset, int length, int receiveTimeout,
boolean peek) throws IOException;
-
+
public int receiveDatagramDirect(FileDescriptor aFD, DatagramPacket packet,
int address, int offset, int length, int receiveTimeout,
boolean peek) throws IOException;
@@ -91,17 +91,17 @@
public int recvConnectedDatagram(FileDescriptor aFD, DatagramPacket packet,
byte[] data, int offset, int length, int receiveTimeout,
boolean peek) throws IOException;
-
+
public int recvConnectedDatagramDirect(FileDescriptor aFD,
DatagramPacket packet, int address, int offset, int length,
int receiveTimeout, boolean peek) throws IOException;
-
+
public int peekDatagram(FileDescriptor aFD, InetAddress sender,
int receiveTimeout) throws IOException;
public int sendConnectedDatagram(FileDescriptor fd, byte[] data,
int offset, int length, boolean bindToDevice) throws IOException;
-
+
public int sendConnectedDatagramDirect(FileDescriptor fd, int address,
int offset, int length, boolean bindToDevice) throws IOException;
@@ -126,7 +126,7 @@
public void createStreamSocket(FileDescriptor aFD, boolean preferIPv4Stack)
throws SocketException;
-
+
public void listen(FileDescriptor aFD, int backlog) throws SocketException;
public void connectStreamWithTimeoutSocket(FileDescriptor aFD, int aport,
@@ -174,7 +174,7 @@
/*
* Query the IP stack for the local port to which this socket is bound.
- *
+ *
* @param aFD the socket descriptor
* @return int the local port to which the socket is bound
*/
@@ -182,10 +182,10 @@
/*
* Query the IP stack for the nominated socket option.
- *
+ *
* @param aFD the socket descriptor @param opt the socket option type
* @return the nominated socket option value
- *
+ *
* @throws SocketException if the option is invalid
*/
public Object getSocketOption(FileDescriptor aFD, int opt)
@@ -193,10 +193,10 @@
/*
* Set the nominated socket option in the IP stack.
- *
+ *
* @param aFD the socket descriptor @param opt the option selector @param
* optVal the nominated option value
- *
+ *
* @throws SocketException if the option is invalid or cannot be set
*/
public void setSocketOption(FileDescriptor aFD, int opt, Object optVal)
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/MappedPlatformAddress.java b/luni/src/main/java/org/apache/harmony/luni/platform/MappedPlatformAddress.java
index 4799930..9e9d995 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/MappedPlatformAddress.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/MappedPlatformAddress.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
package org.apache.harmony.luni.platform;
public class MappedPlatformAddress extends PlatformAddress {
-
+
MappedPlatformAddress(int address, long size) {
super(address, size);
}
@@ -40,17 +40,17 @@
memorySpy.rangeCheck(this, 0, (int) size * SIZEOF_JBYTE);
osMemory.flush(osaddr, size);
}
-
+
public final void free(){
if(memorySpy.free(this)){
osMemory.unmap(osaddr, size);
}
}
-
+
public PlatformAddress duplicate(){
return PlatformAddressFactory.mapOn(osaddr, size);
}
-
+
public final PlatformAddress offsetBytes(int offset) {
return PlatformAddressFactory.mapOn(osaddr + offset, size - offset);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java b/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
index 35a5e734..691f064 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
@@ -45,19 +45,19 @@
private final void validateLockArgs(int type, long start, long length) {
if ((type != IFileSystem.SHARED_LOCK_TYPE)
&& (type != IFileSystem.EXCLUSIVE_LOCK_TYPE)) {
- throw new IllegalArgumentException("Illegal lock type requested.");
+ throw new IllegalArgumentException("Illegal lock type requested.");
}
// Start position
if (start < 0) {
throw new IllegalArgumentException(
- "Lock start position must be non-negative");
+ "Lock start position must be non-negative");
}
// Length of lock stretch
if (length < 0) {
throw new IllegalArgumentException(
- "Lock length must be non-negative");
+ "Lock length must be non-negative");
}
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java b/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
index b490da5..9842965 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
@@ -76,7 +76,7 @@
/*
* Native method to determine whether the underlying platform is little
* endian.
- *
+ *
* @return <code>true</code> if the platform is little endian or
* <code>false</code> if it is big endian.
*/
@@ -84,7 +84,7 @@
/**
* This class is not designed to be publicly instantiated.
- *
+ *
* @see #getOSMemory()
*/
private OSMemory() {
@@ -93,7 +93,7 @@
/**
* Returns whether the byte order of this machine is little endian or not.
- *
+ *
* @return <code>false</code> for Big Endian, and
* <code>true</code> for Little Endian.
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/Platform.java b/luni/src/main/java/org/apache/harmony/luni/platform/Platform.java
index f156f21..e8ed5ff 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/Platform.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/Platform.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddress.java b/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddress.java
index 2027376..ae4ac34 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddress.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddress.java
@@ -53,7 +53,7 @@
static final IMemorySystem osMemory = Platform.getMemorySystem();
final int osaddr;
-
+
final long size;
PlatformAddress(int address, long size) {
@@ -67,12 +67,12 @@
* allocated the memory, it will automatically be freed when this object is
* collected by the garbage collector if the memory has not already been
* freed explicitly.
- *
+ *
*/
public final void autoFree() {
memorySpy.autoFree(this);
}
-
+
public PlatformAddress duplicate() {
return PlatformAddressFactory.on(osaddr, size);
}
@@ -131,7 +131,7 @@
memorySpy.rangeCheck(this, offset, length * SIZEOF_JBYTE);
osMemory.setByteArray(osaddr + offset, bytes, bytesOffset, length);
}
-
+
// BEGIN android-added
public final void setShortArray(int offset, short[] shorts,
int shortsOffset, int length, boolean swap) {
@@ -269,9 +269,9 @@
}
public final String toString() {
- return "PlatformAddress[" + osaddr + "]";
+ return "PlatformAddress[" + osaddr + "]";
}
-
+
public final long getSize() {
return size;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddressFactory.java b/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddressFactory.java
index 3590604..e7eb7f0 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddressFactory.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/PlatformAddressFactory.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -102,10 +102,10 @@
MappedPlatformAddress addr = new MappedPlatformAddress(value, size);
return addr;
}
-
+
public static PlatformAddress allocMap(int fd, long start, long size, int mode) throws IOException {
if (size == 0) {
- // if size is 0, call to mmap has incorrect behaviour on
+ // if size is 0, call to mmap has incorrect behaviour on
// unix and windows, so return empty address
return mapOn(0, 0);
}
@@ -117,7 +117,7 @@
/**
* Allocates a contiguous block of OS heap memory.
- *
+ *
* @param size The number of bytes to allocate from the system heap.
* @return PlatformAddress representing the memory block.
*/
@@ -141,7 +141,7 @@
/**
* Allocates a contiguous block of OS heap memory and initializes it to
* a given value.
- *
+ *
* @param size The number of bytes to allocate from the system heap.
* @param init The value to initialize the memory.
* @return PlatformAddress representing the memory block.
diff --git a/luni/src/main/java/org/apache/harmony/luni/platform/RuntimeMemorySpy.java b/luni/src/main/java/org/apache/harmony/luni/platform/RuntimeMemorySpy.java
index e45075c..7dff738 100644
--- a/luni/src/main/java/org/apache/harmony/luni/platform/RuntimeMemorySpy.java
+++ b/luni/src/main/java/org/apache/harmony/luni/platform/RuntimeMemorySpy.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/Base64.java b/luni/src/main/java/org/apache/harmony/luni/util/Base64.java
index 2944a95..e172a61 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/Base64.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/Base64.java
@@ -28,11 +28,11 @@
* as specified in RFC 2045 (http://www.ietf.org/rfc/rfc2045.txt).
*/
public class Base64 {
-
+
public static byte[] decode(byte[] in) {
return decode(in, in.length);
}
-
+
public static byte[] decode(byte[] in, int len) {
// approximate output length
int length = len / 4 * 3;
@@ -50,7 +50,7 @@
for (;;len--) {
chr = in[len-1];
// skip the neutral characters
- if ((chr == '\n') || (chr == '\r') ||
+ if ((chr == '\n') || (chr == '\r') ||
(chr == ' ') || (chr == '\t')) {
continue;
}
@@ -71,7 +71,7 @@
for (int i=0; i<len; i++) {
chr = in[i];
// skip the neutral characters
- if ((chr == '\n') || (chr == '\r') ||
+ if ((chr == '\n') || (chr == '\r') ||
(chr == ' ') || (chr == '\t')) {
continue;
}
@@ -123,10 +123,10 @@
}
private static final byte[] map = new byte[]
- {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
- 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b',
- 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
+ {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
+ 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b',
+ 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+ 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '/'};
public static String encode(byte[] in, String charsetName) throws UnsupportedEncodingException {
@@ -136,9 +136,9 @@
int index = 0, i, crlr = 0, end = in.length - in.length%3;
for (i=0; i<end; i+=3) {
out[index++] = map[(in[i] & 0xff) >> 2];
- out[index++] = map[((in[i] & 0x03) << 4)
+ out[index++] = map[((in[i] & 0x03) << 4)
| ((in[i+1] & 0xff) >> 4)];
- out[index++] = map[((in[i+1] & 0x0f) << 2)
+ out[index++] = map[((in[i+1] & 0x0f) << 2)
| ((in[i+2] & 0xff) >> 6)];
out[index++] = map[(in[i+2] & 0x3f)];
if (((index - crlr)%76 == 0) && (index != 0)) {
@@ -157,9 +157,9 @@
break;
case 2:
out[index++] = map[(in[end] & 0xff) >> 2];
- out[index++] = map[((in[end] & 0x03) << 4)
+ out[index++] = map[((in[end] & 0x03) << 4)
| ((in[end+1] & 0xff) >> 4)];
- out[index++] = map[((in[end+1] & 0x0f) << 2)];
+ out[index++] = map[((in[end+1] & 0x0f) << 2)];
out[index++] = '=';
break;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/BinarySearch.java b/luni/src/main/java/org/apache/harmony/luni/util/BinarySearch.java
index 7a1974b..3317450 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/BinarySearch.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/BinarySearch.java
@@ -23,7 +23,7 @@
/**
* Search the sorted characters in the string and return an exact index or
* -1.
- *
+ *
* @param data
* the String to search
* @param value
@@ -47,7 +47,7 @@
/**
* Search the sorted characters in the string and return the nearest index.
- *
+ *
* @param data
* the String to search
* @param c
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java b/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
index c84b8cf..d383f9d 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/FloatingPointParser.java
@@ -44,13 +44,13 @@
* floating point number by taking the positive integer the String
* represents and multiplying by 10 raised to the power of the of the
* exponent. Returns the closest double value to the real number
- *
+ *
* @param s
* the String that will be parsed to a floating point
* @param e
* an int represent the 10 to part
* @return the double closest to the real number
- *
+ *
* @exception NumberFormatException
* if the String doesn't represent a positive integer value
*/
@@ -62,13 +62,13 @@
* floating point number by taking the positive integer the String
* represents and multiplying by 10 raised to the power of the of the
* exponent. Returns the closest float value to the real number
- *
+ *
* @param s
* the String that will be parsed to a floating point
* @param e
* an int represent the 10 to part
* @return the float closest to the real number
- *
+ *
* @exception NumberFormatException
* if the String doesn't represent a positive integer value
*/
@@ -81,13 +81,13 @@
* StringExponentPair will be used to calculate the floating point number by
* taking the positive integer the String represents and multiplying by 10
* raised to the power of the of the exponent.
- *
+ *
* @param s
* the String that will be parsed to a floating point
* @param length
* the length of s
* @return a StringExponentPair with necessary values
- *
+ *
* @exception NumberFormatException
* if the String doesn't pass basic tests
*/
@@ -128,8 +128,8 @@
// only so throw a new exception with
// the correct string
throw new NumberFormatException(s);
- }
-
+ }
+
} else {
end = length;
}
@@ -251,11 +251,11 @@
/**
* Returns the closest double value to the real number in the string.
- *
+ *
* @param s
* the String that will be parsed to a floating point
* @return the double closest to the real number
- *
+ *
* @exception NumberFormatException
* if the String doesn't represent a double
*/
@@ -272,12 +272,12 @@
if ((last == 'y') || (last == 'N')) {
return parseDblName(s, length);
}
-
+
// See if it could be a hexadecimal representation
- if (s.toLowerCase().indexOf("0x") != -1) {
+ if (s.toLowerCase().indexOf("0x") != -1) {
return HexStringParser.parseDouble(s);
}
-
+
StringExponentPair info = initialParse(s, length);
double result = parseDblImpl(info.s, info.e);
@@ -289,11 +289,11 @@
/**
* Returns the closest float value to the real number in the string.
- *
+ *
* @param s
* the String that will be parsed to a floating point
* @return the float closest to the real number
- *
+ *
* @exception NumberFormatException
* if the String doesn't represent a float
*/
@@ -310,12 +310,12 @@
if ((last == 'y') || (last == 'N')) {
return parseFltName(s, length);
}
-
+
// See if it could be a hexadecimal representation
- if (s.toLowerCase().indexOf("0x") != -1) {
+ if (s.toLowerCase().indexOf("0x") != -1) {
return HexStringParser.parseFloat(s);
}
-
+
StringExponentPair info = initialParse(s, length);
float result = parseFltImpl(info.s, info.e);
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java b/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java
index 4339e92..b37a498 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/HexStringParser.java
@@ -32,32 +32,32 @@
private static final int FLOAT_EXPONENT_WIDTH = 8;
private static final int FLOAT_MANTISSA_WIDTH = 23;
-
+
private static final int HEX_RADIX = 16;
-
+
private static final int MAX_SIGNIFICANT_LENGTH = 15;
- private static final String HEX_SIGNIFICANT = "0[xX](\\p{XDigit}+\\.?|\\p{XDigit}*\\.\\p{XDigit}+)";
+ private static final String HEX_SIGNIFICANT = "0[xX](\\p{XDigit}+\\.?|\\p{XDigit}*\\.\\p{XDigit}+)";
- private static final String BINARY_EXPONENT = "[pP]([+-]?\\d+)";
+ private static final String BINARY_EXPONENT = "[pP]([+-]?\\d+)";
- private static final String FLOAT_TYPE_SUFFIX = "[fFdD]?";
+ private static final String FLOAT_TYPE_SUFFIX = "[fFdD]?";
- private static final String HEX_PATTERN = "[\\x00-\\x20]*([+-]?)" + HEX_SIGNIFICANT
- + BINARY_EXPONENT + FLOAT_TYPE_SUFFIX + "[\\x00-\\x20]*";
+ private static final String HEX_PATTERN = "[\\x00-\\x20]*([+-]?)" + HEX_SIGNIFICANT
+ + BINARY_EXPONENT + FLOAT_TYPE_SUFFIX + "[\\x00-\\x20]*";
private static final Pattern PATTERN = Pattern.compile(HEX_PATTERN);
private final int EXPONENT_WIDTH;
private final int MANTISSA_WIDTH;
-
+
private final long EXPONENT_BASE;
-
+
private final long MAX_EXPONENT;
-
+
private final long MIN_EXPONENT;
-
+
private final long MANTISSA_MASK;
private long sign;
@@ -65,13 +65,13 @@
private long exponent;
private long mantissa;
-
- private String abandonedNumber="";
+
+ private String abandonedNumber="";
public HexStringParser(int exponent_width, int mantissa_width) {
this.EXPONENT_WIDTH = exponent_width;
this.MANTISSA_WIDTH = mantissa_width;
-
+
this.EXPONENT_BASE = ~(-1L << (exponent_width - 1));
this.MAX_EXPONENT = ~(-1L << exponent_width);
this.MIN_EXPONENT = -(MANTISSA_WIDTH + 1);
@@ -134,7 +134,7 @@
* Parses the sign field.
*/
private void parseHexSign(String signStr) {
- this.sign = signStr.equals("-") ? 1 : 0;
+ this.sign = signStr.equals("-") ? 1 : 0;
}
/*
@@ -154,29 +154,29 @@
exponent = expSign * Long.MAX_VALUE;
}
}
-
+
/*
* Parses the mantissa field.
*/
private void parseMantissa(String significantStr) {
- String[] strings = significantStr.split("\\.");
+ String[] strings = significantStr.split("\\.");
String strIntegerPart = strings[0];
- String strDecimalPart = strings.length > 1 ? strings[1] : "";
+ String strDecimalPart = strings.length > 1 ? strings[1] : "";
String significand = getNormalizedSignificand(strIntegerPart,strDecimalPart);
- if (significand.equals("0")) {
+ if (significand.equals("0")) {
setZero();
return;
}
int offset = getOffset(strIntegerPart, strDecimalPart);
checkedAddExponent(offset);
-
+
if (exponent >= MAX_EXPONENT) {
setInfinite();
return;
}
-
+
if (exponent <= MIN_EXPONENT) {
setZero();
return;
@@ -196,7 +196,7 @@
}
}
-
+
private void setInfinite() {
exponent = MAX_EXPONENT;
mantissa = 0;
@@ -206,7 +206,7 @@
exponent = 0;
mantissa = 0;
}
-
+
/*
* Sets the exponent variable to Long.MAX_VALUE or -Long.MAX_VALUE if
* overflow or underflow happens.
@@ -220,14 +220,14 @@
exponent = result;
}
}
-
+
private void processNormalNumber(){
int desiredWidth = MANTISSA_WIDTH + 2;
fitMantissaInDesiredWidth(desiredWidth);
round();
mantissa = mantissa & MANTISSA_MASK;
}
-
+
private void processSubNormalNumber(){
int desiredWidth = MANTISSA_WIDTH + 1;
desiredWidth += (int)exponent;//lends bit from mantissa to exponent
@@ -236,7 +236,7 @@
round();
mantissa = mantissa & MANTISSA_MASK;
}
-
+
/*
* Adjusts the mantissa to desired width for further analysis.
*/
@@ -248,7 +248,7 @@
mantissa <<= (desiredWidth - bitLength);
}
}
-
+
/*
* Stores the discarded bits to abandonedNumber.
*/
@@ -264,18 +264,18 @@
* then it should be rounded up to the nearest infinitely precise even.
*/
private void round() {
- String result = abandonedNumber.replaceAll("0+", "");
+ String result = abandonedNumber.replaceAll("0+", "");
boolean moreThanZero = (result.length() > 0 ? true : false);
int lastDiscardedBit = (int) (mantissa & 1L);
mantissa >>= 1;
int tailBitInMantissa = (int) (mantissa & 1L);
-
+
if (lastDiscardedBit == 1 && (moreThanZero || tailBitInMantissa == 1)) {
int oldLength = countBitsLength(mantissa);
mantissa += 1L;
int newLength = countBitsLength(mantissa);
-
+
//Rounds up to exponent when whole bits of mantissa are one-bits.
if (oldLength >= MANTISSA_WIDTH && newLength > oldLength) {
checkedAddExponent(1);
@@ -288,9 +288,9 @@
*/
private String getNormalizedSignificand(String strIntegerPart, String strDecimalPart) {
String significand = strIntegerPart + strDecimalPart;
- significand = significand.replaceFirst("^0+", "");
+ significand = significand.replaceFirst("^0+", "");
if (significand.length() == 0) {
- significand = "0";
+ significand = "0";
}
return significand;
}
@@ -302,17 +302,17 @@
* the rest of the significand as a fraction.
*/
private int getOffset(String strIntegerPart, String strDecimalPart) {
- strIntegerPart = strIntegerPart.replaceFirst("^0+", "");
-
+ strIntegerPart = strIntegerPart.replaceFirst("^0+", "");
+
//If the Integer part is a nonzero number.
if (strIntegerPart.length() != 0) {
String leadingNumber = strIntegerPart.substring(0, 1);
return (strIntegerPart.length() - 1) * 4 + countBitsLength(Long.parseLong(leadingNumber,HEX_RADIX)) - 1;
}
-
+
//If the Integer part is a zero number.
int i;
- for (i = 0; i < strDecimalPart.length() && strDecimalPart.charAt(i) == '0'; i++);
+ for (i = 0; i < strDecimalPart.length() && strDecimalPart.charAt(i) == '0'; i++);
if (i == strDecimalPart.length()) {
return 0;
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/Inet6Util.java b/luni/src/main/java/org/apache/harmony/luni/util/Inet6Util.java
index 55914de..787eef3 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/Inet6Util.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/Inet6Util.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java b/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java
index 8c1e5dd..7c54b98 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/InputStreamHelper.java
@@ -47,9 +47,9 @@
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
try {
- f[0] = ByteArrayInputStream.class.getDeclaredField("buf");
+ f[0] = ByteArrayInputStream.class.getDeclaredField("buf");
f[0].setAccessible(true);
- f[1] = ByteArrayInputStream.class.getDeclaredField("pos");
+ f[1] = ByteArrayInputStream.class.getDeclaredField("pos");
f[1].setAccessible(true);
} catch (NoSuchFieldException nsfe) {
throw new InternalError(nsfe.getLocalizedMessage());
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/InvalidJarIndexException.java b/luni/src/main/java/org/apache/harmony/luni/util/InvalidJarIndexException.java
index c553f66..b8a1c53 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/InvalidJarIndexException.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/InvalidJarIndexException.java
@@ -35,7 +35,7 @@
/**
* Constructs a new instance of this class with its message filled in.
- *
+ *
* @param message
* String The message for the exception.
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/Msg.java b/luni/src/main/java/org/apache/harmony/luni/util/Msg.java
index 1561da4..0fa4a23 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/Msg.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/Msg.java
@@ -40,7 +40,7 @@
* is looked up, or resource bundle support is not available, the key itself
* will be returned as the associated message. This means that the <em>KEY</em>
* should a reasonable human-readable (English) string.
- *
+ *
*/
public class Msg {
// BEGIN android-changed
@@ -50,7 +50,7 @@
/**
* Retrieves a message which has no arguments.
- *
+ *
* @param msg
* String the key to look up.
* @return String the message for that key in the system message bundle.
@@ -71,7 +71,7 @@
/**
* Retrieves a message which takes 1 argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -84,7 +84,7 @@
/**
* Retrieves a message which takes 1 integer argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -97,7 +97,7 @@
/**
* Retrieves a message which takes 1 character argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -110,7 +110,7 @@
/**
* Retrieves a message which takes 2 arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param arg1
@@ -125,7 +125,7 @@
/**
* Retrieves a message which takes several arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param args
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/MsgHelp.java b/luni/src/main/java/org/apache/harmony/luni/util/MsgHelp.java
index a6b5128..41898af 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/MsgHelp.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/MsgHelp.java
@@ -43,7 +43,7 @@
// A HashMap mapping a resource name to a SoftReference to a ResourceBundle
// holding the messages for that resource.
private static HashMap<String, SoftReference<ResourceBundle>> sRefMap = null;
-
+
public synchronized static ResourceBundle loadBundle(String resource) {
if (sRefMap == null) {
sRefMap = new HashMap<String, SoftReference<ResourceBundle>>();
@@ -66,7 +66,7 @@
return bundleRef.get();
}
}
-
+
public static String getString(String resource, String msg) {
ResourceBundle bundle = MsgHelp.loadBundle(resource);
if (bundle == null) {
@@ -78,7 +78,7 @@
return "Missing message: " + msg;
}
}
-
+
static public String getString(String resource, String msg, Object[] args) {
String format = msg;
ResourceBundle bundle = MsgHelp.loadBundle(resource);
@@ -102,7 +102,7 @@
* To insert the "{" character into the output, use a single backslash
* character to escape it (i.e. "\{"). The "}" character does not need to be
* escaped.
- *
+ *
* @param format
* String the format to use when printing.
* @param args
@@ -160,7 +160,7 @@
/**
* Changes the locale of the messages.
- *
+ *
* @param locale
* Locale the locale to change to.
* @param resource
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/NotImplementedException.java b/luni/src/main/java/org/apache/harmony/luni/util/NotImplementedException.java
index 4f59c00..b4fb37a 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/NotImplementedException.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/NotImplementedException.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,7 +22,7 @@
/**
* This exception is thrown by methods that are not currently implemented, so
* that programs that call the stubs fail early and predictably.
- *
+ *
*/
public class NotImplementedException extends RuntimeException {
@@ -69,7 +69,7 @@
/**
* Constructor that takes a reason message.
- *
+ *
* @param detailMessage
*/
public NotImplementedException(String detailMessage) {
@@ -78,7 +78,7 @@
/**
* Constructor that takes a reason and a wrapped exception.
- *
+ *
* @param detailMessage
* @param throwable
*/
@@ -88,7 +88,7 @@
/**
* Constructor that takes a wrapped exception.
- *
+ *
* @param throwable
*/
public NotImplementedException(Throwable throwable) {
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/NumberConverter.java b/luni/src/main/java/org/apache/harmony/luni/util/NumberConverter.java
index 18d6a5b..8545657 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/NumberConverter.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/NumberConverter.java
@@ -102,7 +102,7 @@
if (inputNumber >= 1e7D || inputNumber <= -1e7D
|| (inputNumber > -1e-3D && inputNumber < 1e-3D))
return signString + freeFormatExponential();
-
+
return signString + freeFormat();
}
@@ -152,7 +152,7 @@
if (inputNumber >= 1e7f || inputNumber <= -1e7f
|| (inputNumber > -1e-3f && inputNumber < 1e-3f))
return signString + freeFormatExponential();
-
+
return signString + freeFormat();
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/PasswordProtectedInputStream.java b/luni/src/main/java/org/apache/harmony/luni/util/PasswordProtectedInputStream.java
index dcbc05b..03152fd 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/PasswordProtectedInputStream.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/PasswordProtectedInputStream.java
@@ -34,7 +34,7 @@
/**
* Constructs a new instance of the receiver.
- *
+ *
* @param in The actual input stream where to read the bytes from.
* @param password The password bytes to use to decrypt the input bytes
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/PositionedInputStream.java b/luni/src/main/java/org/apache/harmony/luni/util/PositionedInputStream.java
index ae8aa11..28e29f9 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/PositionedInputStream.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/PositionedInputStream.java
@@ -30,7 +30,7 @@
/**
* Constructs a new instance of the receiver.
- *
+ *
* @param in The actual input stream where to read the bytes from.
*/
public PositionedInputStream(InputStream in) {
@@ -39,7 +39,7 @@
/**
* Return the current position in the receiver
- *
+ *
* @return int The current position in the receiver
*/
public int currentPosition() {
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/PriviAction.java b/luni/src/main/java/org/apache/harmony/luni/util/PriviAction.java
index 8a094d7..9a12825 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/PriviAction.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/PriviAction.java
@@ -47,10 +47,10 @@
/**
* Creates a PrivilegedAction to get the security property with the given
* name.
- *
+ *
* @param property
* the name of the property
- *
+ *
* @see Security#getProperty
*/
public static PrivilegedAction<String> getSecurityProperty(String property) {
@@ -64,7 +64,7 @@
/**
* Creates a PrivilegedAction to get the current security policy object.
- *
+ *
* @see Policy#getPolicy
*/
public PriviAction() {
@@ -74,11 +74,11 @@
/**
* Creates a PrivilegedAction to disable the access checks to the given
* object.
- *
+ *
* @param object
* the object whose accessible flag will be set to
* <code>true</code>
- *
+ *
* @see AccessibleObject#setAccessible(boolean)
*/
public PriviAction(AccessibleObject object) {
@@ -89,10 +89,10 @@
/**
* Creates a PrivilegedAction to return the value of the system property
* with the given key.
- *
+ *
* @param property
* the key of the system property
- *
+ *
* @see System#getProperty(String)
*/
public PriviAction(String property) {
@@ -103,12 +103,12 @@
/**
* Creates a PrivilegedAction to return the value of the system property
* with the given key.
- *
+ *
* @param property
* the key of the system property
* @param defaultAnswer
* the return value if the system property does not exist
- *
+ *
* @see System#getProperty(String, String)
*/
public PriviAction(String property, String defaultAnswer) {
@@ -119,7 +119,7 @@
/**
* Performs the actual privileged computation as defined by the constructor.
- *
+ *
* @see java.security.PrivilegedAction#run()
*/
@SuppressWarnings("unchecked")
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/SHAOutputStream.java b/luni/src/main/java/org/apache/harmony/luni/util/SHAOutputStream.java
index a0adfd4..f7a0eb3 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/SHAOutputStream.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/SHAOutputStream.java
@@ -64,7 +64,7 @@
// 80 words
private static final int WArraySize = 80;
-
+
// 5-word Array. Starts with well-known constants, ends with SHA
private int[] HConstants;
@@ -94,10 +94,10 @@
/**
* Constructs a new MD5OutputStream with the given initial state.
- *
+ *
* @param state The initial state of the output stream. This is what will be
* returned by getHash() if write() is never called.
- *
+ *
* @throws IllegalArgumentException if state.length is less than 16.
*/
public SHAOutputStream(byte[] state) {
@@ -121,7 +121,7 @@
* <p>
* Classes which wish to support cloning must specify that they implement
* the Cloneable interface, since the native implementation checks for this.
- *
+ *
* @return a complete copy of this object
* @throws CloneNotSupportedException if the component does not implement
* the interface Cloneable
@@ -140,11 +140,11 @@
/**
* Copies a byte array into the receiver's internal buffer, making the
* adjustments as necessary and keeping the receiver in a consistent state.
- *
+ *
* @param buffer byte array representation of the bytes
* @param off offset into the source buffer where to start the copying
* @param len how many bytes in the source byte array to copy
- *
+ *
*/
private void copyToInternalBuffer(byte[] buffer, int off, int len) {
int index;
@@ -159,7 +159,7 @@
/**
* Returns an int array (length = 5) with the SHA value of the bytes written
* to the receiver.
- *
+ *
* @return The 5 ints that form the SHA value of the bytes written to
* the receiver
*/
@@ -176,7 +176,7 @@
/**
* Returns a byte array (length = 20) with the SHA value of the bytes
* written to the receiver.
- *
+ *
* @return The bytes that form the SHA value of the bytes written to
* the receiver
*/
@@ -202,7 +202,7 @@
/**
* Returns a byte array (length = 20) with the SHA value of the bytes
* written to the receiver.
- *
+ *
* @return The bytes that form the SHA value of the bytes written to
* the receiver
*/
@@ -375,7 +375,7 @@
/**
* Converts a block to a String representation.
- *
+ *
* @param block
* byte array representation of the bytes
*/
@@ -385,7 +385,7 @@
/**
* Converts a block to a String representation.
- *
+ *
* @param block
* byte array representation of the bytes
* @param off
@@ -411,7 +411,7 @@
* <code>buffer</code> starting at offset <code>off</code> to the
* SHAOutputStream. The internal buffer used to compute SHA is updated, and
* the incremental computation of SHA is also performed.
- *
+ *
* @param buffer
* the buffer to be written
* @param off
@@ -450,7 +450,7 @@
/**
* Writes the specified byte <code>b</code> to this OutputStream. Only the
* low order byte of <code>b</code> is written.
- *
+ *
* @param b
* the byte to be written
*/
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java b/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
index 0f22ab3..b7d3097 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/TwoKeyHashMap.java
@@ -29,9 +29,9 @@
import java.util.Set;
/**
- *
+ *
* Reductive hash with two keys
- *
+ *
*/
public class TwoKeyHashMap<E, K, V> extends AbstractMap<String, V> {
@@ -58,7 +58,7 @@
/**
* Constructs an empty HashMap
- *
+ *
* @param initialCapacity
*/
public TwoKeyHashMap(int initialCapacity) {
@@ -67,7 +67,7 @@
/**
* Constructs an empty HashMap
- *
+ *
* @param initialCapacity
* @param initialLoadFactor
*/
@@ -120,7 +120,7 @@
/**
* Removes the mapping for the keys
- *
+ *
* @param key1
* @param key2
* @return
@@ -132,7 +132,7 @@
/**
* Associates the specified value with the specified keys in this map
- *
+ *
* @param key1
* @param key2
* @param value
@@ -179,7 +179,7 @@
/**
* Rehash the map
- *
+ *
*/
@SuppressWarnings("unchecked")
void rehash() {
@@ -222,7 +222,7 @@
/**
* Return the value by keys
- *
+ *
* @param key1
* @param key2
* @return
@@ -251,7 +251,7 @@
/**
* Creates new entry
- *
+ *
* @param hashCode
* @param key1
* @param key2
@@ -266,7 +266,7 @@
/**
* Creates entries iterator
- *
+ *
* @return
*/
Iterator<Map.Entry<String, V>> createEntrySetIterator() {
@@ -275,7 +275,7 @@
/**
* Creates values iterator
- *
+ *
* @return
*/
Iterator<V> createValueCollectionIterator() {
@@ -284,7 +284,7 @@
/**
* Entry implementation for the TwoKeyHashMap class
- *
+ *
*/
public static class Entry<E, K, V> implements Map.Entry<String, V> {
int hash;
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/URLUtil.java b/luni/src/main/java/org/apache/harmony/luni/util/URLUtil.java
index 4909572..341637d 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/URLUtil.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/URLUtil.java
@@ -28,16 +28,16 @@
public static String canonicalizePath(String path) {
int dirIndex;
- while ((dirIndex = path.indexOf("/./")) >= 0) {
+ while ((dirIndex = path.indexOf("/./")) >= 0) {
path = path.substring(0, dirIndex + 1)
+ path.substring(dirIndex + 3);
}
- if (path.endsWith("/.")) {
+ if (path.endsWith("/.")) {
path = path.substring(0, path.length() - 1);
}
- while ((dirIndex = path.indexOf("/../")) >= 0) {
+ while ((dirIndex = path.indexOf("/../")) >= 0) {
if (dirIndex != 0) {
path = path.substring(0, path
.lastIndexOf('/', dirIndex - 1))
@@ -47,7 +47,7 @@
}
}
- if (path.endsWith("/..") && path.length() > 3) {
+ if (path.endsWith("/..") && path.length() > 3) {
path = path.substring(0, path.lastIndexOf('/',
path.length() - 4) + 1);
}
diff --git a/luni/src/main/java/org/apache/harmony/luni/util/Util.java b/luni/src/main/java/org/apache/harmony/luni/util/Util.java
index 49447f8..f6741fc 100644
--- a/luni/src/main/java/org/apache/harmony/luni/util/Util.java
+++ b/luni/src/main/java/org/apache/harmony/luni/util/Util.java
@@ -61,10 +61,10 @@
return name.getBytes(defaultEncoding);
} catch (java.io.UnsupportedEncodingException e) {
}
- }
+ }
return name.getBytes();
}
-
+
/**
* Get bytes from String with UTF8 encoding
* @param name
@@ -91,8 +91,8 @@
public static String toUTF8String(byte[] bytes) {
return toUTF8String(bytes, 0, bytes.length);
- }
-
+ }
+
public static String toString(byte[] bytes, int offset, int length) {
if (defaultEncoding != null) {
try {
@@ -110,11 +110,11 @@
return toString(bytes, offset, length);
}
}
-
+
/**
* Returns the millisecond value of the date and time parsed from the
* specified String. Many date/time formats are recognized
- *
+ *
* @param string
* the String to parse
* @return the millisecond value parsed from the String
@@ -269,7 +269,7 @@
* '%' and two following hex digit characters are converted to the
* equivalent byte value. All other characters are passed through
* unmodified. e.g. "ABC %24%25" -> "ABC $%"
- *
+ *
* @param s
* java.lang.String The encoded string.
* @return java.lang.String The decoded version.
@@ -282,7 +282,7 @@
* '%' and two following hex digit characters are converted to the
* equivalent byte value. All other characters are passed through
* unmodified. e.g. "ABC %24%25" -> "ABC $%"
- *
+ *
* @param s
* java.lang.String The encoded string.
* @param encoding
diff --git a/luni/src/main/java/org/apache/harmony/misc/HashCode.java b/luni/src/main/java/org/apache/harmony/misc/HashCode.java
index e8ce8f6..c7acae2 100644
--- a/luni/src/main/java/org/apache/harmony/misc/HashCode.java
+++ b/luni/src/main/java/org/apache/harmony/misc/HashCode.java
@@ -22,13 +22,13 @@
* object based on the field values. The result depends on the order of elements
* appended. The exact formula is the same as for
* <code>java.util.List.hashCode</code>.
- *
+ *
* If you need order independent hash code just summate, multiply or XOR all
* elements.
- *
+ *
* <p>
* Suppose we have class:
- *
+ *
* <pre><code>
* class Thing {
* long id;
@@ -36,12 +36,12 @@
* float weight;
* }
* </code></pre>
- *
+ *
* The hash code calculation can be expressed in 2 forms.
- *
+ *
* <p>
* For maximum performance:
- *
+ *
* <pre><code>
* public int hashCode() {
* int hashCode = HashCode.EMPTY_HASH_CODE;
@@ -51,50 +51,50 @@
* return hashCode;
* }
* </code></pre>
- *
+ *
* <p>
* For convenience: <code><pre>
* public int hashCode() {
* return new HashCode().append(id).append(name).append(weight).hashCode();
* }
* </code></pre>
- *
+ *
* @see java.util.List#hashCode()
*/
public final class HashCode {
/**
- * The hashCode value before any data is appended, equals to 1.
+ * The hashCode value before any data is appended, equals to 1.
* @see java.util.List#hashCode()
*/
public static final int EMPTY_HASH_CODE = 1;
-
+
private int hashCode = EMPTY_HASH_CODE;
-
+
/**
* Returns accumulated hashCode
*/
public final int hashCode() {
return hashCode;
}
-
+
/**
* Combines hashCode of previous elements sequence and value's hashCode.
* @param hashCode previous hashCode value
* @param value new element
* @return combined hashCode
*/
- public static int combine(int hashCode, boolean value) {
+ public static int combine(int hashCode, boolean value) {
int v = value ? 1231 : 1237;
return combine(hashCode, v);
}
-
+
/**
* Combines hashCode of previous elements sequence and value's hashCode.
* @param hashCode previous hashCode value
* @param value new element
* @return combined hashCode
*/
- public static int combine(int hashCode, long value) {
+ public static int combine(int hashCode, long value) {
int v = (int) (value ^ (value >>> 32));
return combine(hashCode, v);
}
@@ -105,18 +105,18 @@
* @param value new element
* @return combined hashCode
*/
- public static int combine(int hashCode, float value) {
+ public static int combine(int hashCode, float value) {
int v = Float.floatToIntBits(value);
return combine(hashCode, v);
}
-
+
/**
* Combines hashCode of previous elements sequence and value's hashCode.
* @param hashCode previous hashCode value
* @param value new element
* @return combined hashCode
*/
- public static int combine(int hashCode, double value) {
+ public static int combine(int hashCode, double value) {
long v = Double.doubleToLongBits(value);
return combine(hashCode, v);
}
@@ -130,7 +130,7 @@
public static int combine(int hashCode, Object value) {
return combine(hashCode, value.hashCode());
}
-
+
/**
* Combines hashCode of previous elements sequence and value's hashCode.
* @param hashCode previous hashCode value
@@ -140,7 +140,7 @@
public static int combine(int hashCode, int value) {
return 31 * hashCode + value;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
@@ -150,7 +150,7 @@
hashCode = combine(hashCode, value);
return this;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
@@ -160,7 +160,7 @@
hashCode = combine(hashCode, value);
return this;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
@@ -170,7 +170,7 @@
hashCode = combine(hashCode, value);
return this;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
@@ -180,7 +180,7 @@
hashCode = combine(hashCode, value);
return this;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
@@ -190,7 +190,7 @@
hashCode = combine(hashCode, value);
return this;
}
-
+
/**
* Appends value's hashCode to the current hashCode.
* @param value new element
diff --git a/luni/src/main/java/org/apache/harmony/misc/SystemUtils.java b/luni/src/main/java/org/apache/harmony/misc/SystemUtils.java
index 4c6263b..6f8dcc6 100644
--- a/luni/src/main/java/org/apache/harmony/misc/SystemUtils.java
+++ b/luni/src/main/java/org/apache/harmony/misc/SystemUtils.java
@@ -43,11 +43,11 @@
*/
public static int getOS() {
if (os == 0) {
- String osname = System.getProperty("os.name").substring(0,3);
- if (osname.compareToIgnoreCase("win") == 0) {
+ String osname = System.getProperty("os.name").substring(0,3);
+ if (osname.compareToIgnoreCase("win") == 0) {
os = OS_WINDOWS;
} else {
- if (osname.compareToIgnoreCase("lin") == 0) {
+ if (osname.compareToIgnoreCase("lin") == 0) {
os = OS_LINUX;
} else
os = OS_UNKNOWN;
diff --git a/luni/src/main/java/org/apache/harmony/nio/AddressUtil.java b/luni/src/main/java/org/apache/harmony/nio/AddressUtil.java
index d39b1ea..b911180 100644
--- a/luni/src/main/java/org/apache/harmony/nio/AddressUtil.java
+++ b/luni/src/main/java/org/apache/harmony/nio/AddressUtil.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -40,11 +40,11 @@
* Gets the start address of a direct buffer.
* <p>
* This method corresponds to the JNI function:
- *
+ *
* <pre>
* void* GetDirectBufferAddress(JNIEnv* env, jobject buf);
* </pre>
- *
+ *
* @param buf
* the direct buffer whose address shall be returned must not be
* <code>null</code>.
diff --git a/luni/src/main/java/org/apache/harmony/nio/FileChannelFactory.java b/luni/src/main/java/org/apache/harmony/nio/FileChannelFactory.java
index 4a3b853..83a70ad 100644
--- a/luni/src/main/java/org/apache/harmony/nio/FileChannelFactory.java
+++ b/luni/src/main/java/org/apache/harmony/nio/FileChannelFactory.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
index e525657..6c6d868 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/DatagramChannelImpl.java
@@ -126,7 +126,7 @@
/**
* Answer the local address from the IP stack. This method should not be
* called directly as it does not check the security policy.
- *
+ *
* @return InetAddress the local address to which the socket is bound.
* @see DatagramSocket
*/
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java b/luni/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java
index 1af7c54..58c096b 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/DirectBuffer.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,16 +18,16 @@
import org.apache.harmony.luni.platform.PlatformAddress;
public interface DirectBuffer {
-
+
PlatformAddress getEffectiveAddress();
-
+
PlatformAddress getBaseAddress();
-
+
boolean isAddressValid();
-
+
void addressValidityCheck();
-
+
void free();
-
+
int getByteCapacity();
}
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
index cdb8b3d..16f6994 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/FileChannelImpl.java
@@ -46,7 +46,7 @@
* The file channel impl class is the bridge between the logical channels
* described by the NIO channel framework, and the file system implementation
* provided by the port layer.
- *
+ *
* This class is non-API, but implements the API of the FileChannel interface.
*/
public abstract class FileChannelImpl extends FileChannel {
@@ -78,7 +78,7 @@
/*
* Create a new file channel implementation class that wraps the given file
* handle and operates in the specified mode.
- *
+ *
*/
public FileChannelImpl(Object stream, int handle) {
super();
@@ -99,7 +99,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.nio.channels.spi.AbstractInterruptibleChannel#implCloseChannel()
*/
protected void implCloseChannel() throws IOException {
@@ -129,7 +129,7 @@
/*
* Acquire a lock on the receiver, blocks if the lock cannot be obtained
* immediately.
- *
+ *
* @see java.nio.channels.FileChannel#lock(long, long, boolean)
*/
public final FileLock lock(long position, long size, boolean shared)
@@ -152,7 +152,7 @@
/*
* Attempts to acquire the given lock, but does not block. If the lock
* cannot be acquired the method returns null.
- *
+ *
* @see java.nio.channels.FileChannel#tryLock(long, long, boolean)
*/
public final FileLock tryLock(long position, long size, boolean shared)
@@ -479,7 +479,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see java.nio.channels.WritableByteChannel#write(java.nio.ByteBuffer)
*/
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java
index 7ac445d..d3d2635 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/FileLockImpl.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -31,7 +31,7 @@
/**
* Constructs a new file lock object with the given parameters.
- *
+ *
* @param channel
* the file channel hosting the lock.
* @param position
@@ -48,7 +48,7 @@
/**
* Tests to see if the lock is valid. A lock can be invalidated if the
* channel it is acquired on is closed or if it is released. (non-Javadoc)
- *
+ *
* @see java.nio.channels.FileLock#isValid()
*/
@Override
@@ -59,7 +59,7 @@
/**
* Releases the file lock on the channel that acquired it. Releasing an
* invalid lock has no effect.
- *
+ *
* @see java.nio.channels.FileLock#release()
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/LockManager.java b/luni/src/main/java/org/apache/harmony/nio/internal/LockManager.java
index 3504460..e1ba13d 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/LockManager.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/LockManager.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@
/**
* The lock manager is responsible for tracking acquired and pending locks on
* the underlying file channel.
- *
+ *
*/
final class LockManager {
// The set of acquired and pending locks.
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java b/luni/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
index 5c74c67..4abb96f 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/MappedByteBufferFactory.java
@@ -35,7 +35,7 @@
try {
Class<?> wrapperClazz = ClassLoader
.getSystemClassLoader().loadClass(
- "java.nio.MappedByteBufferAdapter");
+ "java.nio.MappedByteBufferAdapter");
Constructor<?> result = wrapperClazz
.getConstructor(new Class[] {
PlatformAddress.class, int.class,
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/PipeImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/PipeImpl.java
index 53e9ce6..3d39e50 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/PipeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/PipeImpl.java
@@ -4,9 +4,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -29,7 +29,7 @@
/*
* default implementation of Pipe
- *
+ *
*/
final class PipeImpl extends Pipe {
@@ -56,7 +56,7 @@
throw e;
}
}
-
+
private void reset(){
if(sink != null){
try {
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java b/luni/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java
index 626cb95..5f43251 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/ReadWriteFileChannel.java
@@ -16,7 +16,7 @@
*/
/*
- * Android Notice
+ * Android Notice
* In this class the address length was changed from long to int.
* This is due to performance optimizations for the device.
*/
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
index 3aa063c..111b366 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/ServerSocketChannelImpl.java
@@ -72,7 +72,7 @@
impl = new PlainServerSocketImpl(fd);
socket = new ServerSocketAdapter(impl, this);
}
-
+
// for native call
@SuppressWarnings("unused")
private ServerSocketChannelImpl() throws IOException {
@@ -92,7 +92,7 @@
}
/*
- *
+ *
* @see java.nio.channels.ServerSocketChannel#accept()
*/
public SocketChannel accept() throws IOException {
@@ -147,7 +147,7 @@
/*
* @see java.nio.channels.spi.AbstractSelectableChannel#implConfigureBlocking
- *
+ *
* (boolean)
*/
protected void implConfigureBlocking(boolean blockingMode)
@@ -158,7 +158,7 @@
}
/*
- *
+ *
* @see java.nio.channels.spi.AbstractSelectableChannel#implCloseSelectableChannel()
*/
synchronized protected void implCloseSelectableChannel() throws IOException {
@@ -193,7 +193,7 @@
}
/*
- *
+ *
* @see java.net.ServerSocket#bind(java.net.SocketAddress, int)
*/
public void bind(SocketAddress localAddr, int backlog)
@@ -204,7 +204,7 @@
/*
* @see java.net.ServerSocket#accept()
- *
+ *
* If the channel is in non-blocking mode and there is no connection
* ready to be accepted, invoking this method will cause an
* IllegalBlockingModeException.
@@ -256,7 +256,7 @@
}
/*
- *
+ *
* @see java.net.ServerSocket#isBound()
*/
public boolean isBound() {
@@ -264,7 +264,7 @@
}
/*
- *
+ *
* @see java.net.ServerSocket#bind(java.net.SocketAddress)
*/
public void bind(SocketAddress localAddr) throws IOException {
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java b/luni/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java
index 3f1a4ab..337d7d4 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/SocketChannelImpl.java
@@ -419,7 +419,7 @@
/**
* Read from channel, and store the result in the target.
- *
+ *
* @param target
* output parameter
*/
@@ -906,7 +906,7 @@
}
return new SocketChannelInputStream(channel);
}
-
+
private void checkOpenAndConnected() throws SocketException {
if (!channel.isOpen()) {
throw new SocketException("Socket is closed");
@@ -915,7 +915,7 @@
throw new SocketException("Socket is not connected");
}
}
-
+
/*
* Checks whether the channel is open.
*/
@@ -947,7 +947,7 @@
/*
* Closes this stream and channel.
- *
+ *
* @exception IOException thrown if an error occurs during the close
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java b/luni/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java
index eb46043..21fa9d3 100644
--- a/luni/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java
+++ b/luni/src/main/java/org/apache/harmony/nio/internal/WriteOnlyFileChannel.java
@@ -46,7 +46,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.harmony.nio.internal.FileChannelImpl#position()
*/
public long position() throws IOException {
diff --git a/luni/src/main/java/org/apache/harmony/security/DefaultPolicyScanner.java b/luni/src/main/java/org/apache/harmony/security/DefaultPolicyScanner.java
index 4aa6c30..0972849 100644
--- a/luni/src/main/java/org/apache/harmony/security/DefaultPolicyScanner.java
+++ b/luni/src/main/java/org/apache/harmony/security/DefaultPolicyScanner.java
@@ -36,24 +36,24 @@
* analyzes data read from it and returns a set of structured tokens. <br>
* This implementation recognizes text files, consisting of clauses with the
* following syntax:
- *
+ *
* <pre>
- *
+ *
* keystore "some_keystore_url", "keystore_type";
- *
+ *
* </pre>
* <pre>
- *
+ *
* grant [SignedBy "signer_names"] [, CodeBase "URL"]
* [, Principal [principal_class_name] "principal_name"]
* [, Principal [principal_class_name] "principal_name"] ... {
- * permission permission_class_name [ "target_name" ] [, "action"]
+ * permission permission_class_name [ "target_name" ] [, "action"]
* [, SignedBy "signer_names"];
* permission ...
* };
- *
+ *
* </pre>
- *
+ *
* For semantical details of this format, see the
* {@link org.apache.harmony.security.fortress.DefaultPolicy default policy description}.
* <br>
@@ -64,14 +64,14 @@
* <br>
* This implementation is effectively thread-safe, as it has no field references
* to data being processed (that is, passes all the data as method parameters).
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicyParser
*/
public class DefaultPolicyScanner {
/**
* Specific exception class to signal policy file syntax error.
- *
+ *
*/
public static class InvalidFormatException extends Exception {
@@ -80,8 +80,8 @@
*/
private static final long serialVersionUID = 5789786270390222184L;
- /**
- * Constructor with detailed message parameter.
+ /**
+ * Constructor with detailed message parameter.
*/
public InvalidFormatException(String arg0) {
super(arg0);
@@ -104,7 +104,7 @@
* StreamTokenizer instance; then tries to recognize <i>keystore </i> or
* <i>grant </i> keyword. When found, invokes read method corresponding to
* the clause and collects result to the passed collection.
- *
+ *
* @param r
* policy stream reader
* @param grantEntries
@@ -127,12 +127,12 @@
break parsing;
case StreamTokenizer.TT_WORD:
- if (Util.equalsIgnoreCase("keystore", st.sval)) {
+ if (Util.equalsIgnoreCase("keystore", st.sval)) {
keystoreEntries.add(readKeystoreEntry(st));
- } else if (Util.equalsIgnoreCase("grant", st.sval)) {
+ } else if (Util.equalsIgnoreCase("grant", st.sval)) {
grantEntries.add(readGrantEntry(st));
} else {
- handleUnexpectedToken(st, Messages.getString("security.89"));
+ handleUnexpectedToken(st, Messages.getString("security.89"));
}
break;
@@ -148,13 +148,13 @@
/**
* Tries to read <i>keystore </i> clause fields. The expected syntax is
- *
+ *
* <pre>
- *
+ *
* "some_keystore_url"[, "keystore_type"];
- *
+ *
* </pre>
- *
+ *
* @return successfully parsed KeystoreEntry
* @throws IOException
* if stream reading failed
@@ -173,7 +173,7 @@
st.pushBack();
}
} else {
- handleUnexpectedToken(st, Messages.getString("security.8A"));
+ handleUnexpectedToken(st, Messages.getString("security.8A"));
}
return ke;
}
@@ -187,14 +187,14 @@
* Principal entries (if any) are read by invoking readPrincipalEntry()
* method, obtained PrincipalEntries are accumulated. <br>
* The expected syntax is
- *
+ *
* <pre>
- *
- * [ [codebase "url"] | [signedby "name1,...,nameN"] |
+ *
+ * [ [codebase "url"] | [signedby "name1,...,nameN"] |
* principal ...] ]* { ... }
- *
+ *
* </pre>
- *
+ *
* @return successfully parsed GrantEntry
* @throws IOException
* if stream reading failed
@@ -208,19 +208,19 @@
switch (st.nextToken()) {
case StreamTokenizer.TT_WORD:
- if (Util.equalsIgnoreCase("signedby", st.sval)) {
+ if (Util.equalsIgnoreCase("signedby", st.sval)) {
if (st.nextToken() == '"') {
ge.signers = st.sval;
} else {
- handleUnexpectedToken(st, Messages.getString("security.8B"));
+ handleUnexpectedToken(st, Messages.getString("security.8B"));
}
- } else if (Util.equalsIgnoreCase("codebase", st.sval)) {
+ } else if (Util.equalsIgnoreCase("codebase", st.sval)) {
if (st.nextToken() == '"') {
ge.codebase = st.sval;
} else {
- handleUnexpectedToken(st, Messages.getString("security.8C"));
+ handleUnexpectedToken(st, Messages.getString("security.8C"));
}
- } else if (Util.equalsIgnoreCase("principal", st.sval)) {
+ } else if (Util.equalsIgnoreCase("principal", st.sval)) {
ge.addPrincipal(readPrincipalEntry(st));
} else {
handleUnexpectedToken(st);
@@ -245,16 +245,16 @@
/**
* Tries to read <i>Principal </i> entry fields. The expected syntax is
- *
+ *
* <pre>
- *
+ *
* [ principal_class_name ] "principal_name"
- *
+ *
* </pre>
- *
+ *
* Both class and name may be wildcards, wildcard names should not
* surrounded by quotes.
- *
+ *
* @return successfully parsed PrincipalEntry
* @throws IOException
* if stream reading failed
@@ -276,7 +276,7 @@
} else if (st.ttype == '*') {
pe.name = PrincipalEntry.WILDCARD;
} else {
- handleUnexpectedToken(st, Messages.getString("security.8D"));
+ handleUnexpectedToken(st, Messages.getString("security.8D"));
}
return pe;
}
@@ -284,17 +284,17 @@
/**
* Tries to read a list of <i>permission </i> entries. The expected syntax
* is
- *
+ *
* <pre>
- *
+ *
* permission permission_class_name
* [ "target_name" ] [, "action_list"]
* [, signedby "name1,name2,..."];
- *
+ *
* </pre>
- *
+ *
* List is terminated by '}' (closing curly brace) symbol.
- *
+ *
* @return collection of successfully parsed PermissionEntries
* @throws IOException
* if stream reading failed
@@ -308,7 +308,7 @@
switch (st.nextToken()) {
case StreamTokenizer.TT_WORD:
- if (Util.equalsIgnoreCase("permission", st.sval)) {
+ if (Util.equalsIgnoreCase("permission", st.sval)) {
PermissionEntry pe = new PermissionEntry();
if (st.nextToken() == StreamTokenizer.TT_WORD) {
pe.klass = st.sval;
@@ -326,7 +326,7 @@
}
}
if (st.ttype == StreamTokenizer.TT_WORD
- && Util.equalsIgnoreCase("signedby", st.sval)) {
+ && Util.equalsIgnoreCase("signedby", st.sval)) {
if (st.nextToken() == '"') {
pe.signers = st.sval;
} else {
@@ -339,7 +339,7 @@
continue parsing;
}
}
- handleUnexpectedToken(st, Messages.getString("security.8E"));
+ handleUnexpectedToken(st, Messages.getString("security.8E"));
break;
case ';': //just delimiter of entries
@@ -367,7 +367,7 @@
/**
* Throws InvalidFormatException with detailed diagnostics.
- *
+ *
* @param st
* a tokenizer holding the erroneous token
* @param message
@@ -377,27 +377,27 @@
*/
protected final void handleUnexpectedToken(StreamTokenizer st,
String message) throws InvalidFormatException {
- throw new InvalidFormatException(Messages.getString("security.8F",
+ throw new InvalidFormatException(Messages.getString("security.8F",
composeStatus(st), message));
}
/**
* Throws InvalidFormatException with error status: which token is
* unexpected on which line.
- *
+ *
* @param st
* a tokenizer holding the erroneous token
*/
protected final void handleUnexpectedToken(StreamTokenizer st)
throws InvalidFormatException {
- throw new InvalidFormatException(Messages.getString("security.90",
+ throw new InvalidFormatException(Messages.getString("security.90",
composeStatus(st)));
}
/**
* Compound token representing <i>keystore </i> clause. See policy format
* {@link org.apache.harmony.security.fortress.DefaultPolicy description}for details.
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicyParser
* @see org.apache.harmony.security.DefaultPolicyScanner
*/
@@ -417,7 +417,7 @@
/**
* Compound token representing <i>grant </i> clause. See policy format
* {@link org.apache.harmony.security.fortress.DefaultPolicy description}for details.
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicyParser
* @see org.apache.harmony.security.DefaultPolicyScanner
*/
@@ -462,7 +462,7 @@
* Compound token representing <i>principal </i> entry of a <i>grant </i>
* clause. See policy format
* {@link org.apache.harmony.security.fortress.DefaultPolicy description}for details.
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicyParser
* @see org.apache.harmony.security.DefaultPolicyScanner
*/
@@ -470,11 +470,11 @@
/**
* Wildcard value denotes any class and/or any name.
- * Must be asterisk, for proper general expansion and
+ * Must be asterisk, for proper general expansion and
* PrivateCredentialsPermission wildcarding
*/
- public static final String WILDCARD = "*";
-
+ public static final String WILDCARD = "*";
+
/**
* The classname part of principal clause.
*/
@@ -490,7 +490,7 @@
* Compound token representing <i>permission </i> entry of a <i>grant </i>
* clause. See policy format
* {@link org.apache.harmony.security.fortress.DefaultPolicy description}for details.
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicyParser
* @see org.apache.harmony.security.DefaultPolicyScanner
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/PolicyEntry.java b/luni/src/main/java/org/apache/harmony/security/PolicyEntry.java
index 0037ad6..4c00f01 100644
--- a/luni/src/main/java/org/apache/harmony/security/PolicyEntry.java
+++ b/luni/src/main/java/org/apache/harmony/security/PolicyEntry.java
@@ -36,7 +36,7 @@
* This class represents an elementary block of a security policy. It associates
* a CodeSource of an executable code, Principals allowed to execute the code,
* and a set of granted Permissions.
- *
+ *
* @see org.apache.harmony.security.fortress.DefaultPolicy
*/
public class PolicyEntry {
@@ -44,7 +44,7 @@
// Store CodeSource
private final CodeSource cs;
- // Array of principals
+ // Array of principals
private final Principal[] principals;
// Permissions collection
diff --git a/luni/src/main/java/org/apache/harmony/security/PrivateKeyImpl.java b/luni/src/main/java/org/apache/harmony/security/PrivateKeyImpl.java
index 26759f9..47aceb3 100644
--- a/luni/src/main/java/org/apache/harmony/security/PrivateKeyImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/PrivateKeyImpl.java
@@ -43,7 +43,7 @@
}
public String getFormat() {
- return "PKCS#8";
+ return "PKCS#8";
}
public byte[] getEncoded() {
diff --git a/luni/src/main/java/org/apache/harmony/security/PublicKeyImpl.java b/luni/src/main/java/org/apache/harmony/security/PublicKeyImpl.java
index 52b4f0cb..dccc72d 100644
--- a/luni/src/main/java/org/apache/harmony/security/PublicKeyImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/PublicKeyImpl.java
@@ -25,7 +25,7 @@
* PublicKeyImpl
*/
public class PublicKeyImpl implements PublicKey {
-
+
/**
* @serial
*/
@@ -37,7 +37,7 @@
private String algorithm;
- public PublicKeyImpl(String algorithm) {
+ public PublicKeyImpl(String algorithm) {
this.algorithm = algorithm;
}
@@ -48,7 +48,7 @@
public String getFormat() {
- return "X.509";
+ return "X.509";
}
diff --git a/luni/src/main/java/org/apache/harmony/security/SystemScope.java b/luni/src/main/java/org/apache/harmony/security/SystemScope.java
index cbfe552..d38a12b 100644
--- a/luni/src/main/java/org/apache/harmony/security/SystemScope.java
+++ b/luni/src/main/java/org/apache/harmony/security/SystemScope.java
@@ -103,17 +103,17 @@
public synchronized void addIdentity(Identity identity)
throws KeyManagementException {
if (identity == null) {
- throw new NullPointerException(Messages.getString("security.92"));
+ throw new NullPointerException(Messages.getString("security.92"));
}
String name = identity.getName();
if (names.containsKey(name)) {
- throw new KeyManagementException(Messages.getString("security.93", name));
+ throw new KeyManagementException(Messages.getString("security.93", name));
}
PublicKey key = identity.getPublicKey();
if (key != null && keys.containsKey(key)) {
- throw new KeyManagementException(Messages.getString("security.94", key));
+ throw new KeyManagementException(Messages.getString("security.94", key));
}
names.put(name, identity);
@@ -130,26 +130,26 @@
//Exception caught = null;
if (identity == null) {
- throw new NullPointerException(Messages.getString("security.92"));
+ throw new NullPointerException(Messages.getString("security.92"));
}
String name = identity.getName();
if (name == null) {
- throw new NullPointerException(Messages.getString("security.95"));
+ throw new NullPointerException(Messages.getString("security.95"));
}
boolean contains = names.containsKey(name);
names.remove(name);
PublicKey key = identity.getPublicKey();
-
+
if (key != null) {
contains = contains || keys.containsKey(key);
keys.remove(key);
}
-
+
if (!contains) {
- throw new KeyManagementException(Messages.getString("security.96"));
+ throw new KeyManagementException(Messages.getString("security.96"));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/UnresolvedPrincipal.java b/luni/src/main/java/org/apache/harmony/security/UnresolvedPrincipal.java
index 747003c..ad03855 100644
--- a/luni/src/main/java/org/apache/harmony/security/UnresolvedPrincipal.java
+++ b/luni/src/main/java/org/apache/harmony/security/UnresolvedPrincipal.java
@@ -29,20 +29,20 @@
/**
* Descriptive implementation of Principal, which holds a name and a classname
* of unresolved principal. It is used to define an arbitrary Principal which
- * may be not yet instantiated and authenticated.
+ * may be not yet instantiated and authenticated.
* <br>
- * This concept is somewhat similar to UnresolvedPermission. A principal-based
- * policy may grant permissions depending on what Principals own the current
- * execution thread. So the policy refers to this model definition of
- * acceptable principal and compares it with the actual principal.
- *
+ * This concept is somewhat similar to UnresolvedPermission. A principal-based
+ * policy may grant permissions depending on what Principals own the current
+ * execution thread. So the policy refers to this model definition of
+ * acceptable principal and compares it with the actual principal.
+ *
* @see org.apache.harmony.security.PolicyEntry
* @see org.apache.harmony.security.fortress.DefaultPolicy
*/
public final class UnresolvedPrincipal implements Principal {
- /**
- * Wildcard value denotes any class and/or any name.
+ /**
+ * Wildcard value denotes any class and/or any name.
*/
public static final String WILDCARD = DefaultPolicyScanner.PrincipalEntry.WILDCARD;
@@ -54,15 +54,15 @@
/**
* Constructs a a new definition of a Principal with specified
- * parameters.
+ * parameters.
* @param klass fully qualified class name, may be wildcard
* @param name name of principal, may be wildcard
- * @throws IllegalArgumentException if <code>klass</code> value
- * is <code>null </code> or is empty string
+ * @throws IllegalArgumentException if <code>klass</code> value
+ * is <code>null </code> or is empty string
*/
public UnresolvedPrincipal(String klass, String name) {
if (klass == null || klass.length() == 0) {
- throw new IllegalArgumentException(Messages.getString("security.91"));
+ throw new IllegalArgumentException(Messages.getString("security.91"));
}
this.klass = klass;
@@ -70,16 +70,16 @@
}
/**
- * Returns name of a modeled Principal, or wildcard
+ * Returns name of a modeled Principal, or wildcard
* if any name is acceptable.
*/
public String getName() {
return name;
}
- /**
+ /**
* Returns fully qualified class name of a modeled Principal,
- * or wildcard if any class is acceptable.
+ * or wildcard if any class is acceptable.
*/
public String getClassName() {
return klass;
@@ -87,8 +87,8 @@
/**
* Returns <code>true</code> if compared object is a Principal
- * matching this definition, or if it is an UnresolvedPrincipal,
- * which defines the same Principal; <code>false</code> otherwise.
+ * matching this definition, or if it is an UnresolvedPrincipal,
+ * which defines the same Principal; <code>false</code> otherwise.
*/
public boolean equals(Object that) {
if (that instanceof UnresolvedPrincipal) {
@@ -102,26 +102,26 @@
return false;
}
- /**
+ /**
* Returns <code>true</code> if compared object is a Principal
- * exactly matching this definition. Namely, if the fully qualified name
+ * exactly matching this definition. Namely, if the fully qualified name
* of class of passed Principal is equal to the class name value
- * of this definition and the name of passed Principal is equal to
+ * of this definition and the name of passed Principal is equal to
* the name value of this definition, or if this definition allows
- * any class or name, respectively.
+ * any class or name, respectively.
* Otherwise returns <code>false</code> .
*/
public boolean implies(Principal another) {
return (another != null)
- && (WILDCARD.equals(klass)
+ && (WILDCARD.equals(klass)
|| klass.equals(another.getClass().getName())
- && (WILDCARD.equals(name)
- || (name == null ? another.getName() == null
+ && (WILDCARD.equals(name)
+ || (name == null ? another.getName() == null
: name.equals(another.getName()))));
}
- /**
- * Returns the hash code value for this object.
+ /**
+ * Returns the hash code value for this object.
*/
public int hashCode() {
int hash = 0;
@@ -134,11 +134,11 @@
return hash;
}
- /**
+ /**
* Returns a string describing this model of Principal.
* The format is 'Principal classname "name"'.
*/
public String toString() {
- return "Principal " + klass + " \"" + name + "\"";
+ return "Principal " + klass + " \"" + name + "\"";
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Any.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Any.java
index 61bec47..59f8779 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Any.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Any.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 ANY type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* Constructs ASN.1 ANY type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 ANY type.
* To get a default implementation it is recommended to use
@@ -50,7 +50,7 @@
/**
* Returns ASN.1 ANY type default implementation
- *
+ *
* The default implementation works with full encoding
* that is represented as raw byte array.
*
@@ -90,7 +90,7 @@
/**
* Extracts array of bytes that represents full encoding from BER input
* stream.
- *
+ *
* @param in -
* BER input stream
* @return array of bytes
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1BitString.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1BitString.java
index 6f8805b..148aa2b 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1BitString.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1BitString.java
@@ -28,7 +28,7 @@
/**
* This class represents ASN.1 Bitstring type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -39,7 +39,7 @@
/**
* Constructs ASN.1 Bitstring type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 Bitstring type.
* To get a default implementation it is recommended to use
@@ -51,7 +51,7 @@
/**
* Returns ASN.1 Bitstring type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as BitString object.
*
@@ -110,8 +110,8 @@
//
/**
- * Default implementation for ASN.1 Named Bitstring type
- *
+ * Default implementation for ASN.1 Named Bitstring type
+ *
* The default implementation works with encoding
* that is mapped to array of boolean.
*/
@@ -164,7 +164,7 @@
} else {
if (bitsNumber > maxBits) {
throw new ASN1Exception(
- Messages.getString("security.97")); //FIXME message
+ Messages.getString("security.97")); //FIXME message
}
value = new boolean[maxBits];
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Boolean.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Boolean.java
index d40c2bf..49cc35b 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Boolean.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Boolean.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 Boolean type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* Constructs ASN.1 Boolean type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 Boolean type.
* To get a default implementation it is recommended to use
@@ -50,7 +50,7 @@
/**
* Returns ASN.1 Boolean type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as Boolean object.
*
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Choice.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Choice.java
index b8e6e48..a052882 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Choice.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Choice.java
@@ -33,41 +33,41 @@
/**
* This abstract class represents ASN.1 Choice type.
- *
+ *
* To implement custom ASN.1 choice type an application class
* must provide implementation for the following methods:
* getIndex()
* getObjectToEncode()
- *
+ *
* There are two ways to implement custom ASN.1 choice type:
- * with application class that represents ASN.1 custom choice type or without.
+ * with application class that represents ASN.1 custom choice type or without.
* The key point is how a value of choice type is stored by application classes.
- *
+ *
* For example, let's consider the following ASN.1 notations
* (see http://www.ietf.org/rfc/rfc3280.txt)
- *
+ *
* Time ::= CHOICE {
* utcTime UTCTime,
* generalTime GeneralizedTime
* }
- *
+ *
* Validity ::= SEQUENCE {
* notBefore Time,
- * notAfter Time
+ * notAfter Time
* }
- *
+ *
* 1)First approach:
* No application class to represent ASN.1 Time notation
- *
+ *
* The Time notation is a choice of different time formats: UTC and Generalized.
* Both of them are mapped to java.util.Date object, so an application
* class that represents ASN.1 Validity notation may keep values
* as Date objects.
- *
+ *
* So a custom ASN.1 Time choice type should map its notation to Date object.
- *
+ *
* class Time {
- *
+ *
* // custom ASN.1 choice class: maps Time to is notation
* public static final ASN1Choice asn1 = new ASN1Choice(new ASN1Type[] {
* ASN1GeneralizedTime.asn1, ASN1UTCTime.asn1 }) {
@@ -77,28 +77,28 @@
* }
*
* public Object getObjectToEncode(Object object) {
- *
+ *
* // A value to be encoded value is a Date object
- * // pass it to custom time class
+ * // pass it to custom time class
* return object;
* }
* };
* }
- *
+ *
* class Validity {
- *
- * private Date notBefore; // choice as Date
+ *
+ * private Date notBefore; // choice as Date
* private Date notAfter; // choice as Date
- *
+ *
* ... // constructors and other methods go here
- *
+ *
* // custom ASN.1 sequence class: maps Validity class to is notation
* public static final ASN1Sequence ASN1
* = new ASN1Sequence(new ASN1Type[] {Time.asn1, Time.asn1 }) {
- *
+ *
* protected Object getObject(Object[] values) {
- *
- * // ASN.1 Time choice passed Data object - use it
+ *
+ * // ASN.1 Time choice passed Data object - use it
* return new Validity((Date) values[0], (Date) values[1]);
* }
*
@@ -112,22 +112,22 @@
* }
* }
* }
- *
+ *
* 2)Second approach:
* There is an application class to represent ASN.1 Time notation
- *
+ *
* If it is a matter what time format should be used to decode/encode
* Date objects a class to represent ASN.1 Time notation must be created.
- *
+ *
* For example,
- *
+ *
* class Time {
- *
- * private Date utcTime;
+ *
+ * private Date utcTime;
* private Date gTime;
- *
+ *
* ... // constructors and other methods go here
- *
+ *
* // custom ASN.1 choice class: maps Time to is notation
* public static final ASN1Choice asn1 = new ASN1Choice(new ASN1Type[] {
* ASN1GeneralizedTime.asn1, ASN1UTCTime.asn1 }) {
@@ -136,7 +136,7 @@
*
* // create Time object to pass as decoded value
* Time time = new Time();
- *
+ *
* if (in.choiceIndex==0) {
* // we decoded GeneralizedTime
* // store decoded Date value in corresponding field
@@ -160,7 +160,7 @@
* } else {
* // otherwise encode Date as GeneralizedTime
* return 0;
- * }
+ * }
* }
*
* public Object getObjectToEncode(Object object) {
@@ -171,7 +171,7 @@
* } else {
* // otherwise encode Date as GeneralizedTime
* return 0;
- * }
+ * }
* }
* };
* }
@@ -180,18 +180,18 @@
* and its custom ASN.1 sequence class must handle this class of objects
*
* class Validity {
- *
- * private Time notBefore; // now it is a Time!!!
+ *
+ * private Time notBefore; // now it is a Time!!!
* private Time notAfter; // now it is a Time!!!
- *
+ *
* ... // constructors and other methods go here
- *
+ *
* // custom ASN.1 sequence class: maps Validity class to is notation
* public static final ASN1Sequence ASN1
* = new ASN1Sequence(new ASN1Type[] {Time.asn1, Time.asn1 }) {
- *
+ *
* protected Object getObject(Object[] values) {
- *
+ *
* // We've gotten Time objects here !!!
* return new Validity((Time) values[0], (Time) values[1]);
* }
@@ -206,7 +206,7 @@
* }
* }
* }
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -221,7 +221,7 @@
/**
* Constructs ASN.1 choice type.
- *
+ *
* @param type -
* an array of one or more ASN.1 type alternatives.
* @throws IllegalArgumentException -
@@ -231,7 +231,7 @@
super(TAG_CHOICE); // has not tag number
if (type.length == 0) {
- throw new IllegalArgumentException(Messages.getString("security.10E",
+ throw new IllegalArgumentException(Messages.getString("security.10E",
getClass().getName()));
}
@@ -244,7 +244,7 @@
if (t instanceof ASN1Any) {
// ASN.1 ANY is not allowed,
// even it is a single component (not good for nested choices)
- throw new IllegalArgumentException(Messages.getString("security.10F",
+ throw new IllegalArgumentException(Messages.getString("security.10F",
getClass().getName())); // FIXME name
} else if (t instanceof ASN1Choice) {
@@ -285,11 +285,11 @@
private void addIdentifier(TreeMap map, int identifier, int index){
if (map.put(BigInteger.valueOf(identifier), BigInteger.valueOf(index)) != null) {
- throw new IllegalArgumentException(Messages.getString("security.10F",
+ throw new IllegalArgumentException(Messages.getString("security.10F",
getClass().getName())); // FIXME name
}
}
-
+
//
//
// DECODE
@@ -298,7 +298,7 @@
/**
* Tests whether one of choice alternatives has the same identifier or not.
- *
+ *
* @param identifier -
* ASN.1 identifier to be verified
* @return - true if one of choice alternatives has the same identifier,
@@ -312,7 +312,7 @@
int index = Arrays.binarySearch(identifiers[0], in.tag);
if (index < 0) {
- throw new ASN1Exception(Messages.getString("security.110",
+ throw new ASN1Exception(Messages.getString("security.110",
getClass().getName()));// FIXME message
}
@@ -328,7 +328,7 @@
}
return getDecodedObject(in);
}
-
+
//
//
// ENCODE
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constants.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constants.java
index 99cd3b6..5e36982 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constants.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constants.java
@@ -24,7 +24,7 @@
/**
* ASN.1 and some other constants holder interface
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
public interface ASN1Constants {
@@ -87,7 +87,7 @@
int TAG_C_SETOF = TAG_SETOF | PC_CONSTRUCTED;
int TAG_C_UTCTIME = TAG_UTCTIME | PC_CONSTRUCTED;
int TAG_C_GENERALIZEDTIME = TAG_GENERALIZEDTIME | PC_CONSTRUCTED;
-
+
/**
* Not from the ASN.1 specs. For implementation purposes.
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constructured.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constructured.java
index aba9b32..2f17d49 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constructured.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Constructured.java
@@ -25,7 +25,7 @@
/**
* This abstract class is the super class for all constructed ASN.1 types
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
public ASN1Constructured(int tagClass, int tagNumber) {
super(tagClass, tagNumber);
}
-
+
/**
* Tests provided identifier.
*
@@ -49,7 +49,7 @@
public final boolean checkTag(int identifier) {
return this.constrId == identifier;
}
-
+
/**
*
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Enumerated.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Enumerated.java
index 5fa02f5..bc7b208 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Enumerated.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Enumerated.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 Enumerated type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* Constructs ASN.1 Enumerated type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 Enumerated type.
* To get a default implementation it is recommended to use
@@ -50,7 +50,7 @@
/**
* Returns ASN.1 Enumerated type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as byte array.
*
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Exception.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Exception.java
index f214f26..cfab29d 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Exception.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Exception.java
@@ -36,15 +36,15 @@
private static final long serialVersionUID = -3561981263989123987L;
/**
- * Constructs an ASN1Exception without a message.
+ * Constructs an ASN1Exception without a message.
*/
public ASN1Exception(){
}
/**
- * Constructs an ASN1Exception with a message.
- *
- * @param message - a string that describes encoding violation
+ * Constructs an ASN1Exception with a message.
+ *
+ * @param message - a string that describes encoding violation
*/
public ASN1Exception(String message){
super(message);
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Explicit.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Explicit.java
index f2917f1..635c718 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Explicit.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Explicit.java
@@ -29,7 +29,7 @@
/**
* This class represents explicitly tagged ASN.1 type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -42,8 +42,8 @@
/**
* Constructs explicitly tagged ASN.1 type
- * with context-specific tag class and specified tag number.
- *
+ * with context-specific tag class and specified tag number.
+ *
* @param tagNumber - ASN.1 tag number
* @param type - ASN.1 type to be tagged
* @throws IllegalArgumentException - if tagNumber is invalid
@@ -54,7 +54,7 @@
/**
* Constructs explicitly tagged ASN.1 type.
- *
+ *
* @param tagClass - ASN.1 tag class.
* @param tagNumber - ASN.1 tag number
* @param type - ASN.1 type to be tagged
@@ -75,7 +75,7 @@
public Object decode(BerInputStream in) throws IOException {
if (constrId != in.tag) {
throw new ASN1Exception(
- Messages.getString("security.13F",
+ Messages.getString("security.13F",
new Object[] { in.tagOffset, Integer.toHexString(constrId),
Integer.toHexString(in.tag) }));
}
@@ -105,6 +105,6 @@
public String toString() {
//FIXME fix performance
- return super.toString() + " for type " + type;
+ return super.toString() + " for type " + type;
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java
index 4e08395..092a247 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1GeneralizedTime.java
@@ -30,7 +30,7 @@
/**
* This class represents ASN.1 GeneralizedTime type.
- *
+ *
* @see http://asn1.elibel.tm.fr/en/standards/index.htm
*/
@@ -41,7 +41,7 @@
/**
* Constructs ASN.1 GeneralizedTime type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 GeneralizedTime type.
* To get a default implementation it is recommended to use
@@ -53,7 +53,7 @@
/**
* Returns ASN.1 GeneralizedTime type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as Date object.
*
@@ -94,12 +94,12 @@
// four digit year, seconds always presented
// and fractional-seconds elements without
// trailing 0's (must be cut later from content)
- private final static String GEN_PATTERN = "yyyyMMddHHmmss.SSS";
+ private final static String GEN_PATTERN = "yyyyMMddHHmmss.SSS";
public void setEncodingContent(BerOutputStream out) {
SimpleDateFormat sdf = new SimpleDateFormat(GEN_PATTERN);
- sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+ sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
String temp = sdf.format(out.content);
// cut off trailing 0s
int nullId;
@@ -114,11 +114,11 @@
}
try {
- out.content = (temp + "Z").getBytes("UTF-8");
+ out.content = (temp + "Z").getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.getMessage());
}
-
+
out.length = ((byte[]) out.content).length;
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Implicit.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Implicit.java
index 97eebb5..a5dc759 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Implicit.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Implicit.java
@@ -29,7 +29,7 @@
/**
* Implicitly tagged ASN.1 type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
public class ASN1Implicit extends ASN1Type {
@@ -54,8 +54,8 @@
/**
* Constructs implicitly tagged ASN.1 type
- * with context-specific tag class and specified tag number.
- *
+ * with context-specific tag class and specified tag number.
+ *
* @param tagNumber - ASN.1 tag number
* @param type - ASN.1 type to be tagged
* @throws IllegalArgumentException - if tagNumber or type is invalid
@@ -66,7 +66,7 @@
/**
* Constructs implicitly tagged ASN.1 type
- *
+ *
* @param tagClass - ASN.1 tag class.
* @param tagNumber - ASN.1 tag number
* @param type - ASN.1 type to be tagged
@@ -78,10 +78,10 @@
if ((type instanceof ASN1Choice) || (type instanceof ASN1Any)) {
// According to X.680:
// 'The IMPLICIT alternative shall not be used if the type
- // defined by "Type" is an untagged choice type or an
+ // defined by "Type" is an untagged choice type or an
// untagged open type'
throw new IllegalArgumentException(
- Messages.getString("security.9F"));
+ Messages.getString("security.9F"));
}
this.type = type;
@@ -127,7 +127,7 @@
public Object decode(BerInputStream in) throws IOException {
if (!checkTag(in.tag)) {
// FIXME need look for tagging type
- throw new ASN1Exception(Messages.getString("security.100",
+ throw new ASN1Exception(Messages.getString("security.100",
new Object[] { in.tagOffset, Integer.toHexString(id),
Integer.toHexString(in.tag) }));
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Integer.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Integer.java
index 95a2128..9230bbd 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Integer.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Integer.java
@@ -28,7 +28,7 @@
/**
* This class represents ASN.1 Integer type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -39,7 +39,7 @@
/**
* Constructs ASN.1 Integer type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 Integer type.
* To get a default implementation it is recommended to use
@@ -51,7 +51,7 @@
/**
* Returns ASN.1 Integer type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as byte array in two's-complement notation.
*
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OctetString.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OctetString.java
index 90abd39..5d113a4 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OctetString.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OctetString.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 octet string type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* Constructs ASN.1 octet string type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 octet string type.
* To get a default implementation it is recommended to use
@@ -50,7 +50,7 @@
/**
* Returns ASN.1 octet string type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as byte array.
*
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Oid.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Oid.java
index 960dc0f..b286284 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Oid.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Oid.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 Object Identifier type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* Constructs ASN.1 Object Identifier type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 Object Identifier type.
* To get a default implementation it is recommended to use
@@ -50,7 +50,7 @@
/**
* Returns ASN.1 Object Identifier type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as array of integers.
*
@@ -146,7 +146,7 @@
//
//
- // OID encoder/decoder for mapping to string
+ // OID encoder/decoder for mapping to string
//
//
@@ -210,7 +210,7 @@
/**
* Returns ASN.1 Object Identifier type implementation
- *
+ *
* This implementation works with encoding
* that is mapped to java.lang.String object.
*
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OpenType.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OpenType.java
index 4da5b88..750e82a 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OpenType.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1OpenType.java
@@ -30,7 +30,7 @@
/**
* Represents ASN.1 open type that is defined by Oid
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -49,7 +49,7 @@
int[] oid = (int[]) in.get(key);
if (oid == null) {
- throw new RuntimeException("");//FIXME message & type
+ throw new RuntimeException("");//FIXME message & type
}
AttributeType attr = (AttributeType) pool.get(oid);
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Primitive.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Primitive.java
index 027c636..1dc17ec 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Primitive.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Primitive.java
@@ -25,7 +25,7 @@
/**
* This abstract class is the super class for all primitive ASN.1 types
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -34,10 +34,10 @@
public ASN1Primitive(int tagNumber) {
super(tagNumber);
}
-
+
/**
* Tests provided identifier.
- *
+ *
* @param identifier -
* identifier to be verified
* @return - true if identifier correspond to primitive identifier of this
@@ -46,7 +46,7 @@
public final boolean checkTag(int identifier) {
return this.id == identifier;
}
-
+
/**
* TODO
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Sequence.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Sequence.java
index dbb59bf..bfaf517 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Sequence.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Sequence.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 Sequence type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SequenceOf.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SequenceOf.java
index b9f1735..94b320e 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SequenceOf.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SequenceOf.java
@@ -30,7 +30,7 @@
/**
* This class represents ASN.1 Sequence OF type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -73,7 +73,7 @@
* Creates array wrapper of provided ASN1 type
*
* @param type - ASN1 type to be wrapped
- * @return - a wrapper for ASN1 set of type.
+ * @return - a wrapper for ASN1 set of type.
* @throws IOException
* @see org.apache.harmony.security.asn1.ASN1ValueCollection
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Set.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Set.java
index 5388434..cdf9d64 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Set.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Set.java
@@ -27,7 +27,7 @@
/**
* This class represents ASN.1 Set type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -50,7 +50,7 @@
public Object decode(BerInputStream in) throws IOException {
in.readSet(this);
-
+
if(in.isVerify){
return null;
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SetOf.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SetOf.java
index b60c993..3358105 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SetOf.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1SetOf.java
@@ -30,7 +30,7 @@
/**
* This class represents ASN.1 SetOf type.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -71,7 +71,7 @@
* Creates array wrapper of provided ASN1 type
*
* @param type - ASN1 type to be wrapped
- * @return - a wrapper for ASN1 set of type.
+ * @return - a wrapper for ASN1 set of type.
* @throws IOException
* @see org.apache.harmony.security.asn1.ASN1ValueCollection
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1StringType.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1StringType.java
index 412703e..9f6586e 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1StringType.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1StringType.java
@@ -28,13 +28,13 @@
/**
* This class is the super class for all string ASN.1 types
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
public abstract class ASN1StringType extends ASN1Type {
- // TODO: what about defining them as separate classes?
+ // TODO: what about defining them as separate classes?
// TODO: check decoded/encoded characters
public static final ASN1StringType BMPSTRING = new ASN1StringType(
TAG_BMPSTRING) {
@@ -64,13 +64,13 @@
TAG_UTF8STRING) {
public Object getDecodedObject(BerInputStream in) throws IOException {
- return new String(in.buffer, in.contentOffset, in.length, "UTF-8");
+ return new String(in.buffer, in.contentOffset, in.length, "UTF-8");
}
public void setEncodingContent(BerOutputStream out) {
try {
- byte[] bytes = ((String) out.content).getBytes("UTF-8");
+ byte[] bytes = ((String) out.content).getBytes("UTF-8");
out.content = bytes;
out.length = bytes.length;
} catch (UnsupportedEncodingException e) {
@@ -91,7 +91,7 @@
/**
* Tests provided identifier.
- *
+ *
* @param identifier -
* identifier to be verified
* @return - true if identifier correspond to primitive or constructed
@@ -104,7 +104,7 @@
public Object decode(BerInputStream in) throws IOException {
in.readString(this);
-
+
if (in.isVerify) {
return null;
}
@@ -128,7 +128,7 @@
// Encode
//
//
-
+
public void encodeASN(BerOutputStream out) {
out.encodeTag(id);
encodeContent(out);
@@ -140,7 +140,7 @@
public void setEncodingContent(BerOutputStream out) {
try {
- byte[] bytes = ((String) out.content).getBytes("UTF-8");
+ byte[] bytes = ((String) out.content).getBytes("UTF-8");
out.content = bytes;
out.length = bytes.length;
} catch (UnsupportedEncodingException e) {
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Time.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Time.java
index 4d34304..bed5088 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Time.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Time.java
@@ -30,7 +30,7 @@
/**
* Abstract class to represent ASN.1 time types
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -38,7 +38,7 @@
/**
* TODO Put ctor description here
- *
+ *
* @param tagNumber
*/
public ASN1Time(int tagNumber) {
@@ -46,11 +46,11 @@
}
public Object getDecodedObject(BerInputStream in) throws IOException {
-
+
// TODO optimize me:
// It makes sense use calendar instance instead of times array
- GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
-
+ GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+
c.set(Calendar.YEAR, in.times[0]);
c.set(Calendar.MONTH, in.times[1]-1);
c.set(Calendar.DAY_OF_MONTH, in.times[2]);
@@ -58,7 +58,7 @@
c.set(Calendar.MINUTE, in.times[4]);
c.set(Calendar.SECOND, in.times[5]);
c.set(Calendar.MILLISECOND, in.times[6]);
-
+
return c.getTime();
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Type.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Type.java
index 3a0a474..3fa43cf 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Type.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1Type.java
@@ -30,7 +30,7 @@
/**
* This abstract class is the super class for all ASN.1 types
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -48,7 +48,7 @@
/**
* Constructs a primitive, universal ASN.1 type.
- *
+ *
* @param tagNumber - ASN.1 tag number
* @throws IllegalArgumentException - if tagNumber is invalid
*/
@@ -58,7 +58,7 @@
/**
* Constructs an ASN.1 type.
- *
+ *
* @param tagClass - tag class. MUST be
* CLASS_UNIVERSAL, CLASS_APPLICATION, CLASS_CONTEXTSPECIFIC, CLASS_PRIVATE
* @param isConstructed - is ASN.1 type is a constructed type.
@@ -68,13 +68,13 @@
public ASN1Type(int tagClass, int tagNumber) {
if (tagNumber < 0) {
- throw new IllegalArgumentException(Messages.getString("security.102"));
+ throw new IllegalArgumentException(Messages.getString("security.102"));
}
if (tagClass != CLASS_UNIVERSAL && tagClass != CLASS_APPLICATION
&& tagClass != CLASS_CONTEXTSPECIFIC
&& tagClass != CLASS_PRIVATE) {
- throw new IllegalArgumentException(Messages.getString("security.103"));
+ throw new IllegalArgumentException(Messages.getString("security.103"));
}
if (tagNumber < 31) {
@@ -83,7 +83,7 @@
} else {
// long form
throw new IllegalArgumentException(
- Messages.getString("security.104"));
+ Messages.getString("security.104"));
}
this.constrId = this.id + PC_CONSTRUCTED;
}
@@ -133,7 +133,7 @@
/**
* Decodes ASN.1 type.
- *
+ *
* @param in -
* BER input stream
* @throws IOException -
@@ -143,7 +143,7 @@
/**
* Tests provided identifier.
- *
+ *
* @param identifier -
* identifier to be verified
* @return - true if identifier is associated with this ASN.1 type,
@@ -153,12 +153,12 @@
/**
* Creates decoded object.
- *
+ *
* Derived classes should override this method to provide creation for a
* selected class of objects during decoding.
- *
+ *
* The default implementation returns an object created by decoding stream.
- *
+ *
* @param -
* input stream
* @return - created object
@@ -208,7 +208,7 @@
public String toString() {
// TODO decide whether this method is necessary
//FIXME fix performance
- return this.getClass().getName() + "(tag: 0x"
- + Integer.toHexString(0xff & this.id) + ")";
+ return this.getClass().getName() + "(tag: 0x"
+ + Integer.toHexString(0xff & this.id) + ")";
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1TypeCollection.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1TypeCollection.java
index 6afb300..194604e 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1TypeCollection.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1TypeCollection.java
@@ -27,7 +27,7 @@
/**
* This abstract class represents ASN.1 type that is a collection of ASN.1 types.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -41,9 +41,9 @@
/**
* Constructs ASN.1 collection type.
- *
+ *
* @param tagNumber - ASN.1 tag number
- * @param type - a collection of one or more ASN.1 types.
+ * @param type - a collection of one or more ASN.1 types.
* @throws IllegalArgumentException - if tagNumber is invalid
*/
public ASN1TypeCollection(int tagNumber, ASN1Type[] type) {
@@ -83,16 +83,16 @@
/**
* Provides an object's values to be encoded
- *
+ *
* Derived classes should override this method to provide
- * encoding for a selected class of objects.
- *
+ * encoding for a selected class of objects.
+ *
* The default implementation throws RuntimeException.
*
* @param object - an object to be encoded
* @param values - an array to store an object's values to be encoded
*/
protected void getValues(Object object, Object[] values) {
- throw new RuntimeException(Messages.getString("security.101", getClass().getName()));
+ throw new RuntimeException(Messages.getString("security.101", getClass().getName()));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1UTCTime.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1UTCTime.java
index cb4e029..d7aef2c 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1UTCTime.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1UTCTime.java
@@ -30,7 +30,7 @@
/**
* This class represents ASN.1 UTCTime type
- *
+ *
* @see http://asn1.elibel.tm.fr/en/standards/index.htm
*/
public class ASN1UTCTime extends ASN1Time {
@@ -60,7 +60,7 @@
/**
* Constructs ASN.1 UTCTime type
- *
+ *
* The constructor is provided for inheritance purposes
* when there is a need to create a custom ASN.1 UTCTime type.
* To get a default implementation it is recommended to use
@@ -72,7 +72,7 @@
/**
* Returns ASN.1 UTCTime type default implementation
- *
+ *
* The default implementation works with encoding
* that is represented as Date object.
*
@@ -111,13 +111,13 @@
// According to X.680 coordinated universal time format:
// two digit year, seconds always presented,
// no fractional-seconds elements, 'Z' at the end
- private final static String UTC_PATTERN = "yyMMddHHmmss'Z'";
+ private final static String UTC_PATTERN = "yyMMddHHmmss'Z'";
public void setEncodingContent(BerOutputStream out) {
SimpleDateFormat sdf = new SimpleDateFormat(UTC_PATTERN);
- sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+ sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
- out.content = sdf.format(out.content).getBytes("UTF-8");
+ out.content = sdf.format(out.content).getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.getMessage());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1ValueCollection.java b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1ValueCollection.java
index ebcfbce..43c36c7 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ASN1ValueCollection.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ASN1ValueCollection.java
@@ -27,10 +27,10 @@
/**
* This abstract class represents ASN.1 collection type.
- *
+ *
* The value for such type is a collection of zero or
- * more occurrences of a provided type.
- *
+ * more occurrences of a provided type.
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -43,7 +43,7 @@
/**
* Constructs ASN1 collection type.
- *
+ *
* @param tagNumber - ASN.1 tag number
* @param type - ASN.1 type
*/
@@ -55,12 +55,12 @@
/**
* Provides an object's values to be encoded
- *
+ *
* Derived classes should override this method to provide
- * encoding for a selected class of objects.
- *
+ * encoding for a selected class of objects.
+ *
* @param - an object to be encoded
- * @return - a collection of object's values to be encoded
+ * @return - a collection of object's values to be encoded
*/
public Collection getValues(Object object) {
return (Collection)object;
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/BerInputStream.java b/luni/src/main/java/org/apache/harmony/security/asn1/BerInputStream.java
index 3186edf..7f2019b 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/BerInputStream.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/BerInputStream.java
@@ -31,7 +31,7 @@
/**
* Decodes ASN.1 types encoded with BER (X.690)
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -43,13 +43,13 @@
protected InputStream in;
/**
- * Internal buffer for storing encoded array
+ * Internal buffer for storing encoded array
*/
protected byte[] buffer;
/**
* The position in the buffer.
- *
+ *
* Next read must place data into the buffer from this offset
*/
protected int offset = 0;
@@ -60,13 +60,13 @@
private static final int BUF_INCREASE_SIZE = 1024 * 16;
/**
- * Indicates indefinite length of the current type
+ * Indicates indefinite length of the current type
*/
protected static final int INDEFINIT_LENGTH = -1;
/**
* Creates stream for decoding.
- *
+ *
* @param encoded - bytes array to be decoded
* @throws IOException - if an error occurs
*/
@@ -76,7 +76,7 @@
/**
* Creates stream for decoding.
- *
+ *
* @param encoded -
* bytes array to be decoded
* @param offset -
@@ -98,15 +98,15 @@
// compare expected and decoded length
if (length != INDEFINIT_LENGTH
&& (offset + expectedLength) != (this.offset + this.length)) {
- throw new ASN1Exception(Messages.getString("security.111"));
+ throw new ASN1Exception(Messages.getString("security.111"));
}
}
/**
* Creates stream for decoding.
- *
+ *
* Allocates initial buffer of default size
- *
+ *
* @param is associated <code>InputStream</code>
*/
public BerInputStream(InputStream in) throws IOException {
@@ -115,9 +115,9 @@
/**
* Creates stream for decoding.
- *
- * Allocates initial buffer of <code>initialSize</code> size
- *
+ *
+ * Allocates initial buffer of <code>initialSize</code> size
+ *
* @param initialSize the internal buffer initial size
* @param is associated <code>InputStream</code>
*/
@@ -138,13 +138,13 @@
}
} else {
isIndefinedLength = true;
- throw new ASN1Exception(Messages.getString("security.112"));
+ throw new ASN1Exception(Messages.getString("security.112"));
}
}
/**
* Resets this stream to initial state.
- *
+ *
* @param encoded - a new bytes array to be decoded
* @throws IOException - if an error occurs
*/
@@ -201,7 +201,7 @@
int numOctets = length & 0x7F;
if (numOctets > 5) {
- throw new ASN1Exception(Messages.getString("security.113",
+ throw new ASN1Exception(Messages.getString("security.113",
tagOffset)); //FIXME message
}
@@ -213,7 +213,7 @@
}
if (length > 0xFFFFFF) {
- throw new ASN1Exception(Messages.getString("security.113",
+ throw new ASN1Exception(Messages.getString("security.113",
tagOffset)); //FIXME message
}
}
@@ -246,7 +246,7 @@
/**
* Decodes ASN.1 bitstring type
- *
+ *
* @throws IOException - if error occured
*/
public void readBitString() throws IOException {
@@ -255,41 +255,41 @@
if (length == 0) {
throw new ASN1Exception(
- Messages.getString("security.114", tagOffset));
+ Messages.getString("security.114", tagOffset));
}
readContent();
// content: check unused bits
if (buffer[contentOffset] > 7) {
- throw new ASN1Exception(Messages.getString("security.115",
+ throw new ASN1Exception(Messages.getString("security.115",
contentOffset));
}
if (length == 1 && buffer[contentOffset] != 0) {
- throw new ASN1Exception(Messages.getString("security.116",
+ throw new ASN1Exception(Messages.getString("security.116",
contentOffset));
}
} else if (tag == ASN1Constants.TAG_C_BITSTRING) {
- throw new ASN1Exception(Messages.getString("security.117"));
+ throw new ASN1Exception(Messages.getString("security.117"));
} else {
throw new ASN1Exception(
- Messages.getString("security.118", tagOffset,
+ Messages.getString("security.118", tagOffset,
Integer.toHexString(tag)));
}
}
/**
* Decodes ASN.1 Enumerated type
- *
+ *
* @throws IOException - if error occured
*/
public void readEnumerated() throws IOException {
if (tag != ASN1Constants.TAG_ENUM) {
throw new ASN1Exception(
- Messages.getString("security.119", tagOffset,
+ Messages.getString("security.119", tagOffset,
Integer.toHexString(tag)));
}
@@ -313,20 +313,20 @@
}
if (bits == 0 || bits == 0x1FF) {
- throw new ASN1Exception(Messages.getString("security.11B", contentOffset));
+ throw new ASN1Exception(Messages.getString("security.11B", contentOffset));
}
}
}
/**
* Decodes ASN.1 boolean type
- *
+ *
* @throws IOException - if error occured
*/
public void readBoolean() throws IOException {
if (tag != ASN1Constants.TAG_BOOLEAN) {
- throw new ASN1Exception(Messages.getString("security.11C",
+ throw new ASN1Exception(Messages.getString("security.11C",
tagOffset, Integer.toHexString(tag)));
}
@@ -350,11 +350,11 @@
/**
* Decodes ASN.1 GeneralizedTime type
- *
+ *
* @throws IOException - if error occured
*/
public void readGeneralizedTime() throws IOException {
-
+
if (tag == ASN1Constants.TAG_GENERALIZEDTIME) {
// FIXME: any other optimizations?
@@ -365,14 +365,14 @@
// check syntax: the last char MUST be Z
if (buffer[offset - 1] != 'Z') {
// FIXME support only format that is acceptable for DER
- throw new ASN1Exception(Messages.getString("security.11E"));
+ throw new ASN1Exception(Messages.getString("security.11E"));
}
// check syntax: MUST be YYYYMMDDHHMMSS[(./,)DDD]'Z'
if (length != 15 && (length < 17 || length > 19)) // invalid
// length
{
- throw new ASN1Exception(Messages.getString("security.11F",
+ throw new ASN1Exception(Messages.getString("security.11F",
contentOffset));
}
@@ -381,7 +381,7 @@
byte char14 = buffer[contentOffset + 14];
if (char14 != '.' && char14 != ',') {
throw new ASN1Exception(
- Messages.getString("security.11F",
+ Messages.getString("security.11F",
contentOffset));
}
}
@@ -409,10 +409,10 @@
// FIXME check all values for valid numbers!!!
} else if (tag == ASN1Constants.TAG_C_GENERALIZEDTIME) {
- throw new ASN1Exception(Messages.getString("security.120"));
+ throw new ASN1Exception(Messages.getString("security.120"));
} else {
- throw new ASN1Exception(Messages.getString("security.121",
+ throw new ASN1Exception(Messages.getString("security.121",
tagOffset, Integer.toHexString(tag)));
}
}
@@ -433,9 +433,9 @@
case ASN1UTCTime.UTC_LOCAL_HM:
case ASN1UTCTime.UTC_LOCAL_HMS:
// FIXME only coordinated universal time formats are supported
- throw new ASN1Exception(Messages.getString("security.122"));
+ throw new ASN1Exception(Messages.getString("security.122"));
default:
- throw new ASN1Exception(Messages.getString("security.123",
+ throw new ASN1Exception(Messages.getString("security.123",
tagOffset));
}
@@ -447,7 +447,7 @@
// check syntax: the last char MUST be Z
if (buffer[offset - 1] != 'Z') {
- throw new ASN1Exception("ASN.1 UTCTime wrongly encoded at ["
+ throw new ASN1Exception("ASN.1 UTCTime wrongly encoded at ["
+ contentOffset + ']');
}
@@ -473,9 +473,9 @@
// FIXME check all time values for valid numbers!!!
} else if (tag == ASN1Constants.TAG_C_UTCTIME) {
- throw new ASN1Exception(Messages.getString("security.124"));
+ throw new ASN1Exception(Messages.getString("security.124"));
} else {
- throw new ASN1Exception(Messages.getString("security.125",
+ throw new ASN1Exception(Messages.getString("security.125",
tagOffset, Integer.toHexString(tag)));
}
}
@@ -490,7 +490,7 @@
for (int i = off, end = off + count; i < end; i++) {
c = buffer[i] - 48;
if (c < 0 || c > 9) {
- throw new ASN1Exception(Messages.getString("security.126"));
+ throw new ASN1Exception(Messages.getString("security.126"));
}
result = result * 10 + c;
}
@@ -499,20 +499,20 @@
/**
* Decodes ASN.1 Integer type
- *
+ *
* @throws IOException - if error occured
*/
public void readInteger() throws IOException {
if (tag != ASN1Constants.TAG_INTEGER) {
- throw new ASN1Exception(Messages.getString("security.127",
+ throw new ASN1Exception(Messages.getString("security.127",
tagOffset, Integer.toHexString(tag)));
}
// check encoded length
if (length < 1) {
- throw new ASN1Exception(Messages.getString("security.128",
- tagOffset));
+ throw new ASN1Exception(Messages.getString("security.128",
+ tagOffset));
}
readContent();
@@ -525,7 +525,7 @@
if (firstByte == 0 && secondByte == 0 || firstByte == (byte) 0xFF
&& secondByte == (byte) 0x80) {
- throw new ASN1Exception(Messages.getString("security.129",
+ throw new ASN1Exception(Messages.getString("security.129",
(offset - length)));
}
}
@@ -541,10 +541,10 @@
if (tag == ASN1Constants.TAG_OCTETSTRING) {
readContent();
} else if (tag == ASN1Constants.TAG_C_OCTETSTRING) {
- throw new ASN1Exception(Messages.getString("security.12A"));
+ throw new ASN1Exception(Messages.getString("security.12A"));
} else {
throw new ASN1Exception(
- Messages.getString("security.12B", tagOffset,
+ Messages.getString("security.12B", tagOffset,
Integer.toHexString(tag)));
}
}
@@ -560,25 +560,25 @@
public void readOID() throws IOException {
if (tag != ASN1Constants.TAG_OID) {
- throw new ASN1Exception(Messages.getString("security.12C",
+ throw new ASN1Exception(Messages.getString("security.12C",
tagOffset, Integer.toHexString(tag)));
}
// check encoded length
if (length < 1) {
- throw new ASN1Exception(Messages.getString("security.12D", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.12D", tagOffset));
}
readContent();
// check content: last encoded byte (8th bit MUST be zero)
if ((buffer[offset - 1] & 0x80) != 0) {
- throw new ASN1Exception(Messages.getString("security.12E", (offset - 1)));
+ throw new ASN1Exception(Messages.getString("security.12E", (offset - 1)));
}
oidElement = 1;
for (int i = 0; i < length; i++, ++oidElement) {
-
+
// According to ASN.1 BER spec:
// leading octet of subidentifier MUST not be 0x80
// This assertion is not verified
@@ -589,7 +589,7 @@
// + contentOffset
// + "]. Subidentifier MUST be encoded in minimum number of octets");
//}
-
+
while ((buffer[contentOffset + i] & 0x80) == 0x80) {
i++;
}
@@ -606,7 +606,7 @@
if (tag != ASN1Constants.TAG_C_SEQUENCE) {
throw new ASN1Exception(
- Messages.getString("security.12F", tagOffset,
+ Messages.getString("security.12F", tagOffset,
Integer.toHexString(tag)));
}
@@ -623,9 +623,9 @@
next();
while (!type[i].checkTag(tag)) {
- // check whether it is optional component or not
+ // check whether it is optional component or not
if (!sequence.OPTIONAL[i] || (i == type.length - 1)) {
- throw new ASN1Exception(Messages.getString("security.130",
+ throw new ASN1Exception(Messages.getString("security.130",
tagOffset));
}
i++;
@@ -637,7 +637,7 @@
// check the rest of components
for (; i < type.length; i++) {
if (!sequence.OPTIONAL[i]) {
- throw new ASN1Exception(Messages.getString("security.131",
+ throw new ASN1Exception(Messages.getString("security.131",
tagOffset));
}
}
@@ -651,9 +651,9 @@
next();
while (!type[i].checkTag(tag)) {
- // check whether it is optional component or not
+ // check whether it is optional component or not
if (!sequence.OPTIONAL[i] || (i == type.length - 1)) {
- throw new ASN1Exception(Messages.getString("security.132",
+ throw new ASN1Exception(Messages.getString("security.132",
tagOffset));
}
@@ -669,7 +669,7 @@
// check the rest of components
for (; i < type.length; i++) {
if (!sequence.OPTIONAL[i]) {
- throw new ASN1Exception(Messages.getString("security.133",
+ throw new ASN1Exception(Messages.getString("security.133",
tagOffset));
}
if (sequence.DEFAULT[i] != null) {
@@ -682,7 +682,7 @@
}
if (offset != endOffset) {
- throw new ASN1Exception(Messages.getString("security.134", begOffset));
+ throw new ASN1Exception(Messages.getString("security.134", begOffset));
}
}
@@ -693,9 +693,9 @@
* @throws IOException - if error occured
*/
public void readSequenceOf(ASN1SequenceOf sequenceOf) throws IOException {
-
+
if (tag != ASN1Constants.TAG_C_SEQUENCEOF) {
- throw new ASN1Exception(Messages.getString("security.135", tagOffset,
+ throw new ASN1Exception(Messages.getString("security.135", tagOffset,
Integer.toHexString(tag)));
}
@@ -709,13 +709,13 @@
* @throws IOException - if error occured
*/
public void readSet(ASN1Set set) throws IOException {
-
+
if (tag != ASN1Constants.TAG_C_SET) {
- throw new ASN1Exception(Messages.getString("security.136",
+ throw new ASN1Exception(Messages.getString("security.136",
tagOffset, Integer.toHexString(tag)));
}
- throw new ASN1Exception(Messages.getString("security.137"));
+ throw new ASN1Exception(Messages.getString("security.137"));
}
/**
@@ -725,9 +725,9 @@
* @throws IOException - if error occured
*/
public void readSetOf(ASN1SetOf setOf) throws IOException {
-
+
if (tag != ASN1Constants.TAG_C_SETOF) {
- throw new ASN1Exception(Messages.getString("security.138",
+ throw new ASN1Exception(Messages.getString("security.138",
tagOffset, Integer.toHexString(tag)));
}
@@ -763,7 +763,7 @@
}
if (offset != endOffset) {
- throw new ASN1Exception(Messages.getString("security.134", begOffset));
+ throw new ASN1Exception(Messages.getString("security.134", begOffset));
}
}
@@ -778,18 +778,18 @@
if (tag == type.id) {
readContent();
} else if (tag == type.constrId) {
- throw new ASN1Exception(Messages.getString("security.139"));
+ throw new ASN1Exception(Messages.getString("security.139"));
} else {
throw new ASN1Exception(
- Messages.getString("security.13A", tagOffset,
+ Messages.getString("security.13A", tagOffset,
Integer.toHexString(tag)));
}
}
/**
* Returns encoded array.
- *
- * MUST be invoked after decoding corresponding ASN.1 notation
+ *
+ * MUST be invoked after decoding corresponding ASN.1 notation
*/
public byte[] getEncoded() {
byte[] encoded = new byte[offset - tagOffset];
@@ -848,11 +848,11 @@
/**
* Indicates verify or store mode.
- *
+ *
* In store mode a decoded content is stored in a newly allocated
* appropriate object. The <code>content</code> variable holds
* a reference to the last created object.
- *
+ *
* In verify mode a decoded content is not stored.
*/
// FIXME it is used only for one case
@@ -869,7 +869,7 @@
/**
* Indicates defined or indefined reading mode for associated InputStream.
- *
+ *
* This mode is defined by reading a length
* for a first ASN.1 type from InputStream.
*/
@@ -884,7 +884,7 @@
protected int read() throws IOException {
if (offset == buffer.length) {
- throw new ASN1Exception(Messages.getString("security.13B"));
+ throw new ASN1Exception(Messages.getString("security.13B"));
}
if (in == null) {
@@ -892,11 +892,11 @@
} else {
int octet = in.read();
if (octet == -1) {
- throw new ASN1Exception(Messages.getString("security.13B"));
+ throw new ASN1Exception(Messages.getString("security.13B"));
}
-
+
buffer[offset++] = (byte) octet;
-
+
return octet;
}
}
@@ -909,7 +909,7 @@
*/
public void readContent() throws IOException {
if (offset + length > buffer.length) {
- throw new ASN1Exception(Messages.getString("security.13B"));
+ throw new ASN1Exception(Messages.getString("security.13B"));
}
if (in == null) {
@@ -924,7 +924,7 @@
do {
if (c < 1 || bytesRead > length) {
throw new ASN1Exception(Messages
- .getString("security.13C"));
+ .getString("security.13C"));
}
c = in.read(buffer, offset + bytesRead, length - bytesRead);
bytesRead += c;
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/BerOutputStream.java b/luni/src/main/java/org/apache/harmony/security/asn1/BerOutputStream.java
index eb018fd..f646e69 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/BerOutputStream.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/BerOutputStream.java
@@ -25,7 +25,7 @@
/**
* Encodes ASN.1 types with BER (X.690)
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -191,7 +191,7 @@
}
/*
- * LENGTH
+ * LENGTH
*/
public void getChoiceLength(ASN1Choice choice) {
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/BitString.java b/luni/src/main/java/org/apache/harmony/security/asn1/BitString.java
index d1130de..130f04a 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/BitString.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/BitString.java
@@ -26,7 +26,7 @@
/**
* Represents ASN.1 bit string value
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -39,7 +39,7 @@
/**
* Sequence of bits padded with unused bits.
- * @see #unusedBits
+ * @see #unusedBits
*/
public final byte[] bytes;
@@ -50,7 +50,7 @@
/**
* Constructs bit string
- *
+ *
* @param bytes - array of bytes that represents bit string,
* including unused bits
* @param unusedBits - number of unused bits
@@ -61,12 +61,12 @@
// constraints are set according X.690
if (unusedBits < 0 || unusedBits > 7) {
throw new IllegalArgumentException(
- Messages.getString("security.13D"));
+ Messages.getString("security.13D"));
}
if (bytes.length == 0 && unusedBits != 0) {
throw new IllegalArgumentException(
- Messages.getString("security.13E"));
+ Messages.getString("security.13E"));
}
this.bytes = bytes;
@@ -75,7 +75,7 @@
/**
* Constructs bit string from array of booleans
- *
+ *
* @param values - array of booleans
*/
public BitString(boolean[] values) {
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/DerInputStream.java b/luni/src/main/java/org/apache/harmony/security/asn1/DerInputStream.java
index 66d5ede..c68885e 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/DerInputStream.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/DerInputStream.java
@@ -29,7 +29,7 @@
/**
* Decodes ASN.1 types encoded with DER (X.690)
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -56,7 +56,7 @@
int tag = super.next();
if (length == INDEFINIT_LENGTH) {
- throw new ASN1Exception(Messages.getString("security.105"));
+ throw new ASN1Exception(Messages.getString("security.105"));
}
// FIXME add check: length encoding uses minimum number of octets
@@ -75,7 +75,7 @@
public void readBitString() throws IOException {
if (tag == ASN1Constants.TAG_C_BITSTRING) {
- throw new ASN1Exception(Messages.getString("security.106", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.106", tagOffset));
}
super.readBitString();
@@ -84,7 +84,7 @@
if (length > 1
&& buffer[contentOffset] != 0
&& (buffer[offset - 1] & UNUSED_BITS_MASK[buffer[contentOffset] - 1]) != 0) {
- throw new ASN1Exception(Messages.getString("security.107", contentOffset));
+ throw new ASN1Exception(Messages.getString("security.107", contentOffset));
}
}
@@ -97,7 +97,7 @@
// check encoded content
if (buffer[contentOffset] != 0 && buffer[contentOffset] != (byte) 0xFF) {
- throw new ASN1Exception(Messages.getString("security.108", contentOffset));
+ throw new ASN1Exception(Messages.getString("security.108", contentOffset));
}
}
@@ -108,7 +108,7 @@
if (tag == ASN1Constants.TAG_C_OCTETSTRING) {
throw new ASN1Exception(
- Messages.getString("security.109", tagOffset));
+ Messages.getString("security.109", tagOffset));
}
super.readOctetString();
}
@@ -145,7 +145,7 @@
public void readString(ASN1StringType type) throws IOException {
if (tag == type.constrId) {
- throw new ASN1Exception(Messages.getString("security.10A", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.10A", tagOffset));
}
super.readString(type);
}
@@ -157,12 +157,12 @@
if (tag == ASN1Constants.TAG_C_UTCTIME) {
// It is a string type and it can be encoded as primitive or constructed.
- throw new ASN1Exception(Messages.getString("security.10B", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.10B", tagOffset));
}
// check format: DER uses YYMMDDHHMMSS'Z' only
if (length != ASN1UTCTime.UTC_HMS) {
- throw new ASN1Exception(Messages.getString("security.10C", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.10C", tagOffset));
}
super.readUTCTime();
@@ -175,12 +175,12 @@
if (tag == ASN1Constants.TAG_C_GENERALIZEDTIME) {
// It is a string type and it can be encoded as primitive or constructed.
- throw new ASN1Exception(Messages.getString("security.10D", tagOffset));
+ throw new ASN1Exception(Messages.getString("security.10D", tagOffset));
}
super.readGeneralizedTime();
- // FIXME makes sense only if we support all GeneralizedTime formats
+ // FIXME makes sense only if we support all GeneralizedTime formats
// late check syntax: the last char MUST be Z
//if (buffer[offset - 1] != 'Z') {
// throw new ASN1Exception(
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/DerOutputStream.java b/luni/src/main/java/org/apache/harmony/security/asn1/DerOutputStream.java
index eb78d2c..e0e8a7d 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/DerOutputStream.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/DerOutputStream.java
@@ -25,7 +25,7 @@
/**
* Encodes ASN.1 types with DER (X.690)
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -140,7 +140,7 @@
}
/*
- * LENGTH
+ * LENGTH
*/
public void getChoiceLength(ASN1Choice choice) {
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/InformationObjectSet.java b/luni/src/main/java/org/apache/harmony/security/asn1/InformationObjectSet.java
index 06ada53..85cc2c5 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/InformationObjectSet.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/InformationObjectSet.java
@@ -28,8 +28,8 @@
/**
- * Represents Information Object Set.
- *
+ * Represents Information Object Set.
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -55,7 +55,7 @@
public void put(int[] oid, Object object) {
int index = hashIntArray(oid) % capacity;
- // look for OID in the pool
+ // look for OID in the pool
Entry[] list = pool[index];
int i = 0;
for (; list[i] != null; i++) {
@@ -76,7 +76,7 @@
public Object get(int[] oid) {
int index = hashIntArray(oid) % capacity;
- // look for OID in the pool
+ // look for OID in the pool
Entry[] list = pool[index];
for (int i = 0; list[i] != null; i++) {
if (Arrays.equals(oid, list[i].oid)) {
diff --git a/luni/src/main/java/org/apache/harmony/security/asn1/ObjectIdentifier.java b/luni/src/main/java/org/apache/harmony/security/asn1/ObjectIdentifier.java
index 9784bc0..ce36fcd 100644
--- a/luni/src/main/java/org/apache/harmony/security/asn1/ObjectIdentifier.java
+++ b/luni/src/main/java/org/apache/harmony/security/asn1/ObjectIdentifier.java
@@ -28,16 +28,16 @@
/**
* Instance of this class represents ObjectIdentifier (OID).
- *
+ *
* According to X.690:
* OID is represented as a sequence of subidentifier.
* Each subidentifier is represented as non negative integer value.
* There are at least 2 subidentifiers in the sequence.
- *
+ *
* Valid values for first subidentifier are 0, 1 and 2.
* If the first subidentifier has 0 or 1 value the second
* subidentifier must be less then 40.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -51,7 +51,7 @@
/**
* Creates ObjectIdentifier(OID) from array of integers.
- *
+ *
* @param oid - array of integers
* @throws IllegalArgumentException - if oid is invalid or null
*/
@@ -62,7 +62,7 @@
/**
* Creates ObjectIdentifier(OID) from string representation.
- *
+ *
* @param strOid - oid string
* @throws IllegalArgumentException - if oid string is invalid or null
*/
@@ -73,7 +73,7 @@
/**
* Returns array of integers.
- *
+ *
* @return array of integers
*/
public int[] getOid() {
@@ -82,7 +82,7 @@
/**
* Compares object with OID for equality.
- *
+ *
* @return true if object is ObjectIdentifier and it has the same
* representation as array of integers, otherwise false
*/
@@ -120,33 +120,33 @@
/**
* Validates ObjectIdentifier (OID).
- *
+ *
* @param oid - oid as array of integers
* @throws IllegalArgumentException - if oid is invalid or null
*/
public static void validate(int[] oid) {
if (oid == null) {
- throw new IllegalArgumentException(Messages.getString("security.98"));
+ throw new IllegalArgumentException(Messages.getString("security.98"));
}
if (oid.length < 2) {
throw new IllegalArgumentException(
- Messages.getString("security.99"));
+ Messages.getString("security.99"));
}
if (oid[0] > 2) {
throw new IllegalArgumentException(
- Messages.getString("security.9A"));
+ Messages.getString("security.9A"));
} else if (oid[0] != 2 && oid[1] > 39) {
throw new IllegalArgumentException(
- Messages.getString("security.9B"));
+ Messages.getString("security.9B"));
}
for (int i = 0; i < oid.length; i++) {
if (oid[i] < 0) {
throw new IllegalArgumentException(
- Messages.getString("security.9C"));
+ Messages.getString("security.9C"));
}
}
}
@@ -154,7 +154,7 @@
// FIXME: implement me
// /**
// * Validates ObjectIdentifier (OID).
- // *
+ // *
// * @param oid - oid as string
// * @throws IllegalArgumentException - if oid string is invalid or null
// */
@@ -235,9 +235,9 @@
/**
* Returns string representation of OID.
- *
+ *
* Note: it is supposed that passed array of integers
- * contains valid OID value, so no checks are performed.
+ * contains valid OID value, so no checks are performed.
*
* @param oid - oid as array of integers
* @return oid string representation
@@ -256,11 +256,11 @@
// BEGIN android-changed
/**
* Gets ObjectIdentifier (OID) from string representation.
- *
+ *
* String representation is defined by the following syntax:
* OID = subidentifier 1*("." subidentifier)
* subidentifier = 1*(digit)
- *
+ *
* @param oidString - string representation of OID
* @return - oid as array of integers
* @throws IllegalArgumentException - if oid string is invalid or null
@@ -268,13 +268,13 @@
public static int[] toIntArray(String str) {
return toIntArray(str, true);
}
-
+
/**
* Returns whether the given string is a valid ObjectIdentifier
* (OID) representation.
- *
+ *
* String representation is defined as for {@link #toIntArray}.
- *
+ *
* @param oidString - string representation of OID
* @return true if oidString has valid syntax or false if not
*/
@@ -284,11 +284,11 @@
/**
* Gets ObjectIdentifier (OID) from string representation.
- *
+ *
* String representation is defined by the following syntax:
* OID = subidentifier 1*("." subidentifier)
* subidentifier = 1*(digit)
- *
+ *
* @param oidString - string representation of OID
* @return - oid as array of integers or null if the oid string is
* invalid or null and shouldThrow is false
@@ -301,7 +301,7 @@
return null;
}
throw new IllegalArgumentException(
- Messages.getString("security.9D"));
+ Messages.getString("security.9D"));
}
int length = str.length();
@@ -309,7 +309,7 @@
if (! shouldThrow) {
return null;
}
- throw new IllegalArgumentException(Messages.getString("security.9E"));
+ throw new IllegalArgumentException(Messages.getString("security.9E"));
}
int count = 1; // number of subidentifiers
@@ -322,7 +322,7 @@
if (! shouldThrow) {
return null;
}
- throw new IllegalArgumentException(Messages.getString("security.9E"));
+ throw new IllegalArgumentException(Messages.getString("security.9E"));
}
wasDot = true;
count++;
@@ -332,7 +332,7 @@
if (! shouldThrow) {
return null;
}
- throw new IllegalArgumentException(Messages.getString("security.9E"));
+ throw new IllegalArgumentException(Messages.getString("security.9E"));
}
}
@@ -341,7 +341,7 @@
if (! shouldThrow) {
return null;
}
- throw new IllegalArgumentException(Messages.getString("security.9E"));
+ throw new IllegalArgumentException(Messages.getString("security.9E"));
}
if (count < 2) {
@@ -349,7 +349,7 @@
return null;
}
throw new IllegalArgumentException(
- Messages.getString("security.99"));
+ Messages.getString("security.99"));
}
int[] oid = new int[count];
@@ -367,13 +367,13 @@
return null;
}
throw new IllegalArgumentException(
- Messages.getString("security.9A"));
+ Messages.getString("security.9A"));
} else if (oid[0] != 2 && oid[1] > 39) {
if (! shouldThrow) {
return null;
}
throw new IllegalArgumentException(
- Messages.getString("security.9B"));
+ Messages.getString("security.9B"));
}
return oid;
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicy.java b/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicy.java
index c8de50a..e4eb0e9 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicy.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicy.java
@@ -45,7 +45,7 @@
* Default Policy implementation based on policy configuration files. This
* implementation recognizes text files, consisting of clauses with the
* following syntax:
- *
+ *
* <pre>
* keystore "some_keystore_url" [, "keystore_type"];
* </pre>
@@ -53,13 +53,13 @@
* grant [SignedBy "signer_names"] [, CodeBase "URL"]
* [, Principal [principal_class_name] "principal_name"]
* [, Principal [principal_class_name] "principal_name"] ... {
- * permission permission_class_name [ "target_name" ] [, "action"]
+ * permission permission_class_name [ "target_name" ] [, "action"]
* [, SignedBy "signer_names"];
* permission ...
* };
- *
+ *
* </pre>
- *
+ *
* The <i>keystore </i> clause specifies reference to a keystore, which is a
* database of private keys and their associated digital certificates. The
* keystore is used to look up the certificates of signers specified in the
@@ -132,7 +132,7 @@
* permissions for the requested objects (ProtectionDomains and CodeSources) via
* WeakHashMap; the cache is cleaned either explicitly during refresh()
* invocation, or naturally by garbage-collecting the corresponding objects.
- *
+ *
* @see org.apache.harmony.security.fortress.PolicyUtils#getPolicyURLs(
* Properties, String, String)
*/
@@ -142,12 +142,12 @@
/**
* System property for dynamically added policy location.
*/
- public static final String JAVA_SECURITY_POLICY = "java.security.policy";
+ public static final String JAVA_SECURITY_POLICY = "java.security.policy";
/**
* Prefix for numbered Policy locations specified in security.properties.
*/
- public static final String POLICY_URL_PREFIX = "policy.url.";
+ public static final String POLICY_URL_PREFIX = "policy.url.";
// A set of PolicyEntries constituting this Policy.
private final Set<PolicyEntry> grants = new HashSet<PolicyEntry>();
@@ -185,8 +185,8 @@
}
/**
- * Returns collection of permissions allowed for the domain
- * according to the policy. The evaluated characteristics of the
+ * Returns collection of permissions allowed for the domain
+ * according to the policy. The evaluated characteristics of the
* domain are it's codesource and principals; they are assumed
* to be <code>null</code> if the domain is <code>null</code>.
*/
@@ -225,8 +225,8 @@
}
/**
- * Returns collection of permissions allowed for the codesource
- * according to the policy.
+ * Returns collection of permissions allowed for the codesource
+ * according to the policy.
* The evaluation assumes that current principals are undefined.
*/
public PermissionCollection getPermissions(CodeSource cs) {
@@ -267,14 +267,14 @@
* failed loads are ignored. After processing all locations, old policy
* settings are discarded and new ones come into force. <br>
* This method is declared synchronized to avoid concurrent reloading.
- *
+ *
* @see PolicyUtils#getPolicyURLs(Properties, String, String)
*/
public synchronized void refresh() {
Set<PolicyEntry> fresh = new HashSet<PolicyEntry>();
Properties system = new Properties(AccessController
.doPrivileged(new PolicyUtils.SystemKit()));
- system.setProperty("/", File.separator);
+ system.setProperty("/", File.separator);
URL[] policyLocations = PolicyUtils.getPolicyURLs(system,
JAVA_SECURITY_POLICY,
POLICY_URL_PREFIX);
@@ -285,7 +285,7 @@
fresh.addAll(parser.parse(policyLocations[i], system));
} catch (Exception e) {
// TODO log warning
- //System.err.println("Ignoring policy file: "
+ //System.err.println("Ignoring policy file: "
// + policyLocations[i] + ". Reason:\n"+ e);
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicyParser.java b/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicyParser.java
index f43cf31..ba59ec8 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicyParser.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/DefaultPolicyParser.java
@@ -57,20 +57,20 @@
/**
- * This is a basic loader of policy files. It delegates lexical analysis to
- * a pluggable scanner and converts received tokens to a set of
- * {@link org.apache.harmony.security.PolicyEntry PolicyEntries}.
- * For details of policy format, see the
+ * This is a basic loader of policy files. It delegates lexical analysis to
+ * a pluggable scanner and converts received tokens to a set of
+ * {@link org.apache.harmony.security.PolicyEntry PolicyEntries}.
+ * For details of policy format, see the
* {@link org.apache.harmony.security.DefaultPolicy default policy description}.
* <br>
- * For ordinary uses, this class has just one public method <code>parse()</code>,
+ * For ordinary uses, this class has just one public method <code>parse()</code>,
* which performs the main task.
- * Extensions of this parser may redefine specific operations separately,
- * by overriding corresponding protected methods.
+ * Extensions of this parser may redefine specific operations separately,
+ * by overriding corresponding protected methods.
* <br>
- * This implementation is effectively thread-safe, as it has no field references
+ * This implementation is effectively thread-safe, as it has no field references
* to data being processed (that is, passes all the data as method parameters).
- *
+ *
* @see org.apache.harmony.security.DefaultPolicy
* @see org.apache.harmony.security.DefaultPolicyScanner
* @see org.apache.harmony.security.PolicyEntry
@@ -80,16 +80,16 @@
// Pluggable scanner for a specific file format
private final DefaultPolicyScanner scanner;
- /**
- * Default constructor,
- * {@link org.apache.harmony.security.DefaultPolicyScanner DefaultPolicyScanner}
- * is used.
+ /**
+ * Default constructor,
+ * {@link org.apache.harmony.security.DefaultPolicyScanner DefaultPolicyScanner}
+ * is used.
*/
public DefaultPolicyParser() {
scanner = new DefaultPolicyScanner();
}
- /**
+ /**
* Extension constructor for plugging-in custom scanner.
*/
public DefaultPolicyParser(DefaultPolicyScanner s) {
@@ -98,18 +98,18 @@
/**
* This is the main business method. It manages loading process as follows:
- * the associated scanner is used to parse the stream to a set of
+ * the associated scanner is used to parse the stream to a set of
* {@link org.apache.harmony.security.DefaultPolicyScanner.GrantEntry composite tokens},
* then this set is iterated and each token is translated to a PolicyEntry.
* Semantically invalid tokens are ignored, the same as void PolicyEntries.
* <br>
* A policy file may refer to some KeyStore(s), and in this case the first
- * valid reference is initialized and used in processing tokens.
- *
+ * valid reference is initialized and used in processing tokens.
+ *
* @param location an URL of a policy file to be loaded
* @param system system properties, used for property expansion
* @return a collection of PolicyEntry objects, may be empty
- * @throws Exception IO error while reading location or file syntax error
+ * @throws Exception IO error while reading location or file syntax error
*/
public Collection<PolicyEntry>parse(URL location, Properties system)
throws Exception {
@@ -153,33 +153,33 @@
}
/**
- * Translates GrantEntry token to PolicyEntry object. It goes step by step,
+ * Translates GrantEntry token to PolicyEntry object. It goes step by step,
* trying to resolve each component of the GrantEntry:
* <ul>
* <li> If <code>codebase</code> is specified, expand it and construct an URL.
- * <li> If <code>signers</code> is specified, expand it and obtain
+ * <li> If <code>signers</code> is specified, expand it and obtain
* corresponding Certificates.
- * <li> If <code>principals</code> collection is specified, iterate over it.
- * For each PrincipalEntry, expand name and if no class specified,
- * resolve actual X500Principal from a KeyStore certificate; otherwise keep it
- * as UnresolvedPrincipal.
+ * <li> If <code>principals</code> collection is specified, iterate over it.
+ * For each PrincipalEntry, expand name and if no class specified,
+ * resolve actual X500Principal from a KeyStore certificate; otherwise keep it
+ * as UnresolvedPrincipal.
* <li> Iterate over <code>permissions</code> collection. For each PermissionEntry,
- * try to resolve (see method
- * {@link #resolvePermission(DefaultPolicyScanner.PermissionEntry, DefaultPolicyScanner.GrantEntry, KeyStore, Properties, boolean) resolvePermission()})
- * a corresponding permission. If resolution failed, ignore the PermissionEntry.
+ * try to resolve (see method
+ * {@link #resolvePermission(DefaultPolicyScanner.PermissionEntry, DefaultPolicyScanner.GrantEntry, KeyStore, Properties, boolean) resolvePermission()})
+ * a corresponding permission. If resolution failed, ignore the PermissionEntry.
* </ul>
* In fact, property expansion in the steps above is conditional and is ruled by
- * the parameter <i>resolve</i>.
+ * the parameter <i>resolve</i>.
* <br>
- * Finally a new PolicyEntry is created, which associates the trinity
+ * Finally a new PolicyEntry is created, which associates the trinity
* of resolved URL, Certificates and Principals to a set of granted Permissions.
- *
+ *
* @param ge GrantEntry token to be resolved
- * @param ks KeyStore for resolving Certificates, may be <code>null</code>
- * @param system system properties, used for property expansion
+ * @param ks KeyStore for resolving Certificates, may be <code>null</code>
+ * @param system system properties, used for property expansion
* @param resolve flag enabling/disabling property expansion
* @return resolved PolicyEntry
- * @throws Exception if unable to resolve codebase, signers or principals
+ * @throws Exception if unable to resolve codebase, signers or principals
* of the GrantEntry
* @see DefaultPolicyScanner.PrincipalEntry
* @see DefaultPolicyScanner.PermissionEntry
@@ -236,21 +236,21 @@
/**
* Translates PermissionEntry token to Permission object.
* First, it performs general expansion for non-null <code>name</code> and
- * properties expansion for non-null <code>name</code>, <code>action</code>
+ * properties expansion for non-null <code>name</code>, <code>action</code>
* and <code>signers</code>.
- * Then, it obtains signing Certificates(if any), tries to find a class specified by
+ * Then, it obtains signing Certificates(if any), tries to find a class specified by
* <code>klass</code> name and instantiate a corresponding permission object.
* If class is not found or it is signed improperly, returns UnresolvedPermission.
*
* @param pe PermissionEntry token to be resolved
- * @param ge parental GrantEntry of the PermissionEntry
+ * @param ge parental GrantEntry of the PermissionEntry
* @param ks KeyStore for resolving Certificates, may be <code>null</code>
* @param system system properties, used for property expansion
* @param resolve flag enabling/disabling property expansion
* @return resolved Permission object, either of concrete class or UnresolvedPermission
- * @throws Exception if failed to expand properties,
- * or to get a Certificate,
- * or to create an instance of a successfully found class
+ * @throws Exception if failed to expand properties,
+ * or to get a Certificate,
+ * or to create an instance of a successfully found class
*/
protected Permission resolvePermission(
DefaultPolicyScanner.PermissionEntry pe,
@@ -285,8 +285,8 @@
return new UnresolvedPermission(pe.klass, pe.name, pe.actions, signers);
}
- /**
- * Specific handler for expanding <i>self</i> and <i>alias</i> protocols.
+ /**
+ * Specific handler for expanding <i>self</i> and <i>alias</i> protocols.
*/
class PermissionExpander implements PolicyUtils.GeneralExpansionHandler {
@@ -296,8 +296,8 @@
// Store GrantEntry
private DefaultPolicyScanner.GrantEntry ge;
- /**
- * Combined setter of all required fields.
+ /**
+ * Combined setter of all required fields.
*/
public PermissionExpander configure(DefaultPolicyScanner.GrantEntry ge,
KeyStore ks) {
@@ -310,24 +310,24 @@
* Resolves the following protocols:
* <dl>
* <dt>self
- * <dd>Denotes substitution to a principal information of the parental
- * GrantEntry. Returns a space-separated list of resolved Principals
+ * <dd>Denotes substitution to a principal information of the parental
+ * GrantEntry. Returns a space-separated list of resolved Principals
* (including wildcarded), formatting each as <b>class "name"</b>.
* If parental GrantEntry has no Principals, throws ExpansionFailedException.
* <dt>alias:<i>name</i>
- * <dd>Denotes substitution of a KeyStore alias. Namely, if a KeyStore has
- * an X.509 certificate associated with the specified name, then returns
- * <b>javax.security.auth.x500.X500Principal "<i>DN</i>"</b> string,
- * where <i>DN</i> is a certificate's subject distinguished name.
+ * <dd>Denotes substitution of a KeyStore alias. Namely, if a KeyStore has
+ * an X.509 certificate associated with the specified name, then returns
+ * <b>javax.security.auth.x500.X500Principal "<i>DN</i>"</b> string,
+ * where <i>DN</i> is a certificate's subject distinguished name.
* </dl>
- * @throws ExpansionFailedException - if protocol is other than
- * <i>self</i> or <i>alias</i>, or if data resolution failed
+ * @throws ExpansionFailedException - if protocol is other than
+ * <i>self</i> or <i>alias</i>, or if data resolution failed
*/
public String resolve(String protocol, String data)
throws PolicyUtils.ExpansionFailedException {
- if ("self".equals(protocol)) {
- //need expanding to list of principals in grant clause
+ if ("self".equals(protocol)) {
+ //need expanding to list of principals in grant clause
if (ge.principals != null && ge.principals.size() != 0) {
StringBuilder sb = new StringBuilder();
for (Iterator<PrincipalEntry> iter = ge.principals.iterator(); iter
@@ -342,62 +342,62 @@
}
catch (Exception e) {
throw new PolicyUtils.ExpansionFailedException(
- Messages.getString("security.143", pr.name), e);
+ Messages.getString("security.143", pr.name), e);
}
} else {
- sb.append(pr.klass).append(" \"").append(pr.name)
- .append("\" ");
+ sb.append(pr.klass).append(" \"").append(pr.name)
+ .append("\" ");
}
}
return sb.toString();
} else {
throw new PolicyUtils.ExpansionFailedException(
- Messages.getString("security.144"));
+ Messages.getString("security.144"));
}
}
- if ("alias".equals(protocol)) {
+ if ("alias".equals(protocol)) {
try {
return pc2str(getPrincipalByAlias(ks, data));
}
catch (Exception e) {
throw new PolicyUtils.ExpansionFailedException(
- Messages.getString("security.143", data), e);
+ Messages.getString("security.143", data), e);
}
}
throw new PolicyUtils.ExpansionFailedException(
- Messages.getString("security.145", protocol));
+ Messages.getString("security.145", protocol));
}
- // Formats a string describing the passed Principal.
+ // Formats a string describing the passed Principal.
private String pc2str(Principal pc) {
String klass = pc.getClass().getName();
String name = pc.getName();
StringBuilder sb = new StringBuilder(klass.length() + name.length()
+ 5);
- return sb.append(klass).append(" \"").append(name).append("\"")
+ return sb.append(klass).append(" \"").append(name).append("\"")
.toString();
}
}
/**
- * Takes a comma-separated list of aliases and obtains corresponding
+ * Takes a comma-separated list of aliases and obtains corresponding
* certificates.
- * @param ks KeyStore for resolving Certificates, may be <code>null</code>
- * @param signers comma-separated list of certificate aliases,
+ * @param ks KeyStore for resolving Certificates, may be <code>null</code>
+ * @param signers comma-separated list of certificate aliases,
* must be not <code>null</code>
* @return an array of signing Certificates
- * @throws Exception if KeyStore is <code>null</code>
- * or if it failed to provide a certificate
+ * @throws Exception if KeyStore is <code>null</code>
+ * or if it failed to provide a certificate
*/
protected Certificate[] resolveSigners(KeyStore ks, String signers)
throws Exception {
if (ks == null) {
- throw new KeyStoreException(Messages.getString("security.146",
+ throw new KeyStoreException(Messages.getString("security.146",
signers));
}
Collection<Certificate> certs = new HashSet<Certificate>();
- StringTokenizer snt = new StringTokenizer(signers, ",");
+ StringTokenizer snt = new StringTokenizer(signers, ",");
while (snt.hasMoreTokens()) {
//XXX cache found certs ??
certs.add(ks.getCertificate(snt.nextToken().trim()));
@@ -406,29 +406,29 @@
}
/**
- * Returns a subject's X500Principal of an X509Certificate,
- * which is associated with the specified keystore alias.
+ * Returns a subject's X500Principal of an X509Certificate,
+ * which is associated with the specified keystore alias.
* @param ks KeyStore for resolving Certificate, may be <code>null</code>
* @param alias alias to a certificate
* @return X500Principal with a subject distinguished name
- * @throws KeyStoreException if KeyStore is <code>null</code>
+ * @throws KeyStoreException if KeyStore is <code>null</code>
* or if it failed to provide a certificate
- * @throws CertificateException if found certificate is not
- * an X509Certificate
+ * @throws CertificateException if found certificate is not
+ * an X509Certificate
*/
protected Principal getPrincipalByAlias(KeyStore ks, String alias)
throws KeyStoreException, CertificateException {
if (ks == null) {
throw new KeyStoreException(
- Messages.getString("security.147", alias));
+ Messages.getString("security.147", alias));
}
//XXX cache found certs ??
Certificate x509 = ks.getCertificate(alias);
if (x509 instanceof X509Certificate) {
return ((X509Certificate) x509).getSubjectX500Principal();
} else {
- throw new CertificateException(Messages.getString("security.148",
+ throw new CertificateException(Messages.getString("security.148",
alias, x509));
}
}
@@ -437,9 +437,9 @@
* Returns the first successfully loaded KeyStore, from the specified list of
* possible locations. This method iterates over the list of KeystoreEntries;
* for each entry expands <code>url</code> and <code>type</code>,
- * tries to construct instances of specified URL and KeyStore and to load
- * the keystore. If it is loaded, returns the keystore, otherwise proceeds to
- * the next KeystoreEntry.
+ * tries to construct instances of specified URL and KeyStore and to load
+ * the keystore. If it is loaded, returns the keystore, otherwise proceeds to
+ * the next KeystoreEntry.
* <br>
* <b>Note:</b> an url may be relative to the policy file location or absolute.
* @param keystores list of available KeystoreEntries
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/Engine.java b/luni/src/main/java/org/apache/harmony/security/fortress/Engine.java
index bddbe54..e11c951 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/Engine.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/Engine.java
@@ -30,9 +30,9 @@
/**
- *
+ *
* This class implements common functionality for all engine classes
- *
+ *
*/
public class Engine {
@@ -65,7 +65,7 @@
/**
* Creates a Engine object
- *
+ *
* @param service
*/
public Engine(String service) {
@@ -73,10 +73,10 @@
}
/**
- *
+ *
* Finds the appropriate service implementation and creates instance of the
* class that implements corresponding Service Provider Interface.
- *
+ *
* @param algorithm
* @param service
* @throws NoSuchAlgorithmException
@@ -86,7 +86,7 @@
Provider.Service serv;
if (algorithm == null) {
- throw new NoSuchAlgorithmException(Messages.getString("security.149"));
+ throw new NoSuchAlgorithmException(Messages.getString("security.149"));
}
Services.refresh();
if (returnedService != null
@@ -95,14 +95,14 @@
serv = returnedService;
} else {
if (Services.isEmpty()) {
- throw new NoSuchAlgorithmException(Messages.getString("security.14A",
+ throw new NoSuchAlgorithmException(Messages.getString("security.14A",
serviceName, algorithm));
}
serv = Services.getService(new StringBuilder(128)
- .append(serviceName).append(".").append(
+ .append(serviceName).append(".").append(
Util.toUpperCase(algorithm)).toString());
if (serv == null) {
- throw new NoSuchAlgorithmException(Messages.getString("security.14A",
+ throw new NoSuchAlgorithmException(Messages.getString("security.14A",
serviceName, algorithm));
}
returnedService = serv;
@@ -114,10 +114,10 @@
}
/**
- *
+ *
* Finds the appropriate service implementation and creates instance of the
* class that implements corresponding Service Provider Interface.
- *
+ *
* @param algorithm
* @param service
* @param provider
@@ -129,11 +129,11 @@
Provider.Service serv = null;
if (algorithm == null) {
throw new NoSuchAlgorithmException(
- Messages.getString("security.14B", serviceName));
+ Messages.getString("security.14B", serviceName));
}
serv = provider.getService(serviceName, algorithm);
if (serv == null) {
- throw new NoSuchAlgorithmException(Messages.getString("security.14A",
+ throw new NoSuchAlgorithmException(Messages.getString("security.14A",
serviceName, algorithm));
}
spi = serv.newInstance(param);
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/PolicyUtils.java b/luni/src/main/java/org/apache/harmony/security/fortress/PolicyUtils.java
index 6674213..3744646 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/PolicyUtils.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/PolicyUtils.java
@@ -45,33 +45,33 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * This class consist of a number of static methods, which provide a common functionality
- * for various policy and configuration providers.
- *
+ * This class consist of a number of static methods, which provide a common functionality
+ * for various policy and configuration providers.
+ *
*/
public class PolicyUtils {
// No reason to instantiate
private PolicyUtils() {}
-
+
/**
* Auxiliary action for opening InputStream from specified location.
*/
public static class URLLoader implements PrivilegedExceptionAction<InputStream> {
- /**
- * URL of target location.
+ /**
+ * URL of target location.
*/
public URL location;
/**
- * Constructor with target URL parameter.
+ * Constructor with target URL parameter.
*/
public URLLoader(URL location) {
this.location = location;
}
- /**
+ /**
* Returns InputStream from the target URL.
*/
public InputStream run() throws Exception {
@@ -79,12 +79,12 @@
}
}
- /**
- * Auxiliary action for accessing system properties in a bundle.
+ /**
+ * Auxiliary action for accessing system properties in a bundle.
*/
public static class SystemKit implements PrivilegedAction<Properties> {
- /**
+ /**
* Returns system properties.
*/
public Properties run() {
@@ -92,50 +92,50 @@
}
}
- /**
- * Auxiliary action for accessing specific system property.
+ /**
+ * Auxiliary action for accessing specific system property.
*/
public static class SystemPropertyAccessor implements PrivilegedAction<String> {
- /**
+ /**
* A key of a required system property.
*/
public String key;
- /**
- * Constructor with a property key parameter.
+ /**
+ * Constructor with a property key parameter.
*/
public SystemPropertyAccessor(String key) {
this.key = key;
}
- /**
- * Handy one-line replacement of
- * "provide key and supply action" code block,
- * for reusing existing action instance.
+ /**
+ * Handy one-line replacement of
+ * "provide key and supply action" code block,
+ * for reusing existing action instance.
*/
public PrivilegedAction<String> key(String key) {
this.key = key;
return this;
}
- /**
- * Returns specified system property.
+ /**
+ * Returns specified system property.
*/
public String run() {
return System.getProperty(key);
}
}
- /**
- * Auxiliary action for accessing specific security property.
+ /**
+ * Auxiliary action for accessing specific security property.
*/
public static class SecurityPropertyAccessor implements PrivilegedAction<String> {
private String key;
-
- /**
- * Constructor with a property key parameter.
+
+ /**
+ * Constructor with a property key parameter.
*/
public SecurityPropertyAccessor(String key) {
super();
@@ -146,29 +146,29 @@
this.key = key;
return this;
}
-
- /**
- * Returns specified security property.
+
+ /**
+ * Returns specified security property.
*/
public String run() {
return Security.getProperty(key);
}
}
-
- /**
+
+ /**
* Auxiliary action for loading a provider by specific security property.
*/
public static class ProviderLoader<T> implements PrivilegedAction<T> {
private String key;
-
+
/**
* Acceptable provider superclass.
*/
private Class<T> expectedType;
-
- /**
- * Constructor taking property key and acceptable provider
+
+ /**
+ * Constructor taking property key and acceptable provider
* superclass parameters.
*/
public ProviderLoader(String key, Class<T> expected) {
@@ -177,18 +177,18 @@
this.expectedType = expected;
}
- /**
+ /**
* Returns provider instance by specified security property.
* The <code>key</code> should map to a fully qualified classname.
- *
- * @throws SecurityException if no value specified for the key
- * in security properties or if an Exception has occurred
+ *
+ * @throws SecurityException if no value specified for the key
+ * in security properties or if an Exception has occurred
* during classloading and instantiating.
*/
public T run() {
String klassName = Security.getProperty(key);
if (klassName == null || klassName.length() == 0) {
- throw new SecurityException(Messages.getString("security.14C",
+ throw new SecurityException(Messages.getString("security.14C",
key));
}
// TODO accurate classloading
@@ -196,7 +196,7 @@
Class<?> klass = Class.forName(klassName, true,
Thread.currentThread().getContextClassLoader());
if (expectedType != null && klass.isAssignableFrom(expectedType)){
- throw new SecurityException(Messages.getString("security.14D",
+ throw new SecurityException(Messages.getString("security.14D",
klassName, expectedType.getName()));
}
//FIXME expectedType.cast(klass.newInstance());
@@ -208,16 +208,16 @@
catch (Exception e) {
// TODO log error ??
SecurityException se = new SecurityException(
- Messages.getString("security.14E", klassName));
+ Messages.getString("security.14E", klassName));
se.initCause(e);
throw se;
}
}
}
- /**
- * Specific exception to signal that property expansion failed
- * due to unknown key.
+ /**
+ * Specific exception to signal that property expansion failed
+ * due to unknown key.
*/
public static class ExpansionFailedException extends Exception {
@@ -226,15 +226,15 @@
*/
private static final long serialVersionUID = 2869748055182612000L;
- /**
- * Constructor with user-friendly message parameter.
+ /**
+ * Constructor with user-friendly message parameter.
*/
public ExpansionFailedException(String message) {
super(message);
}
- /**
- * Constructor with user-friendly message and causing error.
+ /**
+ * Constructor with user-friendly message and causing error.
*/
public ExpansionFailedException(String message, Throwable cause) {
super(message, cause);
@@ -242,18 +242,18 @@
}
/**
- * Substitutes all entries like ${some.key}, found in specified string,
+ * Substitutes all entries like ${some.key}, found in specified string,
* for specified values.
- * If some key is unknown, throws ExpansionFailedException.
+ * If some key is unknown, throws ExpansionFailedException.
* @param str the string to be expanded
- * @param properties available key-value mappings
+ * @param properties available key-value mappings
* @return expanded string
* @throws ExpansionFailedException
*/
public static String expand(String str, Properties properties)
throws ExpansionFailedException {
- final String START_MARK = "${";
- final String END_MARK = "}";
+ final String START_MARK = "${";
+ final String END_MARK = "}";
final int START_OFFSET = START_MARK.length();
final int END_OFFSET = END_MARK.length();
@@ -268,7 +268,7 @@
result.replace(start, end + END_OFFSET, value);
start += value.length();
} else {
- throw new ExpansionFailedException(Messages.getString("security.14F", key));
+ throw new ExpansionFailedException(Messages.getString("security.14F", key));
}
}
start = result.indexOf(START_MARK, start);
@@ -277,7 +277,7 @@
}
/**
- * Handy shortcut for
+ * Handy shortcut for
* <code>expand(str, properties).replace(File.separatorChar, '/')</code>.
* @see #expand(String, Properties)
*/
@@ -285,16 +285,16 @@
throws ExpansionFailedException {
return expand(str, properties).replace(File.separatorChar, '/');
}
-
+
/**
* Normalizes URLs to standard ones, eliminating pathname symbols.
- *
+ *
* @param codebase -
* the original URL.
* @return - the normalized URL.
*/
public static URL normalizeURL(URL codebase) {
- if (codebase != null && "file".equals(codebase.getProtocol())) {
+ if (codebase != null && "file".equals(codebase.getProtocol())) {
try {
if (codebase.getHost().length() == 0) {
String path = codebase.getFile();
@@ -319,7 +319,7 @@
/**
* Converts a file path to URI without accessing file system
* (like {File#toURI()} does).
- *
+ *
* @param path -
* file path.
* @return - the resulting URI.
@@ -328,17 +328,17 @@
public static URI filePathToURI(String path) throws URISyntaxException {
path = path.replace(File.separatorChar, '/');
- if (!path.startsWith("/")) {
- return new URI("file", null,
+ if (!path.startsWith("/")) {
+ return new URI("file", null,
new StringBuilder(path.length() + 1).append('/')
.append(path).toString(), null, null);
}
- return new URI("file", null, path, null, null);
+ return new URI("file", null, path, null, null);
}
/**
- * Instances of this interface are intended for resolving
- * generalized expansion expressions, of the form ${{protocol:data}}.
+ * Instances of this interface are intended for resolving
+ * generalized expansion expressions, of the form ${{protocol:data}}.
* Such functionality is applicable to security policy files, for example.
* @see #expandGeneral(String, GeneralExpansionHandler)
*/
@@ -356,20 +356,20 @@
}
/**
- * Substitutes all entries like ${{protocol:data}}, found in specified string,
+ * Substitutes all entries like ${{protocol:data}}, found in specified string,
* for values resolved by passed handler.
- * The data part may be empty, and in this case expression
+ * The data part may be empty, and in this case expression
* may have simplified form, as ${{protocol}}.
* If some entry cannot be resolved, throws ExpansionFailedException;
* @param str the string to be expanded
- * @param handler the handler to resolve data denoted by protocol
+ * @param handler the handler to resolve data denoted by protocol
* @return expanded string
* @throws ExpansionFailedException
*/
public static String expandGeneral(String str,
GeneralExpansionHandler handler) throws ExpansionFailedException {
- final String START_MARK = "${{";
- final String END_MARK = "}}";
+ final String START_MARK = "${{";
+ final String END_MARK = "}}";
final int START_OFFSET = START_MARK.length();
final int END_OFFSET = END_MARK.length();
@@ -393,35 +393,35 @@
return result.toString();
}
- /**
- * A key to security properties, deciding whether usage of
- * dynamic policy location via system properties is allowed.
+ /**
+ * A key to security properties, deciding whether usage of
+ * dynamic policy location via system properties is allowed.
* @see #getPolicyURLs(Properties, String, String)
*/
- public static final String POLICY_ALLOW_DYNAMIC = "policy.allowSystemProperty";
+ public static final String POLICY_ALLOW_DYNAMIC = "policy.allowSystemProperty";
- /**
- * A key to security properties, deciding whether expansion of
- * system properties is allowed
+ /**
+ * A key to security properties, deciding whether expansion of
+ * system properties is allowed
* (in security properties values, policy files, etc).
- * @see #expand(String, Properties)
+ * @see #expand(String, Properties)
*/
- public static final String POLICY_EXPAND = "policy.expandProperties";
+ public static final String POLICY_EXPAND = "policy.expandProperties";
- /**
+ /**
* Positive value of switching properties.
*/
- public static final String TRUE = "true";
+ public static final String TRUE = "true";
- /**
+ /**
* Negative value of switching properties.
*/
- public static final String FALSE = "false";
+ public static final String FALSE = "false";
- /**
- * Returns false if current security settings disable to perform
+ /**
+ * Returns false if current security settings disable to perform
* properties expansion, true otherwise.
- * @see #expand(String, Properties)
+ * @see #expand(String, Properties)
*/
public static boolean canExpandProperties() {
return !Util.equalsIgnoreCase(FALSE,AccessController
@@ -432,29 +432,29 @@
* Obtains a list of locations for a policy or configuration provider.
* The search algorithm is as follows:
* <ol>
- * <li> Look in security properties for keys of form <code>prefix + n</code>,
- * where <i>n</i> is an integer and <i>prefix</i> is a passed parameter.
- * Sequence starts with <code>n=1</code>, and keeps incrementing <i>n</i>
- * until next key is not found. <br>
- * For each obtained key, try to construct an URL instance. On success,
+ * <li> Look in security properties for keys of form <code>prefix + n</code>,
+ * where <i>n</i> is an integer and <i>prefix</i> is a passed parameter.
+ * Sequence starts with <code>n=1</code>, and keeps incrementing <i>n</i>
+ * until next key is not found. <br>
+ * For each obtained key, try to construct an URL instance. On success,
* add the URL to the list; otherwise ignore it.
* <li>
- * If security settings do not prohibit (through
- * {@link #POLICY_ALLOW_DYNAMIC the "policy.allowSystemProperty" property})
- * to use additional policy location, read the system property under the
- * passed key parameter. If property exists, it may designate a file or
- * an absolute URL. Thus, first check if there is a file with that name,
- * and if so, convert the pathname to URL. Otherwise, try to instantiate
- * an URL directly. If succeeded, append the URL to the list
+ * If security settings do not prohibit (through
+ * {@link #POLICY_ALLOW_DYNAMIC the "policy.allowSystemProperty" property})
+ * to use additional policy location, read the system property under the
+ * passed key parameter. If property exists, it may designate a file or
+ * an absolute URL. Thus, first check if there is a file with that name,
+ * and if so, convert the pathname to URL. Otherwise, try to instantiate
+ * an URL directly. If succeeded, append the URL to the list
* <li>
- * If the additional location from the step above was specified to the
- * system via "==" (i.e. starts with '='), discard all URLs above
+ * If the additional location from the step above was specified to the
+ * system via "==" (i.e. starts with '='), discard all URLs above
* and use this only URL.
- * </ol>
+ * </ol>
* <b>Note:</b> all property values (both security and system) related to URLs are
- * subject to {@link #expand(String, Properties) property expansion}, regardless
- * of the "policy.expandProperties" security setting.
- *
+ * subject to {@link #expand(String, Properties) property expansion}, regardless
+ * of the "policy.expandProperties" security setting.
+ *
* @param system system properties
* @param systemUrlKey key to additional policy location
* @param securityUrlPrefix prefix to numbered locations in security properties
@@ -474,7 +474,7 @@
.doPrivileged(security.key(POLICY_ALLOW_DYNAMIC)))) {
String location = system.getProperty(systemUrlKey);
if (location != null) {
- if (location.startsWith("=")) {
+ if (location.startsWith("=")) {
//overrides all other urls
dynamicOnly = true;
location = location.substring(1);
@@ -504,7 +504,7 @@
}
}
}
- //next read urls from security.properties
+ //next read urls from security.properties
if (!dynamicOnly) {
int i = 1;
while (true) {
@@ -533,11 +533,11 @@
return urls.toArray(new URL[urls.size()]);
}
- /**
+ /**
* Converts common-purpose collection of Permissions to PermissionCollection.
*
* @param perms a collection containing arbitrary permissions, may be null
- * @return mutable heterogeneous PermissionCollection containing all Permissions
+ * @return mutable heterogeneous PermissionCollection containing all Permissions
* from the specified collection
*/
public static PermissionCollection toPermissionCollection(
@@ -563,7 +563,7 @@
/**
* Tries to find a suitable constructor and instantiate a new Permission
- * with specified parameters.
+ * with specified parameters.
*
* @param targetType class of expected Permission instance
* @param targetName name of expected Permission instance
@@ -607,11 +607,11 @@
/**
* Checks whether the objects from <code>what</code> array are all
* presented in <code>where</code> array.
- *
- * @param what first array, may be <code>null</code>
+ *
+ * @param what first array, may be <code>null</code>
* @param where second array, may be <code>null</code>
* @return <code>true</code> if the first array is <code>null</code>
- * or if each and every object (ignoring null values)
+ * or if each and every object (ignoring null values)
* from the first array has a twin in the second array; <code>false</code> otherwise
*/
public static boolean matchSubset(Object[] what, Object[] where) {
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/SecurityAccess.java b/luni/src/main/java/org/apache/harmony/security/fortress/SecurityAccess.java
index 7f5055a..6dd679f 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/SecurityAccess.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/SecurityAccess.java
@@ -28,7 +28,7 @@
/**
*
* This interface provides access to package visible api in java.security
- *
+ *
*/
public interface SecurityAccess {
/**
@@ -36,14 +36,14 @@
*
*/
public void renumProviders();
-
+
/**
* Access to Service.getAliases()
* @param s
* @return
*/
public Iterator<String> getAliases(Provider.Service s);
-
+
/**
* Access to Provider.getService(String type)
* @param p
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/SecurityUtils.java b/luni/src/main/java/org/apache/harmony/security/fortress/SecurityUtils.java
index abb2e2a..a0a233d 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/SecurityUtils.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/SecurityUtils.java
@@ -30,20 +30,20 @@
//FIXME: move this class under umbrella of protected packages -
// see lib/java.security: property 'package.access',
// so only trusted classes like Thread and AccessController will
-// have an access to this class.
-// This is to remove dependency on VMStack, to reduce number
+// have an access to this class.
+// This is to remove dependency on VMStack, to reduce number
// of VM2API-dependent classes.
/**
- * The class is used to perform an exchange of information between
+ * The class is used to perform an exchange of information between
* java.lang.Thread and java.security.AccessController.<br>
- * The data to exchange is inherited contexts for the Thread-s.
- *
+ * The data to exchange is inherited contexts for the Thread-s.
+ *
*/
public final class SecurityUtils {
// A map used to store inherited contexts.<br>
- // A thread is used as a key for the map and AccessControlContext
+ // A thread is used as a key for the map and AccessControlContext
// passed to the putContext is used as a value.
private static final WeakHashMap<Thread, AccessControlContext> ACC_CACHE = new WeakHashMap<Thread, AccessControlContext>();
@@ -59,30 +59,30 @@
* }<br>
* </code>
*
- * The method throws SecurityException if the method is called more than
+ * The method throws SecurityException if the method is called more than
* once for a given thread. The first call to <code>putContext</code> is
* always performed in the Thread's constructor so this effectively means
* that no one can replace the snapshot taken.
- *
- * @throws SecurityException if a context for the passed
+ *
+ * @throws SecurityException if a context for the passed
* <code>thread</code> already exists in the map.
* @throws NullPointerException if thread is null
- * @throws Error if context is null AND if null context is already stored
- * in the map
+ * @throws Error if context is null AND if null context is already stored
+ * in the map
*/
public static void putContext(Thread thread, AccessControlContext context)
throws SecurityException {
if (thread == null) {
- throw new NullPointerException(Messages.getString("security.140"));
+ throw new NullPointerException(Messages.getString("security.140"));
}
synchronized (ACC_CACHE) {
if (ACC_CACHE.containsKey(thread)) {
- throw new SecurityException(Messages.getString("security.141"));
+ throw new SecurityException(Messages.getString("security.141"));
}
if (context == null) {
// this only allowed once - for the very first thread.
if (ACC_CACHE.containsValue(null)) {
- throw new Error(Messages.getString("security.142"));
+ throw new Error(Messages.getString("security.142"));
}
}
ACC_CACHE.put(thread, context);
@@ -91,9 +91,9 @@
/**
* Returns the AccessControlContext stored for a given thread.<br>
- * The method may return null - for the very first thread created
+ * The method may return null - for the very first thread created
* by the VM which does not have inherited context.<br>
- * It may also return null if no Thread found in the map - that seems
+ * It may also return null if no Thread found in the map - that seems
* possible during VM startup process.
*/
public static AccessControlContext getContext(Thread thread)
diff --git a/luni/src/main/java/org/apache/harmony/security/fortress/Services.java b/luni/src/main/java/org/apache/harmony/security/fortress/Services.java
index 69f9f78..94c5667 100644
--- a/luni/src/main/java/org/apache/harmony/security/fortress/Services.java
+++ b/luni/src/main/java/org/apache/harmony/security/fortress/Services.java
@@ -39,7 +39,7 @@
/**
* This class contains information about all registered providers and preferred
* implementations for all "serviceName.algName".
- *
+ *
*/
public class Services {
@@ -82,7 +82,7 @@
ClassLoader cl = ClassLoader.getSystemClassLoader();
Provider p;
- while ((providerClassName = Security.getProperty("security.provider."
+ while ((providerClassName = Security.getProperty("security.provider."
+ i++)) != null) {
try {
p = (Provider) Class
@@ -101,7 +101,7 @@
/**
* Returns registered providers
- *
+ *
* @return
*/
public static Provider[] getProviders() {
@@ -110,7 +110,7 @@
/**
* Returns registered providers as List
- *
+ *
* @return
*/
public static List<Provider> getProvidersList() {
@@ -119,7 +119,7 @@
/**
* Returns the provider with the specified name
- *
+ *
* @param name
* @return
*/
@@ -132,7 +132,7 @@
/**
* Inserts a provider at a specified position
- *
+ *
* @param provider
* @param position
* @return
@@ -150,7 +150,7 @@
/**
* Removes the provider
- *
+ *
* @param providerNumber
*/
public static void removeProvider(int providerNumber) {
@@ -160,9 +160,9 @@
}
/**
- *
+ *
* Adds information about provider services into HashMap.
- *
+ *
* @param p
*/
public static void initServiceInfo(Provider p) {
@@ -176,7 +176,7 @@
serv = it1.next();
type = serv.getType();
sb.delete(0, sb.length());
- key = sb.append(type).append(".").append(
+ key = sb.append(type).append(".").append(
Util.toUpperCase(serv.getAlgorithm())).toString();
if (!services.containsKey(key)) {
services.put(key, serv);
@@ -184,7 +184,7 @@
for (Iterator<String> it2 = Engine.door.getAliases(serv); it2.hasNext();) {
alias = it2.next();
sb.delete(0, sb.length());
- key = sb.append(type).append(".").append(Util.toUpperCase(alias))
+ key = sb.append(type).append(".").append(Util.toUpperCase(alias))
.toString();
if (!services.containsKey(key)) {
services.put(key, serv);
@@ -194,9 +194,9 @@
}
/**
- *
+ *
* Updates services hashtable for all registered providers
- *
+ *
*/
public static void updateServiceInfo() {
services.clear();
@@ -207,18 +207,18 @@
}
/**
- * Returns true if services contain any provider information
+ * Returns true if services contain any provider information
* @return
*/
public static boolean isEmpty() {
return services.isEmpty();
}
-
+
/**
- *
+ *
* Returns service description.
* Call refresh() before.
- *
+ *
* @param key
* @return
*/
@@ -227,7 +227,7 @@
}
/**
- * Prints Services content
+ * Prints Services content
*/
// FIXME remove debug function
public static void printServices() {
@@ -235,12 +235,12 @@
Set<String> s = services.keySet();
for (Iterator<String> i = s.iterator(); i.hasNext();) {
String key = i.next();
- System.out.println(key + "=" + services.get(key));
+ System.out.println(key + "=" + services.get(key));
}
}
/**
- * Set flag needRefresh
+ * Set flag needRefresh
*
*/
public static void setNeedRefresh() {
diff --git a/luni/src/main/java/org/apache/harmony/security/internal/nls/Messages.java b/luni/src/main/java/org/apache/harmony/security/internal/nls/Messages.java
index 1970990..84089d4 100644
--- a/luni/src/main/java/org/apache/harmony/security/internal/nls/Messages.java
+++ b/luni/src/main/java/org/apache/harmony/security/internal/nls/Messages.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,7 @@
/*
* THE FILE HAS BEEN AUTOGENERATED BY MSGTOOL TOOL.
- * All changes made to this file manually will be overwritten
+ * All changes made to this file manually will be overwritten
* if this tool runs again. Better make changes in the template file.
*/
@@ -46,18 +46,18 @@
* is looked up, or resource bundle support is not available, the key itself
* will be returned as the associated message. This means that the <em>KEY</em>
* should a reasonable human-readable (english) string.
- *
+ *
*/
public class Messages {
// BEGIN android-changed
private static final String sResource =
- "org.apache.harmony.security.internal.nls.messages";
+ "org.apache.harmony.security.internal.nls.messages";
// END android-changed
/**
* Retrieves a message which has no arguments.
- *
+ *
* @param msg
* String the key to look up.
* @return String the message for that key in the system message bundle.
@@ -70,7 +70,7 @@
/**
* Retrieves a message which takes 1 argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -83,7 +83,7 @@
/**
* Retrieves a message which takes 1 integer argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -96,7 +96,7 @@
/**
* Retrieves a message which takes 1 character argument.
- *
+ *
* @param msg
* String the key to look up.
* @param arg
@@ -109,7 +109,7 @@
/**
* Retrieves a message which takes 2 arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param arg1
@@ -124,7 +124,7 @@
/**
* Retrieves a message which takes several arguments.
- *
+ *
* @param msg
* String the key to look up.
* @param args
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequest.java b/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequest.java
index 84c6734..7af53e6 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequest.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequest.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -27,19 +27,19 @@
/**
* The class implements the ASN.1 DER encoding and decoding of the PKCS#10
* Certificate Signing Request (CSR). Its ASN notation is as follows:
- *
+ *
* CertificationRequest ::= SEQUENCE {
* certificationRequestInfo CertificationRequestInfo,
* signatureAlgorithm SignatureAlgorithmIdentifier,
- * signature Signature
+ * signature Signature
* }
- *
+ *
* SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
- *
+ *
* Signature ::= BIT STRING
*/
public class CertificationRequest {
-
+
// the value of certificationRequestInfo field of the structure
private CertificationRequestInfo info;
@@ -59,7 +59,7 @@
this.signature = new byte[signature.length];
System.arraycopy(signature, 0, this.signature, 0, signature.length);
}
-
+
// private constructor with encoding given
private CertificationRequest(CertificationRequestInfo info,
AlgorithmIdentifier algId, byte[] signature, byte[] encoding) {
@@ -100,7 +100,7 @@
}
return encoding;
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
CertificationRequestInfo.ASN1, // info
AlgorithmIdentifier.ASN1, // signatureAlgorithm
@@ -113,7 +113,7 @@
return new CertificationRequest(
(CertificationRequestInfo) values[0],
(AlgorithmIdentifier) values[1],
- ((BitString) values[2]).bytes,
+ ((BitString) values[2]).bytes,
in.getEncoded());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java b/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java
index d915db5..bf7e953 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs10/CertificationRequestInfo.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -44,7 +44,7 @@
*/
public class CertificationRequestInfo {
- // version
+ // version
private int version;
// the value of subject field of the structure
@@ -55,7 +55,7 @@
// the value of attributes field of the structure
private List attributes;
-
+
// the ASN.1 encoded form of CertificationRequestInfo
private byte [] encoding;
@@ -67,7 +67,7 @@
this.attributes = attributes;
}
- // private constructor with encoding given
+ // private constructor with encoding given
private CertificationRequestInfo(int version, Name subject,
SubjectPublicKeyInfo subjectPublicKeyInfo, List attributes, byte [] encoding) {
this(version, subject, subjectPublicKeyInfo, attributes);
@@ -101,7 +101,7 @@
public int getVersion() {
return version;
}
-
+
/**
* Returns ASN.1 encoded form of this CertificationRequestInfo.
* @return a byte array containing ASN.1 encode form.
@@ -116,22 +116,22 @@
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("-- CertificationRequestInfo:");
- res.append("\n version: ");
+ res.append("-- CertificationRequestInfo:");
+ res.append("\n version: ");
res.append(version);
- res.append("\n subject: ");
+ res.append("\n subject: ");
res.append(subject.getName(X500Principal.CANONICAL));
- res.append("\n subjectPublicKeyInfo: ");
- res.append("\n\t algorithm: "
+ res.append("\n subjectPublicKeyInfo: ");
+ res.append("\n\t algorithm: "
+ subjectPublicKeyInfo.getAlgorithmIdentifier().getAlgorithm());
- res.append("\n\t public key: " + subjectPublicKeyInfo.getPublicKey());
- res.append("\n attributes: ");
+ res.append("\n\t public key: " + subjectPublicKeyInfo.getPublicKey());
+ res.append("\n attributes: ");
if (attributes != null) {
res.append(attributes.toString());
} else {
- res.append("none");
+ res.append("none");
}
- res.append("\n-- CertificationRequestInfo End\n");
+ res.append("\n-- CertificationRequestInfo End\n");
return res.toString();
}
@@ -152,7 +152,7 @@
(List) values[3],
in.getEncoded());
}
-
+
protected void getValues(Object object, Object[] values) {
CertificationRequestInfo certReqInfo = (CertificationRequestInfo) object;
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs7/AuthenticatedAttributes.java b/luni/src/main/java/org/apache/harmony/security/pkcs7/AuthenticatedAttributes.java
index b52483f..2c529db 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs7/AuthenticatedAttributes.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs7/AuthenticatedAttributes.java
@@ -28,7 +28,7 @@
import org.apache.harmony.security.x501.AttributeTypeAndValue;
/**
- *
+ *
* As defined in PKCS #7: Cryptographic Message Syntax Standard
* (http://www.ietf.org/rfc/rfc2315.txt):
* authenticatedAttributes is a set of attributes that are signed (i.e., authenticated) by the signer
@@ -36,7 +36,7 @@
class AuthenticatedAttributes {
private byte[] encoding;
private List authenticatedAttributes;
-
+
public AuthenticatedAttributes(byte[] encoding, List authenticatedAttributes) {
this.encoding = encoding;
this.authenticatedAttributes = authenticatedAttributes;
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs7/ContentInfo.java b/luni/src/main/java/org/apache/harmony/security/pkcs7/ContentInfo.java
index 3931840..35a4809 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs7/ContentInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs7/ContentInfo.java
@@ -35,7 +35,7 @@
/**
* As defined in PKCS #7: Cryptographic Message Syntax Standard
* (http://www.ietf.org/rfc/rfc2315.txt)
- *
+ *
* ContentInfo ::= SEQUENCE {
* contentType ContentType,
* content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL
@@ -77,11 +77,11 @@
public Object getContent() {
return content;
}
-
+
public int[] getContentType() {
return oid;
}
-
+
public byte[] getEncoded() {
if (encoding == null) {
encoding = ASN1.encode(this);
@@ -91,41 +91,41 @@
// this class should copy encoding before passing it out.
return encoding;
}
-
+
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("==== ContentInfo:");
- res.append("\n== ContentType (OID): ");
+ res.append("==== ContentInfo:");
+ res.append("\n== ContentType (OID): ");
for (int i = 0; i< oid.length; i++) {
res.append(oid[i]);
res.append(' ');
}
- res.append("\n== Content: ");
+ res.append("\n== Content: ");
if (content != null) {
- res.append("\n");
- res.append(content.toString());
- }
- res.append("\n== Content End");
- res.append("\n==== ContentInfo End\n");
+ res.append("\n");
+ res.append(content.toString());
+ }
+ res.append("\n== Content End");
+ res.append("\n==== ContentInfo End\n");
return res.toString();
}
- public static final ASN1Sequence ASN1 =
+ public static final ASN1Sequence ASN1 =
new ASN1Sequence(new ASN1Type[] {
ASN1Oid.getInstance(),
new ASN1Explicit(0, ASN1Any.getInstance())
- }) {
+ }) {
{
setOptional(1); // content is optional
}
-
+
protected void getValues(Object object, Object[] values) {
ContentInfo ci = (ContentInfo) object;
values[0] = ci.oid;
if (ci.content != null) {
if (Arrays.equals(ci.oid, DATA)) {
if (ci.content != null) {
- values[1] =
+ values[1] =
ASN1OctetString.getInstance().encode(ci.content);
}
} else if (ci.content instanceof SignedData) {
@@ -140,8 +140,8 @@
Object[] values = (Object[]) in.content;
int[] oid = (int[]) values[0];
if (Arrays.equals(oid, DATA)) {
- if (values[1] != null) {
- return new ContentInfo(oid,
+ if (values[1] != null) {
+ return new ContentInfo(oid,
ASN1OctetString.getInstance().decode((byte[])values[1]),
in.getEncoded());
} else {
@@ -156,6 +156,6 @@
}
return new ContentInfo((int[])values[0], (byte[])values[1],
in.getEncoded());
- }
- };
+ }
+ };
}
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs7/SignedData.java b/luni/src/main/java/org/apache/harmony/security/pkcs7/SignedData.java
index 2d0933b..653c993 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs7/SignedData.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs7/SignedData.java
@@ -38,17 +38,17 @@
/**
* As defined in PKCS #7: Cryptographic Message Syntax Standard
* (http://www.ietf.org/rfc/rfc2315.txt)
- *
- * SignedData ::= SEQUENCE {
- * version Version,
+ *
+ * SignedData ::= SEQUENCE {
+ * version Version,
* digestAlgorithms DigestAlgorithmIdentifiers,
* contentInfo ContentInfo,
* certificates
* [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL,
- * crls
+ * crls
* [1] IMPLICIT CertificateRevocationLists OPTIONAL,
* signerInfos SignerInfos }
- *
+ *
*/
public class SignedData {
@@ -106,34 +106,34 @@
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("---- SignedData:");
- res.append("\nversion: ");
+ res.append("---- SignedData:");
+ res.append("\nversion: ");
res.append(version);
- res.append("\ndigestAlgorithms: ");
+ res.append("\ndigestAlgorithms: ");
res.append(digestAlgorithms.toString());
- res.append("\ncontentInfo: ");
+ res.append("\ncontentInfo: ");
res.append(contentInfo.toString());
- res.append("\ncertificates: ");
+ res.append("\ncertificates: ");
if (certificates != null) {
res.append(certificates.toString());
}
- res.append("\ncrls: ");
+ res.append("\ncrls: ");
if (crls != null) {
res.append(crls.toString());
}
- res.append("\nsignerInfos:\n");
+ res.append("\nsignerInfos:\n");
res.append(signerInfos.toString());
- res.append("\n---- SignedData End\n]");
+ res.append("\n---- SignedData End\n]");
return res.toString();
}
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- ASN1Integer.getInstance(),
+ ASN1Integer.getInstance(),
new ASN1SetOf(AlgorithmIdentifier.ASN1),
ContentInfo.ASN1,
new ASN1Implicit(0, new ASN1SetOf(Certificate.ASN1)),
new ASN1Implicit(1, new ASN1SetOf(CertificateList.ASN1)),
- new ASN1SetOf(SignerInfo.ASN1)
+ new ASN1SetOf(SignerInfo.ASN1)
}) {
{
setOptional(3); // certificates is optional
@@ -154,10 +154,10 @@
Object[] values = (Object[]) in.content;
return new SignedData(
ASN1Integer.toIntValue(values[0]),
- (List) values[1],
+ (List) values[1],
(ContentInfo) values[2],
- (List) values[3],
- (List) values[4],
+ (List) values[3],
+ (List) values[4],
(List) values[5]
);
}
diff --git a/luni/src/main/java/org/apache/harmony/security/pkcs7/SignerInfo.java b/luni/src/main/java/org/apache/harmony/security/pkcs7/SignerInfo.java
index 10da9d6..3768daa 100644
--- a/luni/src/main/java/org/apache/harmony/security/pkcs7/SignerInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/pkcs7/SignerInfo.java
@@ -43,7 +43,7 @@
/**
* As defined in PKCS #7: Cryptographic Message Syntax Standard
* (http://www.ietf.org/rfc/rfc2315.txt)
- *
+ *
* SignerInfo ::= SEQUENCE {
* version Version,
* issuerAndSerialNumber IssuerAndSerialNumber,
@@ -56,14 +56,14 @@
* unauthenticatedAttributes
* [1] IMPLICIT Attributes OPTIONAL
* }
- *
+ *
*/
public class SignerInfo {
private int version;
private X500Principal issuer;
private BigInteger serialNumber;
-
+
private AlgorithmIdentifier digestAlgorithm;
private AuthenticatedAttributes authenticatedAttributes;
private AlgorithmIdentifier digestEncryptionAlgorithm;
@@ -93,11 +93,11 @@
public X500Principal getIssuer() {
return issuer;
}
-
+
public BigInteger getSerialNumber() {
return serialNumber;
- }
-
+ }
+
public String getDigestAlgorithm() {
return digestAlgorithm.getAlgorithm();
}
@@ -128,38 +128,38 @@
return encryptedDigest;
}
-
+
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("-- SignerInfo:");
- res.append("\n version : ");
+ res.append("-- SignerInfo:");
+ res.append("\n version : ");
res.append(version);
- res.append("\nissuerAndSerialNumber: ");
+ res.append("\nissuerAndSerialNumber: ");
res.append(issuer);
- res.append(" ");
+ res.append(" ");
res.append(serialNumber);
- res.append("\ndigestAlgorithm: ");
+ res.append("\ndigestAlgorithm: ");
res.append(digestAlgorithm.toString());
- res.append("\nauthenticatedAttributes: ");
+ res.append("\nauthenticatedAttributes: ");
if (authenticatedAttributes != null) {
res.append(authenticatedAttributes.toString());
}
- res.append("\ndigestEncryptionAlgorithm: ");
+ res.append("\ndigestEncryptionAlgorithm: ");
res.append(digestEncryptionAlgorithm.toString());
- res.append("\nunauthenticatedAttributes: ");
+ res.append("\nunauthenticatedAttributes: ");
if (unauthenticatedAttributes != null) {
res.append(unauthenticatedAttributes.toString());
}
- res.append("\n-- SignerInfo End\n");
+ res.append("\n-- SignerInfo End\n");
return res.toString();
}
-
- public static final ASN1Sequence ISSUER_AND_SERIAL_NUMBER =
- new ASN1Sequence(new ASN1Type[] {
+
+ public static final ASN1Sequence ISSUER_AND_SERIAL_NUMBER =
+ new ASN1Sequence(new ASN1Type[] {
Name.ASN1, // issuer
ASN1Integer.getInstance(), // serialNumber
- })
+ })
{
// method to encode
public void getValues(Object object, Object[] values) {
@@ -168,8 +168,8 @@
values[1] = issAndSerial[1];
}
};
-
- public static final ASN1Sequence ASN1 =
+
+ public static final ASN1Sequence ASN1 =
new ASN1Sequence(new ASN1Type[] {
ASN1Integer.getInstance(), //version
ISSUER_AND_SERIAL_NUMBER,
@@ -193,27 +193,27 @@
si.serialNumber.toByteArray() };
} catch (IOException e) {
// The exception is never thrown, because si.issuer
- // is created using Name.getX500Principal().
+ // is created using Name.getX500Principal().
// Throw a RuntimeException just to be safe.
throw new RuntimeException(
// Msg: "Failed to encode issuer name
Messages.getString("security.1A2"), e);
- }
+ }
values[2] = si.digestAlgorithm;
values[3] = si.authenticatedAttributes;
values[4] = si.digestEncryptionAlgorithm;
values[5] = si.encryptedDigest;
values[6] = si.unauthenticatedAttributes;
}
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new SignerInfo(
ASN1Integer.toIntValue(values[0]),
- (Object[]) values[1],
+ (Object[]) values[1],
(AlgorithmIdentifier) values[2],
- (AuthenticatedAttributes) values[3],
- (AlgorithmIdentifier) values[4],
+ (AuthenticatedAttributes) values[3],
+ (AlgorithmIdentifier) values[4],
(byte[]) values[5],
(List) values[6]
);
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/Cache.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/Cache.java
index ac1f63d..24fdb2b 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/Cache.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/Cache.java
@@ -173,7 +173,7 @@
this(28, 9);
}
// END android-added
-
+
/**
* Returns the hash code for the array. This code is used to
* predetermine whether the object was built on the base of the
@@ -274,7 +274,7 @@
if (idx < 0) {
// it will never happen because we use saved hash value
// (hashes[index])
- System.out.println("WARNING! "+idx);
+ System.out.println("WARNING! "+idx);
idx = -(idx + 1);
}
long new_hash_idx = (hash | (index + 1));
@@ -284,8 +284,8 @@
if (idx != new_idx) {
// it will never happen because we use the same
// hash and the same index in hash table
- System.out.println("WARNING: ");
- System.out.println(">> idx: "+idx+" new_idx: "+new_idx);
+ System.out.println("WARNING: ");
+ System.out.println(">> idx: "+idx+" new_idx: "+new_idx);
}
} else {
new_idx = -(new_idx + 1);
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/DRLCertFactory.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/DRLCertFactory.java
index 63f9c01..2177f98 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/DRLCertFactory.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/DRLCertFactory.java
@@ -49,16 +49,16 @@
// BEGIN android-changed
// Avoid using a message resource string here, since it forces loading
// all the messages in a non-error context.
- super("DRLCertFactory", 1.0, "ASN.1, DER, PkiPath, PKCS7");
+ super("DRLCertFactory", 1.0, "ASN.1, DER, PkiPath, PKCS7");
// END android-changed
-
+
AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
public Void run() {
// register the service
- put("CertificateFactory.X509",
- "org.apache.harmony.security.provider.cert.X509CertFactoryImpl");
+ put("CertificateFactory.X509",
+ "org.apache.harmony.security.provider.cert.X509CertFactoryImpl");
// mapping the alias
- put("Alg.Alias.CertificateFactory.X.509", "X509");
+ put("Alg.Alias.CertificateFactory.X.509", "X509");
return null;
}
});
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java
index db09f39..056439a 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLEntryImpl.java
@@ -126,7 +126,7 @@
* method documentation for more info
*/
public String toString() {
- return "X509CRLEntryImpl: "+rcert.toString();
+ return "X509CRLEntryImpl: "+rcert.toString();
}
// ---------------------------------------------------------------------
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLImpl.java
index b93b510..e74b8f4 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CRLImpl.java
@@ -411,7 +411,7 @@
byte[] tbsEncoding = tbsCertList.getEncoded();
signature.update(tbsEncoding, 0, tbsEncoding.length);
if (!signature.verify(crl.getSignatureValue())) {
- throw new SignatureException(Messages.getString("security.15C"));
+ throw new SignatureException(Messages.getString("security.15C"));
}
}
@@ -429,7 +429,7 @@
byte[] tbsEncoding = tbsCertList.getEncoded();
signature.update(tbsEncoding, 0, tbsEncoding.length);
if (!signature.verify(crl.getSignatureValue())) {
- throw new SignatureException(Messages.getString("security.15C"));
+ throw new SignatureException(Messages.getString("security.15C"));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java
index 6efdd72..5a6f3a5 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertFactoryImpl.java
@@ -91,7 +91,7 @@
public Certificate engineGenerateCertificate(InputStream inStream)
throws CertificateException {
if (inStream == null) {
- throw new CertificateException(Messages.getString("security.153"));
+ throw new CertificateException(Messages.getString("security.153"));
}
try {
if (!inStream.markSupported()) {
@@ -125,7 +125,7 @@
engineGenerateCertificates(InputStream inStream)
throws CertificateException {
if (inStream == null) {
- throw new CertificateException(Messages.getString("security.153"));
+ throw new CertificateException(Messages.getString("security.153"));
}
ArrayList result = new ArrayList();
try {
@@ -137,7 +137,7 @@
// so ((it is PEM) <-> (encoding != null))
byte[] encoding = null;
// The following by SEQUENCE ASN.1 tag, used for
- // recognizing the data format
+ // recognizing the data format
// (is it PKCS7 ContentInfo structure, X.509 Certificate, or
// unsupported encoding)
int second_asn1_tag = -1;
@@ -156,7 +156,7 @@
} else { // unsupported data
if (result.size() == 0) {
throw new CertificateException(
- Messages.getString("security.15F"));
+ Messages.getString("security.15F"));
} else {
// it can be trailing user data,
// so keep it in the stream
@@ -177,8 +177,8 @@
// check if it is a TBSCertificate structure
if (second_asn1_tag != ASN1Constants.TAG_C_SEQUENCE) {
if (result.size() == 0) {
- // there were not read X.509 Certificates, so
- // break the cycle and check
+ // there were not read X.509 Certificates, so
+ // break the cycle and check
// whether it is PKCS7 structure
break;
} else {
@@ -201,12 +201,12 @@
return result;
} else if (ch == -1) {
throw new CertificateException(
- Messages.getString("security.155"));
+ Messages.getString("security.155"));
}
// else: check if it is PKCS7
if (second_asn1_tag == ASN1Constants.TAG_OID) {
// it is PKCS7 ContentInfo structure, so decode it
- ContentInfo info = (ContentInfo)
+ ContentInfo info = (ContentInfo)
((encoding != null)
? ContentInfo.ASN1.decode(encoding)
: ContentInfo.ASN1.decode(inStream));
@@ -214,7 +214,7 @@
SignedData data = info.getSignedData();
if (data == null) {
throw new CertificateException(
- Messages.getString("security.154"));
+ Messages.getString("security.154"));
}
List certs = data.getCertificates();
if (certs != null) {
@@ -228,7 +228,7 @@
}
// else: Unknown data format
throw new CertificateException(
- Messages.getString("security.15F"));
+ Messages.getString("security.15F"));
} catch (IOException e) {
throw new CertificateException(e);
}
@@ -241,12 +241,12 @@
public CRL engineGenerateCRL(InputStream inStream)
throws CRLException {
if (inStream == null) {
- throw new CRLException(Messages.getString("security.153"));
+ throw new CRLException(Messages.getString("security.153"));
}
try {
if (!inStream.markSupported()) {
// Create the mark supporting wrapper
- // Mark is needed to recognize the format
+ // Mark is needed to recognize the format
// of provided encoding form (ASN.1 or PEM)
inStream = new RestoringInputStream(inStream);
}
@@ -272,7 +272,7 @@
public Collection<? extends CRL> engineGenerateCRLs(InputStream inStream)
throws CRLException {
if (inStream == null) {
- throw new CRLException(Messages.getString("security.153"));
+ throw new CRLException(Messages.getString("security.153"));
}
ArrayList result = new ArrayList();
try {
@@ -283,7 +283,7 @@
// so ((it is PEM) <-> (encoding != null))
byte[] encoding = null;
// The following by SEQUENCE ASN.1 tag, used for
- // recognizing the data format
+ // recognizing the data format
// (is it PKCS7 ContentInfo structure, X.509 CRL, or
// unsupported encoding)
int second_asn1_tag = -1;
@@ -302,7 +302,7 @@
} else { // unsupported data
if (result.size() == 0) {
throw new CRLException(
- Messages.getString("security.15F"));
+ Messages.getString("security.15F"));
} else {
// it can be trailing user data,
// so keep it in the stream
@@ -323,8 +323,8 @@
// check if it is a TBSCertList structure
if (second_asn1_tag != ASN1Constants.TAG_C_SEQUENCE) {
if (result.size() == 0) {
- // there were not read X.509 CRLs, so
- // break the cycle and check
+ // there were not read X.509 CRLs, so
+ // break the cycle and check
// whether it is PKCS7 structure
break;
} else {
@@ -346,12 +346,12 @@
return result;
} else if (ch == -1) {
throw new CRLException(
- Messages.getString("security.155"));
+ Messages.getString("security.155"));
}
// else: check if it is PKCS7
if (second_asn1_tag == ASN1Constants.TAG_OID) {
// it is PKCS7 ContentInfo structure, so decode it
- ContentInfo info = (ContentInfo)
+ ContentInfo info = (ContentInfo)
((encoding != null)
? ContentInfo.ASN1.decode(encoding)
: ContentInfo.ASN1.decode(inStream));
@@ -359,7 +359,7 @@
SignedData data = info.getSignedData();
if (data == null) {
throw new CRLException(
- Messages.getString("security.154"));
+ Messages.getString("security.154"));
}
List crls = data.getCRLs();
if (crls != null) {
@@ -372,7 +372,7 @@
}
// else: Unknown data format
throw new CRLException(
- Messages.getString("security.15F"));
+ Messages.getString("security.15F"));
} catch (IOException e) {
throw new CRLException(e);
}
@@ -386,9 +386,9 @@
throws CertificateException {
if (inStream == null) {
throw new CertificateException(
- Messages.getString("security.153"));
+ Messages.getString("security.153"));
}
- return engineGenerateCertPath(inStream, "PkiPath");
+ return engineGenerateCertPath(inStream, "PkiPath");
}
/**
@@ -399,7 +399,7 @@
InputStream inStream, String encoding) throws CertificateException {
if (inStream == null) {
throw new CertificateException(
- Messages.getString("security.153"));
+ Messages.getString("security.153"));
}
if (!inStream.markSupported()) {
inStream = new RestoringInputStream(inStream);
@@ -419,7 +419,7 @@
return X509CertPathImpl.getInstance(inStream, encoding);
} else {
throw new CertificateException(
- Messages.getString("security.15F"));
+ Messages.getString("security.15F"));
}
} catch (IOException e) {
throw new CertificateException(e);
@@ -465,16 +465,16 @@
static {
// Initialise statics
try {
- pemBegin = "-----BEGIN".getBytes("UTF-8");
- pemClose = "-----END".getBytes("UTF-8");
- CERT_BOUND_SUFFIX = " CERTIFICATE-----".getBytes("UTF-8");
+ pemBegin = "-----BEGIN".getBytes("UTF-8");
+ pemClose = "-----END".getBytes("UTF-8");
+ CERT_BOUND_SUFFIX = " CERTIFICATE-----".getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.getMessage());
}
}
/**
- * Method retrieves the PEM encoded data from the stream
+ * Method retrieves the PEM encoded data from the stream
* and returns its decoded representation.
* Method checks correctness of PEM boundaries. It supposes that
* the first '-' of the opening boundary has already been read from
@@ -487,46 +487,46 @@
* After the opening boundary has been read and checked, the method
* read Base64 encoded data until closing PEM boundary is not reached.<br>
* Than it checks closing boundary - it should start with new line +
- * "-----END" + boundary_suffix. If boundary_suffix is null,
+ * "-----END" + boundary_suffix. If boundary_suffix is null,
* any characters are skipped until the new line.<br>
* After this any trailing new line characters are skipped from the stream,
* Base64 encoding is decoded and returned.
* @param inStream the stream containing the PEM encoding.
- * @param boundary_suffix the suffix of expected PEM multipart
+ * @param boundary_suffix the suffix of expected PEM multipart
* boundary delimiter.<br>
* If it is null, that any character sequences are accepted.
- * @throws IOException If PEM boundary delimiter does not comply
+ * @throws IOException If PEM boundary delimiter does not comply
* with expected or some I/O or decoding problems occur.
*/
- private byte[] decodePEM(InputStream inStream, byte[] boundary_suffix)
+ private byte[] decodePEM(InputStream inStream, byte[] boundary_suffix)
throws IOException {
int ch; // the char to be read
- // check and skip opening boundary delimiter
+ // check and skip opening boundary delimiter
// (first '-' is supposed as already read)
for (int i=1; i<pemBegin.length; i++) {
if (pemBegin[i] != (ch = inStream.read())) {
throw new IOException(
"Incorrect PEM encoding: '-----BEGIN"
- + ((boundary_suffix == null)
+ + ((boundary_suffix == null)
? "" : new String(boundary_suffix))
+ "' is expected as opening delimiter boundary.");
}
}
if (boundary_suffix == null) {
- // read (skip) the trailing characters of
+ // read (skip) the trailing characters of
// the beginning PEM boundary delimiter
while ((ch = inStream.read()) != '\n') {
if (ch == -1) {
throw new IOException(
- Messages.getString("security.156"));
+ Messages.getString("security.156"));
}
}
} else {
for (int i=0; i<boundary_suffix.length; i++) {
if (boundary_suffix[i] != inStream.read()) {
throw new IOException(
- Messages.getString("security.15B",
- new String(boundary_suffix)));
+ Messages.getString("security.15B",
+ new String(boundary_suffix)));
}
}
// read new line characters
@@ -536,7 +536,7 @@
}
if (ch != '\n') {
throw new IOException(
- Messages.getString("security.15B2"));
+ Messages.getString("security.15B2"));
}
}
int size = 1024; // the size of the buffer containing Base64 data
@@ -546,7 +546,7 @@
while ((ch = inStream.read()) != '-') {
if (ch == -1) {
throw new IOException(
- Messages.getString("security.157"));
+ Messages.getString("security.157"));
}
buff[index++] = (byte) ch;
if (index == size) {
@@ -559,21 +559,21 @@
}
if (buff[index-1] != '\n') {
throw new IOException(
- Messages.getString("security.158"));
+ Messages.getString("security.158"));
}
// check and skip closing boundary delimiter prefix
// (first '-' was read)
for (int i=1; i<pemClose.length; i++) {
if (pemClose[i] != inStream.read()) {
throw new IOException(
- Messages.getString("security.15B1",
- ((boundary_suffix == null)
- ? ""
- : new String(boundary_suffix))));
+ Messages.getString("security.15B1",
+ ((boundary_suffix == null)
+ ? ""
+ : new String(boundary_suffix))));
}
}
if (boundary_suffix == null) {
- // read (skip) the trailing characters of
+ // read (skip) the trailing characters of
// the closing PEM boundary delimiter
while (((ch = inStream.read()) != -1)
&& (ch != '\n') && (ch != '\r')) {
@@ -582,8 +582,8 @@
for (int i=0; i<boundary_suffix.length; i++) {
if (boundary_suffix[i] != inStream.read()) {
throw new IOException(
- Messages.getString("security.15B1",
- new String(boundary_suffix)));
+ Messages.getString("security.15B1",
+ new String(boundary_suffix)));
}
}
}
@@ -595,19 +595,19 @@
inStream.reset();
buff = Base64.decode(buff, index);
if (buff == null) {
- throw new IOException(Messages.getString("security.159"));
+ throw new IOException(Messages.getString("security.159"));
}
return buff;
};
-
+
/**
- * Reads the data of specified length from source
+ * Reads the data of specified length from source
* and returns it as an array.
- * @return the byte array contained read data or
+ * @return the byte array contained read data or
* null if the stream contains not enough data
* @throws IOException if some I/O error has been occurred.
*/
- private static byte[] readBytes(InputStream source, int length)
+ private static byte[] readBytes(InputStream source, int length)
throws IOException {
byte[] result = new byte[length];
for (int i=0; i<length; i++) {
@@ -622,23 +622,23 @@
/**
* Returns the Certificate object corresponding to the provided encoding.
- * Resulting object is retrieved from the cache
- * if it contains such correspondence
- * and is constructed on the base of encoding
+ * Resulting object is retrieved from the cache
+ * if it contains such correspondence
+ * and is constructed on the base of encoding
* and stored in the cache otherwise.
* @throws IOException if some decoding errors occur
* (in the case of cache miss).
*/
- private static Certificate getCertificate(byte[] encoding)
+ private static Certificate getCertificate(byte[] encoding)
throws CertificateException, IOException {
if (encoding.length < CERT_CACHE_SEED_LENGTH) {
throw new CertificateException(
- Messages.getString("security.152"));
+ Messages.getString("security.152"));
}
synchronized (CERT_CACHE) {
long hash = CERT_CACHE.getHash(encoding);
if (CERT_CACHE.contains(hash)) {
- Certificate res =
+ Certificate res =
(Certificate) CERT_CACHE.get(hash, encoding);
if (res != null) {
return res;
@@ -653,14 +653,14 @@
/**
* Returns the Certificate object corresponding to the encoding provided
* by the stream.
- * Resulting object is retrieved from the cache
- * if it contains such correspondence
- * and is constructed on the base of encoding
+ * Resulting object is retrieved from the cache
+ * if it contains such correspondence
+ * and is constructed on the base of encoding
* and stored in the cache otherwise.
* @throws IOException if some decoding errors occur
* (in the case of cache miss).
*/
- private static Certificate getCertificate(InputStream inStream)
+ private static Certificate getCertificate(InputStream inStream)
throws CertificateException, IOException {
synchronized (CERT_CACHE) {
inStream.mark(CERT_CACHE_SEED_LENGTH);
@@ -669,14 +669,14 @@
inStream.reset();
if (buff == null) {
throw new CertificateException(
- Messages.getString("security.152"));
+ Messages.getString("security.152"));
}
long hash = CERT_CACHE.getHash(buff);
if (CERT_CACHE.contains(hash)) {
byte[] encoding = new byte[BerInputStream.getLength(buff)];
if (encoding.length < CERT_CACHE_SEED_LENGTH) {
throw new CertificateException(
- Messages.getString("security.15B3"));
+ Messages.getString("security.15B3"));
}
inStream.read(encoding);
Certificate res = (Certificate) CERT_CACHE.get(hash, encoding);
@@ -697,18 +697,18 @@
/**
* Returns the CRL object corresponding to the provided encoding.
- * Resulting object is retrieved from the cache
- * if it contains such correspondence
- * and is constructed on the base of encoding
+ * Resulting object is retrieved from the cache
+ * if it contains such correspondence
+ * and is constructed on the base of encoding
* and stored in the cache otherwise.
* @throws IOException if some decoding errors occur
* (in the case of cache miss).
*/
- private static CRL getCRL(byte[] encoding)
+ private static CRL getCRL(byte[] encoding)
throws CRLException, IOException {
if (encoding.length < CRL_CACHE_SEED_LENGTH) {
throw new CRLException(
- Messages.getString("security.152"));
+ Messages.getString("security.152"));
}
synchronized (CRL_CACHE) {
long hash = CRL_CACHE.getHash(encoding);
@@ -727,14 +727,14 @@
/**
* Returns the CRL object corresponding to the encoding provided
* by the stream.
- * Resulting object is retrieved from the cache
- * if it contains such correspondence
- * and is constructed on the base of encoding
+ * Resulting object is retrieved from the cache
+ * if it contains such correspondence
+ * and is constructed on the base of encoding
* and stored in the cache otherwise.
* @throws IOException if some decoding errors occur
* (in the case of cache miss).
*/
- private static CRL getCRL(InputStream inStream)
+ private static CRL getCRL(InputStream inStream)
throws CRLException, IOException {
synchronized (CRL_CACHE) {
inStream.mark(CRL_CACHE_SEED_LENGTH);
@@ -743,14 +743,14 @@
inStream.reset();
if (buff == null) {
throw new CRLException(
- Messages.getString("security.152"));
+ Messages.getString("security.152"));
}
long hash = CRL_CACHE.getHash(buff);
if (CRL_CACHE.contains(hash)) {
byte[] encoding = new byte[BerInputStream.getLength(buff)];
if (encoding.length < CRL_CACHE_SEED_LENGTH) {
throw new CRLException(
- Messages.getString("security.15B4"));
+ Messages.getString("security.15B4"));
}
inStream.read(encoding);
CRL res = (CRL) CRL_CACHE.get(hash, encoding);
@@ -893,7 +893,7 @@
pos = (end + 1) % BUFF_SIZE;
} else {
throw new IOException(
- Messages.getString("security.15A"));
+ Messages.getString("security.15A"));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java
index 09915a9..4e4d20b 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertImpl.java
@@ -525,7 +525,7 @@
// compute and verify the signature
signature.update(tbsCertificate, 0, tbsCertificate.length);
if (!signature.verify(certificate.getSignatureValue())) {
- throw new SignatureException(Messages.getString("security.15C"));
+ throw new SignatureException(Messages.getString("security.15C"));
}
}
@@ -538,14 +538,14 @@
throws CertificateException, NoSuchAlgorithmException,
InvalidKeyException, NoSuchProviderException,
SignatureException {
-
+
// BEGIN android-added
if (getSigAlgName().endsWith("withRSA")) {
fastVerify(key);
return;
}
// END android-added
-
+
Signature signature =
Signature.getInstance(getSigAlgName(), sigProvider);
signature.initVerify(key);
@@ -556,7 +556,7 @@
// compute and verify the signature
signature.update(tbsCertificate, 0, tbsCertificate.length);
if (!signature.verify(certificate.getSignatureValue())) {
- throw new SignatureException(Messages.getString("security.15C"));
+ throw new SignatureException(Messages.getString("security.15C"));
}
}
@@ -565,11 +565,11 @@
* Implements a faster RSA verification method that delegates to OpenSSL
* native code. In all other aspects it behaves just like the ordinary
* {@link verify} method.
- *
+ *
* @param key The RSA public key to use
- *
+ *
* @throws SignatureException If the verification fails.
- * @throws InvalidKeyException
+ * @throws InvalidKeyException
*/
private void fastVerify(PublicKey key) throws SignatureException,
InvalidKeyException, NoSuchAlgorithmException {
@@ -577,7 +577,7 @@
throw new InvalidKeyException(Messages.getString("security.15C1"));
}
RSAPublicKey rsaKey = (RSAPublicKey) key;
-
+
String algorithm = getSigAlgName();
// We don't support MD2 anymore. This needs to also check for aliases
@@ -591,14 +591,14 @@
int i = algorithm.indexOf("with");
algorithm = algorithm.substring(i + 4) + "-" + algorithm.substring(0, i);
-
+
if (tbsCertificate == null) {
tbsCertificate = tbsCert.getEncoded();
}
byte[] sig = certificate.getSignatureValue();
if (!NativeCrypto.verifySignature(tbsCertificate, sig, algorithm, rsaKey)) {
- throw new SignatureException(Messages.getString("security.15C"));
+ throw new SignatureException(Messages.getString("security.15C"));
}
}
// END android-added
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertPathImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertPathImpl.java
index 349c5e8..59b12b3 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertPathImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/cert/X509CertPathImpl.java
@@ -86,7 +86,7 @@
// supported encoding names
private static final String[] encodingsArr =
- new String[] {"PkiPath", "PKCS7"};
+ new String[] {"PkiPath", "PKCS7"};
static final List encodings = Collections.unmodifiableList(
Arrays.asList(encodingsArr));
// the list of certificates representing this certification path
@@ -103,14 +103,14 @@
* is not an instance of subclass of X509Certificate.
*/
public X509CertPathImpl(List certs) throws CertificateException {
- super("X.509");
+ super("X.509");
int size = certs.size();
certificates = new ArrayList(size);
for (int i=0; i<size; i++) {
Object cert = certs.get(i);
if (!(cert instanceof X509Certificate) ) {
throw new CertificateException(
- Messages.getString("security.15D"));
+ Messages.getString("security.15D"));
}
certificates.add(cert);
}
@@ -126,7 +126,7 @@
* @param encoding - encoded form of certification path.
*/
private X509CertPathImpl(List certs, int type, byte[] encoding) {
- super("X.509");
+ super("X.509");
if (type == PKI_PATH) {
this.pkiPathEncoding = encoding;
} else { // PKCS7
@@ -148,7 +148,7 @@
try {
return (X509CertPathImpl) ASN1.decode(in);
} catch (IOException e) {
- throw new CertificateException(Messages.getString("security.15E",
+ throw new CertificateException(Messages.getString("security.15E",
e.getMessage()));
}
}
@@ -164,7 +164,7 @@
throws CertificateException {
if (!encodings.contains(encoding)) {
throw new CertificateException(
- Messages.getString("security.15F", encoding));
+ Messages.getString("security.15F", encoding));
}
try {
if (encodingsArr[0].equals(encoding)) {
@@ -176,7 +176,7 @@
SignedData sd = ci.getSignedData();
if (sd == null) {
throw new CertificateException(
- Messages.getString("security.160"));
+ Messages.getString("security.160"));
}
List certs = sd.getCertificates();
if (certs == null) {
@@ -190,7 +190,7 @@
return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
}
} catch (IOException e) {
- throw new CertificateException(Messages.getString("security.15E",
+ throw new CertificateException(Messages.getString("security.15E",
e.getMessage()));
}
}
@@ -206,7 +206,7 @@
try {
return (X509CertPathImpl) ASN1.decode(in);
} catch (IOException e) {
- throw new CertificateException(Messages.getString("security.15E",
+ throw new CertificateException(Messages.getString("security.15E",
e.getMessage()));
}
}
@@ -222,7 +222,7 @@
throws CertificateException {
if (!encodings.contains(encoding)) {
throw new CertificateException(
- Messages.getString("security.15F", encoding));
+ Messages.getString("security.15F", encoding));
}
try {
if (encodingsArr[0].equals(encoding)) {
@@ -234,7 +234,7 @@
SignedData sd = ci.getSignedData();
if (sd == null) {
throw new CertificateException(
- Messages.getString("security.160"));
+ Messages.getString("security.160"));
}
List certs = sd.getCertificates();
if (certs == null) {
@@ -247,7 +247,7 @@
return new X509CertPathImpl(result, PKCS7, ci.getEncoded());
}
} catch (IOException e) {
- throw new CertificateException(Messages.getString("security.15E",
+ throw new CertificateException(Messages.getString("security.15E",
e.getMessage()));
}
}
@@ -285,7 +285,7 @@
throws CertificateEncodingException {
if (!encodings.contains(encoding)) {
throw new CertificateEncodingException(
- Messages.getString("security.15F", encoding));
+ Messages.getString("security.15F", encoding));
}
if (encodingsArr[0].equals(encoding)) {
// PkiPath encoded form
@@ -361,12 +361,12 @@
cp.certificates.get(i)).getEncoded());
}
} catch (CertificateEncodingException e) {
- throw new IllegalArgumentException(Messages.getString("security.161"));
+ throw new IllegalArgumentException(Messages.getString("security.161"));
}
return encodings;
}
};
-
+
//
// encoder for PKCS#7 SignedData
@@ -408,7 +408,7 @@
"Invalid use of encoder for PKCS#7 SignedData object");
}
};
-
+
private static final ASN1Sequence PKCS7_SIGNED_DATA_OBJECT = new ASN1Sequence(
new ASN1Type[] { ASN1Any.getInstance(), // contentType
new ASN1Explicit(0, ASN1_SIGNED_DATA) // SignedData
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/CryptoProvider.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/CryptoProvider.java
index f673f0b..d9b3558 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/CryptoProvider.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/CryptoProvider.java
@@ -40,54 +40,54 @@
*/
public CryptoProvider() {
- super("Crypto", 1.0,
- "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)");
+ super("Crypto", 1.0,
+ "HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)");
// names of classes implementing services
- final String MD_NAME = "org.apache.harmony.security.provider.crypto.SHA1_MessageDigestImpl";
- final String SR_NAME = "org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl";
+ final String MD_NAME = "org.apache.harmony.security.provider.crypto.SHA1_MessageDigestImpl";
+ final String SR_NAME = "org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl";
- final String SIGN_NAME = "org.apache.harmony.security.provider.crypto.SHA1withDSA_SignatureImpl";
+ final String SIGN_NAME = "org.apache.harmony.security.provider.crypto.SHA1withDSA_SignatureImpl";
- final String SIGN_ALIAS = "SHA1withDSA";
+ final String SIGN_ALIAS = "SHA1withDSA";
- final String KEYF_NAME =
- "org.apache.harmony.security.provider.crypto.DSAKeyFactoryImpl";
+ final String KEYF_NAME =
+ "org.apache.harmony.security.provider.crypto.DSAKeyFactoryImpl";
AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
public Void run() {
- put("MessageDigest.SHA-1", MD_NAME);
- put("MessageDigest.SHA-1 ImplementedIn", "Software");
- put("Alg.Alias.MessageDigest.SHA1", "SHA-1");
- put("Alg.Alias.MessageDigest.SHA", "SHA-1");
+ put("MessageDigest.SHA-1", MD_NAME);
+ put("MessageDigest.SHA-1 ImplementedIn", "Software");
+ put("Alg.Alias.MessageDigest.SHA1", "SHA-1");
+ put("Alg.Alias.MessageDigest.SHA", "SHA-1");
if (RandomBitsSupplier.isServiceAvailable()) {
- put("SecureRandom.SHA1PRNG", SR_NAME);
- put("SecureRandom.SHA1PRNG ImplementedIn", "Software");
+ put("SecureRandom.SHA1PRNG", SR_NAME);
+ put("SecureRandom.SHA1PRNG ImplementedIn", "Software");
}
- put("Signature.SHA1withDSA", SIGN_NAME);
- put("Signature.SHA1withDSA ImplementedIn", "Software");
- put("Alg.Alias.Signature.SHAwithDSA", SIGN_ALIAS);
- put("Alg.Alias.Signature.DSAwithSHA1", SIGN_ALIAS);
- put("Alg.Alias.Signature.SHA1/DSA", SIGN_ALIAS);
- put("Alg.Alias.Signature.SHA/DSA", SIGN_ALIAS);
- put("Alg.Alias.Signature.SHA-1/DSA", SIGN_ALIAS);
- put("Alg.Alias.Signature.DSA", SIGN_ALIAS);
- put("Alg.Alias.Signature.DSS", SIGN_ALIAS);
+ put("Signature.SHA1withDSA", SIGN_NAME);
+ put("Signature.SHA1withDSA ImplementedIn", "Software");
+ put("Alg.Alias.Signature.SHAwithDSA", SIGN_ALIAS);
+ put("Alg.Alias.Signature.DSAwithSHA1", SIGN_ALIAS);
+ put("Alg.Alias.Signature.SHA1/DSA", SIGN_ALIAS);
+ put("Alg.Alias.Signature.SHA/DSA", SIGN_ALIAS);
+ put("Alg.Alias.Signature.SHA-1/DSA", SIGN_ALIAS);
+ put("Alg.Alias.Signature.DSA", SIGN_ALIAS);
+ put("Alg.Alias.Signature.DSS", SIGN_ALIAS);
- put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", SIGN_ALIAS);
- put("Alg.Alias.Signature.1.2.840.10040.4.3", SIGN_ALIAS);
- put("Alg.Alias.Signature.1.3.14.3.2.13", SIGN_ALIAS);
- put("Alg.Alias.Signature.1.3.14.3.2.27", SIGN_ALIAS);
+ put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", SIGN_ALIAS);
+ put("Alg.Alias.Signature.1.2.840.10040.4.3", SIGN_ALIAS);
+ put("Alg.Alias.Signature.1.3.14.3.2.13", SIGN_ALIAS);
+ put("Alg.Alias.Signature.1.3.14.3.2.27", SIGN_ALIAS);
- put("KeyFactory.DSA", KEYF_NAME);
- put("KeyFactory.DSA ImplementedIn", "Software");
- put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
- put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
+ put("KeyFactory.DSA", KEYF_NAME);
+ put("KeyFactory.DSA ImplementedIn", "Software");
+ put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
+ put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
return null;
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
index c9b893c..562229f 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAKeyFactoryImpl.java
@@ -38,7 +38,7 @@
public class DSAKeyFactoryImpl extends KeyFactorySpi {
/**
- * This method generates a DSAPrivateKey object from the provided key specification.
+ * This method generates a DSAPrivateKey object from the provided key specification.
*
* @param
* keySpec - the specification (key material) for the DSAPrivateKey.
@@ -62,11 +62,11 @@
return new DSAPrivateKeyImpl((PKCS8EncodedKeySpec) keySpec);
}
}
- throw new InvalidKeySpecException(Messages.getString("security.19C"));
+ throw new InvalidKeySpecException(Messages.getString("security.19C"));
}
/**
- * This method generates a DSAPublicKey object from the provided key specification.
+ * This method generates a DSAPublicKey object from the provided key specification.
*
* @param
* keySpec - the specification (key material) for the DSAPublicKey.
@@ -90,22 +90,22 @@
return new DSAPublicKeyImpl((X509EncodedKeySpec) keySpec);
}
}
- throw new InvalidKeySpecException(Messages.getString("security.19D"));
+ throw new InvalidKeySpecException(Messages.getString("security.19D"));
}
-
+
/**
* This method returns a specification for the supplied key.
- *
+ *
* The specification will be returned in the form of an object of the type
* specified by keySpec.
- *
+ *
* @param key -
* either DSAPrivateKey or DSAPublicKey
* @param keySpec -
* either DSAPrivateKeySpec.class or DSAPublicKeySpec.class
- *
+ *
* @return either a DSAPrivateKeySpec or a DSAPublicKeySpec
- *
+ *
* @throws InvalidKeySpecException
* if "keySpec" is not a specification for DSAPublicKey or
* DSAPrivateKey
@@ -118,7 +118,7 @@
if (key != null) {
if (keySpec == null) {
throw new NullPointerException(Messages
- .getString("security.19E"));
+ .getString("security.19E"));
}
if (key instanceof DSAPrivateKey) {
DSAPrivateKey privateKey = (DSAPrivateKey) key;
@@ -141,7 +141,7 @@
}
throw new InvalidKeySpecException(Messages
- .getString("security.19C"));
+ .getString("security.19C"));
}
if (key instanceof DSAPublicKey) {
@@ -165,14 +165,14 @@
}
throw new InvalidKeySpecException(Messages
- .getString("security.19D"));
+ .getString("security.19D"));
}
}
- throw new InvalidKeySpecException(Messages.getString("security.19F"));
+ throw new InvalidKeySpecException(Messages.getString("security.19F"));
}
/**
- * The method generates a DSAPublicKey object from the provided key.
+ * The method generates a DSAPublicKey object from the provided key.
*
* @param
* key - a DSAPublicKey object or DSAPrivateKey object.
@@ -198,7 +198,7 @@
} catch (InvalidKeySpecException e) {
// Actually this exception shouldn't be thrown
throw new InvalidKeyException(Messages.getString(
- "security.1A0", e));
+ "security.1A0", e));
}
}
@@ -214,11 +214,11 @@
} catch (InvalidKeySpecException e) {
// Actually this exception shouldn't be thrown
throw new InvalidKeyException(Messages.getString(
- "security.1A1", e));
+ "security.1A1", e));
}
}
}
- throw new InvalidKeyException(Messages.getString("security.19F"));
+ throw new InvalidKeyException(Messages.getString("security.19F"));
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
index 27cb0a8..0bec866 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPrivateKeyImpl.java
@@ -65,7 +65,7 @@
*/
public DSAPrivateKeyImpl(DSAPrivateKeySpec keySpec) {
- super("DSA");
+ super("DSA");
PrivateKeyInfo pki;
@@ -77,7 +77,7 @@
.toByteArray(), q.toByteArray(), g.toByteArray());
AlgorithmIdentifier ai = new AlgorithmIdentifier(AlgNameMapper
- .map2OID("DSA"),
+ .map2OID("DSA"),
threeInts.getEncoded());
x = keySpec.getX();
@@ -99,7 +99,7 @@
public DSAPrivateKeyImpl(PKCS8EncodedKeySpec keySpec)
throws InvalidKeySpecException {
- super("DSA");
+ super("DSA");
AlgorithmIdentifier ai;
ThreeIntegerSequence threeInts = null;
@@ -115,7 +115,7 @@
.decode(encoding);
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19A", e));
+ "security.19A", e));
}
try {
@@ -123,7 +123,7 @@
privateKeyInfo.getPrivateKey()));
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19B", e));
+ "security.19B", e));
}
ai = privateKeyInfo.getAlgorithmIdentifier();
@@ -132,7 +132,7 @@
.decode(ai.getParameters());
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19B", e));
+ "security.19B", e));
}
p = new BigInteger(threeInts.p);
q = new BigInteger(threeInts.q);
@@ -140,7 +140,7 @@
params = new DSAParameterSpec(p, q, g);
setEncoding(encoding);
- /*
+ /*
* the following code implements RI behavior
*/
alg = ai.getAlgorithm();
@@ -155,7 +155,7 @@
public DSAParams getParams() {
return params;
}
-
+
private void readObject(java.io.ObjectInputStream in) throws NotActiveException, IOException, ClassNotFoundException {
in.defaultReadObject();
params = new DSAParameterSpec(p, q, g);
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPublicKeyImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
index 674fe97..6770f00 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/DSAPublicKeyImpl.java
@@ -19,7 +19,7 @@
* TODO
* 1. The class extends the PublicKeyImpl class in "org.apache.harmony.security" package.
*
- * 2. The class uses methods in the auxiliary non-public "ThreeIntegerSequence" class
+ * 2. The class uses methods in the auxiliary non-public "ThreeIntegerSequence" class
* defined along with the "DSAPrivateKeyImpl" class.
*
* 3. See a compatibility with RI comments
@@ -73,7 +73,7 @@
*/
public DSAPublicKeyImpl(DSAPublicKeySpec keySpec) {
- super("DSA");
+ super("DSA");
SubjectPublicKeyInfo spki;
@@ -85,7 +85,7 @@
.toByteArray(), q.toByteArray(), g.toByteArray());
AlgorithmIdentifier ai = new AlgorithmIdentifier(AlgNameMapper
- .map2OID("DSA"),
+ .map2OID("DSA"),
threeInts.getEncoded());
y = keySpec.getY();
@@ -107,7 +107,7 @@
public DSAPublicKeyImpl(X509EncodedKeySpec keySpec)
throws InvalidKeySpecException {
- super("DSA");
+ super("DSA");
AlgorithmIdentifier ai;
ThreeIntegerSequence threeInts = null;
@@ -123,7 +123,7 @@
.decode(encoding);
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19A", e));
+ "security.19A", e));
}
try {
@@ -131,7 +131,7 @@
subjectPublicKeyInfo.getSubjectPublicKey()));
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19B", e));
+ "security.19B", e));
}
ai = subjectPublicKeyInfo.getAlgorithmIdentifier();
@@ -141,7 +141,7 @@
.decode(ai.getParameters());
} catch (IOException e) {
throw new InvalidKeySpecException(Messages.getString(
- "security.19B", e));
+ "security.19B", e));
}
p = new BigInteger(threeInts.p);
q = new BigInteger(threeInts.q);
@@ -150,7 +150,7 @@
setEncoding(encoding);
- /*
+ /*
* the following code implements RI behavior
*/
alg = ai.getAlgorithm();
@@ -159,7 +159,7 @@
}
/**
- * @return
+ * @return
* a value of a public key (y).
*/
public BigInteger getY() {
@@ -167,13 +167,13 @@
}
/**
- * @return
+ * @return
* DSA key parameters (p, q, g).
*/
public DSAParams getParams() {
return params;
}
-
+
private void readObject(java.io.ObjectInputStream in) throws NotActiveException, IOException, ClassNotFoundException {
in.defaultReadObject();
params = new DSAParameterSpec(p, q, g);
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/RandomBitsSupplier.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/RandomBitsSupplier.java
index 390cd6f..c4b57ae 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/RandomBitsSupplier.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/RandomBitsSupplier.java
@@ -59,7 +59,7 @@
// shouldn't be slower, so we use that. Same might
// apply to other Linux platforms.
private static FileInputStream bis = null;
- // END android-changed
+ // END android-changed
/**
* File to connect to device
@@ -97,7 +97,7 @@
// // If we have come out of the above loop, then we have been unable to
// // access /dev/*random, so try to fall back to using the system random() API
// try {
-// System.loadLibrary(LIBRARY_NAME);
+// System.loadLibrary(LIBRARY_NAME);
// serviceAvailable = true;
// } catch (UnsatisfiedLinkError e) {
// serviceAvailable = false;
@@ -140,7 +140,7 @@
// hence, if it is happened there is some internal problem
if ( bytesRead == -1 ) {
throw new ProviderException(
- Messages.getString("security.193") );
+ Messages.getString("security.193") );
}
total += bytesRead;
@@ -148,7 +148,7 @@
if ( total >= numBytes ) {
break;
- }
+ }
}
} catch (IOException e) {
@@ -156,16 +156,16 @@
// hence, there is either some internal problem or, for instance,
// device was removed in runtime, or something else
throw new ProviderException(
- Messages.getString("security.194"), e );
+ Messages.getString("security.194"), e );
}
- return bytes;
+ return bytes;
}
// BEGIN android-removed
// /**
-// * On platforms with no "random" devices available, this native
-// * method uses system API calls to generate random numbers<BR>
+// * On platforms with no "random" devices available, this native
+// * method uses system API calls to generate random numbers<BR>
// *
// * In case of any runtime failure ProviderException gets thrown.
// */
@@ -187,14 +187,14 @@
public static byte[] getRandomBits(int numBytes) {
if ( numBytes <= 0 ) {
- throw new IllegalArgumentException(Messages.getString("security.195", numBytes));
+ throw new IllegalArgumentException(Messages.getString("security.195", numBytes));
}
// We have been unable to get a random device or fall back to the
// native security module code - throw an exception.
if ( !serviceAvailable ) {
throw new ProviderException(
- Messages.getString("security.196"));
+ Messages.getString("security.196"));
}
// BEGIN android-changed
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1Impl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1Impl.java
index 71c0384..706c3f6 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1Impl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1Impl.java
@@ -32,7 +32,7 @@
* "void updateHash(int[], byte[], int, int)" and "void computeHash(int[])", -
* performing the following operations. <BR>
* <BR>
- * The "updateHash(..)" method appends new bytes to existing ones
+ * The "updateHash(..)" method appends new bytes to existing ones
* within limit of a frame of 64 bytes (16 words).
* Once a length of accumulated bytes reaches the limit
* the "computeHash(int[])" method is invoked on the frame to compute updated hash,
@@ -40,7 +40,7 @@
* Thus, after appending all bytes, the frame contain only those bytes
* that were not used in computing final hash value yet. <BR>
* <BR>
- * The "computeHash(..)" method generates a 160 bit hash value using
+ * The "computeHash(..)" method generates a 160 bit hash value using
* a 512 bit message stored in first 16 words of int[] array argument and
* current hash value stored in five words, beginning HASH_OFFSET, of the array argument.
* Computation is done according to SHA-1 algorithm. <BR>
@@ -54,7 +54,7 @@
/**
- * The method generates a 160 bit hash value using
+ * The method generates a 160 bit hash value using
* a 512 bit message stored in first 16 words of int[] array argument and
* current hash value stored in five words, beginning OFFSET+1, of the array argument.
* Computation is done according to SHA-1 algorithm.
@@ -67,7 +67,7 @@
* In case of incorrect array passed to the method
* either NPE or IndexOutOfBoundException gets thrown by JVM.
*
- * @params
+ * @params
* arrW - integer array; arrW.length >= (BYTES_OFFSET+6); <BR>
* only first (BYTES_OFFSET+6) words are used
*/
@@ -97,8 +97,8 @@
for ( int t = 0 ; t < 20 ; t++ ) {
- temp = ( ( a<<5 ) | ( a>>>27 ) ) +
- ( ( b & c) | ((~b) & d) ) +
+ temp = ( ( a<<5 ) | ( a>>>27 ) ) +
+ ( ( b & c) | ((~b) & d) ) +
( e + arrW[t] + 0x5A827999 ) ;
e = d;
d = c;
@@ -143,7 +143,7 @@
}
/**
- * The method appends new bytes to existing ones
+ * The method appends new bytes to existing ones
* within limit of a frame of 64 bytes (16 words).
*
* Once a length of accumulated bytes reaches the limit
@@ -152,8 +152,8 @@
* Thus, after appending all bytes, the array contain only those bytes
* that were not used in computing final hash value yet.
*
- * No checks on arguments passed to the method, that is,
- * a calling method is responsible for such checks.
+ * No checks on arguments passed to the method, that is,
+ * a calling method is responsible for such checks.
*
* @params
* intArray - int array containing bytes to which to append;
@@ -163,7 +163,7 @@
* @params
* from - the offset to start in the "byteInput" array
* @params
- * to - a number of the last byte in the input array to use,
+ * to - a number of the last byte in the input array to use,
* that is, for first byte "to"==0, for last byte "to"==input.length-1
*/
static void updateHash(int intArray[], byte byteInput[], int fromByte, int toByte) {
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
index 88fb2d2..f090d5a 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1PRNG_SecureRandomImpl.java
@@ -46,7 +46,7 @@
private static final long serialVersionUID = 283736797212159675L;
// constants to use in expressions operating on bytes in int and long variables:
- // END_FLAGS - final bytes in words to append to message;
+ // END_FLAGS - final bytes in words to append to message;
// see "ch.5.1 Padding the Message, FIPS 180-2"
// RIGHT1 - shifts to right for left half of long
// RIGHT2 - shifts to right for right half of long
@@ -78,7 +78,7 @@
// note, that the exact value is not defined in STANDARD
// HASHCOPY_OFFSET - offset for copy of current hash in "copies" array
// EXTRAFRAME_OFFSET - offset for extra frame in "copies" array;
- // as the extra frame follows the current hash frame,
+ // as the extra frame follows the current hash frame,
// EXTRAFRAME_OFFSET is equal to length of current hash frame
// FRAME_OFFSET - offset for frame in "copies" array
// MAX_BYTES - maximum # of seed bytes processing which doesn't require extra frame
@@ -107,9 +107,9 @@
private static SHA1PRNG_SecureRandomImpl myRandom;
- // Structure of "seed" array:
+ // Structure of "seed" array:
// - 0-79 - words for computing hash
- // - 80 - unused
+ // - 80 - unused
// - 81 - # of seed bytes in current seed frame
// - 82-86 - 5 words, current seed hash
private transient int seed[];
@@ -119,8 +119,8 @@
// Structure of "copies" array
// - 0-4 - 5 words, copy of current seed hash
- // - 5-20 - extra 16 words frame;
- // is used if final padding exceeds 512-bit length
+ // - 5-20 - extra 16 words frame;
+ // is used if final padding exceeds 512-bit length
// - 21-36 - 16 word frame to store a copy of remaining bytes
private transient int copies[];
@@ -133,7 +133,7 @@
// variable required according to "SECURE HASH STANDARD"
private transient long counter;
- // contains int value corresponding to engine's current state
+ // contains int value corresponding to engine's current state
private transient int state;
// The "seed" array is used to compute both "current seed hash" and "next bytes".
@@ -148,11 +148,11 @@
// to preserve the latter for following "setSeed(..)" commands,
// the following technique is used:
// - upon getting "nextBytes(byte[])" invoked, single or first in row,
- // which requires computing new hash, that is,
+ // which requires computing new hash, that is,
// there is no more bytes remaining from previous "next bytes" computation,
// remaining bytes are copied into the 21-36 word frame of the "copies" array;
// - upon getting "setSeed(byte[])" invoked, single or first in row,
- // remaining bytes are copied back.
+ // remaining bytes are copied back.
/**
* Creates object and sets implementation variables to their initial values
@@ -178,7 +178,7 @@
* The method invokes the SHA1Impl's "updateHash(..)" method
* to update current seed frame and
* to compute new intermediate hash value if the frame is full.
- *
+ *
* After that it computes a length of whole seed.
*/
private void updateSeed(byte[] bytes) {
@@ -207,7 +207,7 @@
if (seed == null) {
throw new NullPointerException(
- Messages.getString("security.83", "seed"));
+ Messages.getString("security.83", "seed"));
}
if (state == NEXT_BYTES) { // first setSeed after NextBytes; restoring hash
@@ -238,7 +238,7 @@
byte[] myBytes; // byte[] for bytes returned by "nextBytes()"
if (numBytes < 0) {
- throw new NegativeArraySizeException(Messages.getString("security.171", numBytes));
+ throw new NegativeArraySizeException(Messages.getString("security.171", numBytes));
}
if (numBytes == 0) {
return new byte[0];
@@ -283,7 +283,7 @@
if (bytes == null) {
throw new NullPointerException(
- Messages.getString("security.83", "bytes"));
+ Messages.getString("security.83", "bytes"));
}
lastWord = seed[BYTES_OFFSET] == 0 ? 0
@@ -302,7 +302,7 @@
// possible cases for 64-byte frame:
//
- // seed bytes < 48 - remaining bytes are enough for all, 8 counter bytes,
+ // seed bytes < 48 - remaining bytes are enough for all, 8 counter bytes,
// 0x80, and 8 seedLength bytes; no extra frame required
// 48 < seed bytes < 56 - remaining 9 bytes are for 0x80 and 8 counter bytes
// extra frame contains only seedLength value at the end
@@ -311,15 +311,15 @@
// note, that beginning extra bytes are not more than 8,
// that is, only 2 extra words may be used
- // no need to set to "0" 3 words after "lastWord" and
- // more than two words behind frame
+ // no need to set to "0" 3 words after "lastWord" and
+ // more than two words behind frame
for (i = lastWord + 3; i < FRAME_LENGTH + 2; i++) {
seed[i] = 0;
}
bits = seedLength << 3 + 64; // transforming # of bytes into # of bits
- // putting # of bits into two last words (14,15) of 16 word frame in
+ // putting # of bits into two last words (14,15) of 16 word frame in
// seed or copies array depending on total length after padding
if (seed[BYTES_OFFSET] < MAX_BYTES) {
seed[14] = (int) (bits >>> 32);
@@ -339,7 +339,7 @@
nextByteToReturn = 0;
- // possibly not all of HASHBYTES_TO_USE bytes were used previous time
+ // possibly not all of HASHBYTES_TO_USE bytes were used previous time
n = (HASHBYTES_TO_USE - nextBIndex) < (bytes.length - nextByteToReturn) ? HASHBYTES_TO_USE
- nextBIndex
: bytes.length - nextByteToReturn;
@@ -429,7 +429,7 @@
// result may be 0
if (state != NEXT_BYTES) {
- // either the state is UNDEFINED or previous method was "setSeed(..)"
+ // either the state is UNDEFINED or previous method was "setSeed(..)"
// so in "seed[]" to serialize are remaining bytes (seed[0-nRemaining]) and
// current hash (seed[82-86])
@@ -516,7 +516,7 @@
for (int i = 0; i < FRAME_LENGTH; i++) {
seed[i] = ois.readInt();
}
- // reading remaining seed bytes
+ // reading remaining seed bytes
for (int i = 0; i < nRemaining; i++) {
copies[FRAME_LENGTH + EXTRAFRAME_OFFSET + i] = ois.readInt();
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_Data.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_Data.java
index 954d3f8..0e30e03 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_Data.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_Data.java
@@ -86,14 +86,14 @@
// /**
// * name of native library to use on Windows platform
// */
-// static final String LIBRARY_NAME = "hysecurity";
+// static final String LIBRARY_NAME = "hysecurity";
// END android-removed
/**
* names of random devices on Linux platform
*/
- // BEGIN android-changed: /dev/random seems to be empty on Android
- static final String DEVICE_NAMES[] = { "/dev/urandom" /*, "/dev/random" */ };
+ // BEGIN android-changed: /dev/random seems to be empty on Android
+ static final String DEVICE_NAMES[] = { "/dev/urandom" /*, "/dev/random" */ };
// END android-changed
}
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
index 95f4032..c51ecc6 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1_MessageDigestImpl.java
@@ -36,7 +36,7 @@
*/
-public class SHA1_MessageDigestImpl extends MessageDigestSpi
+public class SHA1_MessageDigestImpl extends MessageDigestSpi
implements Cloneable, SHA1_Data {
@@ -55,7 +55,7 @@
/**
* The constructor creates needed buffers and sets the engine at initial state
- */
+ */
public SHA1_MessageDigestImpl() {
// BYTES_OFFSET +6 is minimal length required by methods in SHA1Impl
@@ -70,7 +70,7 @@
/**
* The method performs final actions and invokes the "computeHash(int[])" method.
* In case if there is no enough words in current frame
- * after processing its data, extra frame is prepared and
+ * after processing its data, extra frame is prepared and
* the "computeHash(int[])" method is invoked second time. <BR>
*
* After processing, the method resets engine's state
@@ -96,7 +96,7 @@
// possible cases:
//
- // - buffer[BYTES_OFFSET] == 0 - buffer frame is empty,
+ // - buffer[BYTES_OFFSET] == 0 - buffer frame is empty,
// padding byte was 64th in previous frame
// current frame should contain only message's length
//
@@ -104,7 +104,7 @@
// no extra frame needed
// - lastWord = 14 - only one last, namely 15-th, word in frame doesn't contain bytes;
// extra frame is needed
- // - lastWord > 14 - last word in frame is not full;
+ // - lastWord > 14 - last word in frame is not full;
// extra frame is needed
if ( buffer[BYTES_OFFSET] != 0 ) {
@@ -185,45 +185,45 @@
*
* The method resets the engine. <BR>
*
- * The method overrides "engineDigest(byte[],int,int) in class MessageDigestSpi.
+ * The method overrides "engineDigest(byte[],int,int) in class MessageDigestSpi.
*
* @param
- * buf byte array to store a message digest returned
- * @param
- * offset a position in the array for first byte of the message digest
+ * buf byte array to store a message digest returned
* @param
- * len number of bytes within buffer allotted for the message digest;
- * as this implementation doesn't provide partial digests,
- * len should be >= 20, DigestException is thrown otherwise
+ * offset a position in the array for first byte of the message digest
+ * @param
+ * len number of bytes within buffer allotted for the message digest;
+ * as this implementation doesn't provide partial digests,
+ * len should be >= 20, DigestException is thrown otherwise
* @return
- * the length of the message digest stored in the "buf" buffer;
+ * the length of the message digest stored in the "buf" buffer;
* in this implementation the length=20
*
- * @throws IllegalArgumentException
+ * @throws IllegalArgumentException
* if null is passed to the "buf" argument <BR>
* if offset + len > buf.length <BR>
* if offset > buf.length or len > buf.length
*
- * @throws DigestException
- * if len < 20
+ * @throws DigestException
+ * if len < 20
*
- * @throws ArrayIndexOutOfBoundsException
+ * @throws ArrayIndexOutOfBoundsException
* if offset < 0
*/
- protected int engineDigest(byte[] buf, int offset, int len) throws DigestException {
+ protected int engineDigest(byte[] buf, int offset, int len) throws DigestException {
if ( buf == null ) {
- throw new IllegalArgumentException(Messages.getString("security.162"));
+ throw new IllegalArgumentException(Messages.getString("security.162"));
}
if ( offset > buf.length || len > buf.length || (len + offset) > buf.length ) {
throw new IllegalArgumentException(
- Messages.getString("security.163"));
+ Messages.getString("security.163"));
}
if ( len < DIGEST_LENGTH ) {
- throw new DigestException(Messages.getString("security.164"));
+ throw new DigestException(Messages.getString("security.164"));
}
if ( offset < 0 ) {
- throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset));
+ throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset));
}
processDigest(buf, offset);
@@ -240,10 +240,10 @@
* @return
* total length of current message digest as an int value
*/
- protected int engineGetDigestLength() {
- return DIGEST_LENGTH;
+ protected int engineGetDigestLength() {
+ return DIGEST_LENGTH;
}
-
+
/**
* Resets the engine. <BR>
@@ -293,11 +293,11 @@
* @param
* len a number of bytes to use
*
- * @throws NullPointerException
+ * @throws NullPointerException
* if null is passed to the "buf" argument
*
- * @throws IllegalArgumentException
- * if offset > buf.length or len > buf.length or
+ * @throws IllegalArgumentException
+ * if offset > buf.length or len > buf.length or
* (len + offset) > buf.length
* @throws ArrayIndexOutOfBoundsException
* offset < 0
@@ -305,17 +305,17 @@
protected void engineUpdate(byte[] input, int offset, int len) {
if ( input == null ) {
- throw new IllegalArgumentException(Messages.getString("security.166"));
+ throw new IllegalArgumentException(Messages.getString("security.166"));
}
if ( len <= 0 ) {
return;
}
if ( offset < 0 ) {
- throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset));
+ throw new ArrayIndexOutOfBoundsException(Messages.getString("security.165", offset));
}
if ( offset > input.length || len > input.length || (len + offset) > input.length ) {
throw new IllegalArgumentException(
- Messages.getString("security.167"));
+ Messages.getString("security.167"));
}
SHA1Impl.updateHash(buffer, input, offset, offset + len -1 );
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
index 7ec32d8..5931be7 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/SHA1withDSA_SignatureImpl.java
@@ -49,9 +49,9 @@
*/
public SHA1withDSA_SignatureImpl() throws NoSuchAlgorithmException {
- super("SHA1withDSA");
+ super("SHA1withDSA");
- msgDigest = MessageDigest.getInstance("SHA1");
+ msgDigest = MessageDigest.getInstance("SHA1");
}
/**
@@ -63,13 +63,13 @@
protected Object engineGetParameter(String param)
throws InvalidParameterException {
if (param == null) {
- throw new NullPointerException(Messages.getString("security.01"));
+ throw new NullPointerException(Messages.getString("security.01"));
}
return null;
}
/**
- * Initializes this signature object with PrivateKey object
+ * Initializes this signature object with PrivateKey object
* passed as argument to the method.
*
* @params
@@ -89,7 +89,7 @@
if (privateKey == null || !(privateKey instanceof DSAPrivateKey)) {
throw new InvalidKeyException(
- Messages.getString("security.168"));
+ Messages.getString("security.168"));
}
params = ((DSAPrivateKey) privateKey).getParams();
@@ -101,13 +101,13 @@
n = p.bitLength();
if (p.compareTo(BigInteger.valueOf(1)) != 1 || n < 512 || n > 1024
|| (n & 077) != 0) {
- throw new InvalidKeyException(Messages.getString("security.169"));
+ throw new InvalidKeyException(Messages.getString("security.169"));
}
if (q.signum() != 1 && q.bitLength() != 160) {
- throw new InvalidKeyException(Messages.getString("security.16A"));
+ throw new InvalidKeyException(Messages.getString("security.16A"));
}
if (x.signum() != 1 || x.compareTo(q) != -1) {
- throw new InvalidKeyException(Messages.getString("security.16B"));
+ throw new InvalidKeyException(Messages.getString("security.16B"));
}
dsaKey = (DSAKey) privateKey;
@@ -116,7 +116,7 @@
}
/**
- * Initializes this signature object with PublicKey object
+ * Initializes this signature object with PublicKey object
* passed as argument to the method.
*
* @params
@@ -134,7 +134,7 @@
if (publicKey == null || !(publicKey instanceof DSAPublicKey)) {
throw new InvalidKeyException(
- Messages.getString("security.16C"));
+ Messages.getString("security.16C"));
}
DSAParams params = ((DSAPublicKey) publicKey).getParams();
@@ -146,13 +146,13 @@
n1 = p.bitLength();
if (p.compareTo(BigInteger.valueOf(1)) != 1 || n1 < 512 || n1 > 1024
|| (n1 & 077) != 0) {
- throw new InvalidKeyException(Messages.getString("security.169"));
+ throw new InvalidKeyException(Messages.getString("security.169"));
}
if (q.signum() != 1 || q.bitLength() != 160) {
- throw new InvalidKeyException(Messages.getString("security.16A"));
+ throw new InvalidKeyException(Messages.getString("security.16A"));
}
if (y.signum() != 1) {
- throw new InvalidKeyException(Messages.getString("security.16D"));
+ throw new InvalidKeyException(Messages.getString("security.16D"));
}
dsaKey = (DSAKey) publicKey;
@@ -169,24 +169,24 @@
protected void engineSetParameter(String param, Object value)
throws InvalidParameterException {
if (param == null) {
- throw new NullPointerException(Messages.getString("security.83", "param"));
+ throw new NullPointerException(Messages.getString("security.83", "param"));
}
- throw new InvalidParameterException(Messages.getString("security.16E"));
+ throw new InvalidParameterException(Messages.getString("security.16E"));
}
/**
- * Returns signature bytes as byte array containing
+ * Returns signature bytes as byte array containing
* ASN1 representation for two BigInteger objects
* which is SEQUENCE of two INTEGERS.
* Length of sequence varies from less than 46 to 48.
*
- * Resets object to the state it was in
+ * Resets object to the state it was in
* when previous call to either "initSign" method was called.
*
* @return
* byte array containing signature in ASN1 representation
* @throws
- * SignatureException if object's state is not SIGN or
+ * SignatureException if object's state is not SIGN or
* signature algorithm cannot process data
*/
@@ -200,7 +200,7 @@
// parameters and private key
BigInteger p, q, g, x;
- // BigInteger for message digest
+ // BigInteger for message digest
BigInteger digestBI;
// various byte array being used in computing signature
@@ -249,7 +249,7 @@
}
// forming signature's ASN1 representation which is SEQUENCE of two INTEGERs
- //
+ //
rBytes = r.toByteArray();
n1 = rBytes.length;
if ((rBytes[0] & 0x80) != 0) {
@@ -345,12 +345,12 @@
|| sigBytes[offset + 1] != (n1 + n2 + 4) || n1 > 21
|| n2 > 21
|| (length != 0 && (sigBytes[offset + 1] + 2) > length)) {
- throw new SignatureException(Messages.getString("security.16F"));
+ throw new SignatureException(Messages.getString("security.16F"));
}
dummy = sigBytes[5 + n1 + n2]; // to check length of sigBytes
} catch (ArrayIndexOutOfBoundsException e) {
- throw new SignatureException(Messages.getString("security.170"));
+ throw new SignatureException(Messages.getString("security.170"));
}
digest = msgDigest.digest();
@@ -404,7 +404,7 @@
protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
if (sigBytes == null) {
- throw new NullPointerException(Messages.getString("security.83", "sigBytes"));
+ throw new NullPointerException(Messages.getString("security.83", "sigBytes"));
}
return checkSignature(sigBytes, 0, 0);
diff --git a/luni/src/main/java/org/apache/harmony/security/provider/crypto/ThreeIntegerSequence.java b/luni/src/main/java/org/apache/harmony/security/provider/crypto/ThreeIntegerSequence.java
index 41eeb45..4f4232a 100644
--- a/luni/src/main/java/org/apache/harmony/security/provider/crypto/ThreeIntegerSequence.java
+++ b/luni/src/main/java/org/apache/harmony/security/provider/crypto/ThreeIntegerSequence.java
@@ -26,7 +26,7 @@
/**
* The auxiliary class providing means to process ASN1Sequence of three Integers.
- * Such sequences are parts of ASN1 encoded formats for DSA private and public keys.
+ * Such sequences are parts of ASN1 encoded formats for DSA private and public keys.
*/
class ThreeIntegerSequence {
diff --git a/luni/src/main/java/org/apache/harmony/security/utils/AlgNameMapper.java b/luni/src/main/java/org/apache/harmony/security/utils/AlgNameMapper.java
index 150d9b9..44a04cd 100644
--- a/luni/src/main/java/org/apache/harmony/security/utils/AlgNameMapper.java
+++ b/luni/src/main/java/org/apache/harmony/security/utils/AlgNameMapper.java
@@ -38,12 +38,12 @@
* providers during initialization.
*/
public class AlgNameMapper {
-
+
// Will search OID mappings for these services
private static final String[] serviceName = {
- "Cipher",
- "AlgorithmParameters",
- "Signature"
+ "Cipher",
+ "AlgorithmParameters",
+ "Signature"
};
// These mappings CAN NOT be overridden
@@ -51,29 +51,29 @@
// during maps initialization
// (source: http://asn1.elibel.tm.fr):
private static final String[][] knownAlgMappings = {
- {"1.2.840.10040.4.1", "DSA"},
- {"1.2.840.10040.4.3", "SHA1withDSA"},
- {"1.2.840.113549.1.1.1", "RSA"},
+ {"1.2.840.10040.4.1", "DSA"},
+ {"1.2.840.10040.4.3", "SHA1withDSA"},
+ {"1.2.840.113549.1.1.1", "RSA"},
// BEGIN android-removed
// Dropping MD2
- // {"1.2.840.113549.1.1.2", "MD2withRSA"},
+ // {"1.2.840.113549.1.1.2", "MD2withRSA"},
// END android-removed
- {"1.2.840.113549.1.1.4", "MD5withRSA"},
- {"1.2.840.113549.1.1.5", "SHA1withRSA"},
- {"1.2.840.113549.1.3.1", "DiffieHellman"},
- {"1.2.840.113549.1.5.3", "pbeWithMD5AndDES-CBC"},
- {"1.2.840.113549.1.12.1.3", "pbeWithSHAAnd3-KeyTripleDES-CBC"},
- {"1.2.840.113549.1.12.1.6", "pbeWithSHAAnd40BitRC2-CBC"},
- {"1.2.840.113549.3.2", "RC2-CBC"},
- {"1.2.840.113549.3.3", "RC2-EBC"},
- {"1.2.840.113549.3.4", "RC4"},
- {"1.2.840.113549.3.5", "RC4WithMAC"},
- {"1.2.840.113549.3.6", "DESx-CBC"},
- {"1.2.840.113549.3.7", "TripleDES-CBC"},
- {"1.2.840.113549.3.8", "rc5CBC"},
- {"1.2.840.113549.3.9", "RC5-CBC"},
- {"1.2.840.113549.3.10", "DESCDMF"},
- {"2.23.42.9.11.4.1", "ECDSA"},
+ {"1.2.840.113549.1.1.4", "MD5withRSA"},
+ {"1.2.840.113549.1.1.5", "SHA1withRSA"},
+ {"1.2.840.113549.1.3.1", "DiffieHellman"},
+ {"1.2.840.113549.1.5.3", "pbeWithMD5AndDES-CBC"},
+ {"1.2.840.113549.1.12.1.3", "pbeWithSHAAnd3-KeyTripleDES-CBC"},
+ {"1.2.840.113549.1.12.1.6", "pbeWithSHAAnd40BitRC2-CBC"},
+ {"1.2.840.113549.3.2", "RC2-CBC"},
+ {"1.2.840.113549.3.3", "RC2-EBC"},
+ {"1.2.840.113549.3.4", "RC4"},
+ {"1.2.840.113549.3.5", "RC4WithMAC"},
+ {"1.2.840.113549.3.6", "DESx-CBC"},
+ {"1.2.840.113549.3.7", "TripleDES-CBC"},
+ {"1.2.840.113549.3.8", "rc5CBC"},
+ {"1.2.840.113549.3.9", "RC5-CBC"},
+ {"1.2.840.113549.3.10", "DESCDMF"},
+ {"2.23.42.9.11.4.1", "ECDSA"},
};
// Maps alg name to OID
private static final Map<String, String> alg2OidMap = new HashMap<String, String>();
@@ -102,10 +102,10 @@
}
}
- // No instances
+ // No instances
private AlgNameMapper() {
}
-
+
/**
* Returns OID for algName
*
@@ -148,7 +148,7 @@
private static void selectEntries(Provider p) {
Set<Map.Entry<Object, Object>> entrySet = p.entrySet();
for (String service : serviceName) {
- String keyPrfix2find = "Alg.Alias." + service + ".";
+ String keyPrfix2find = "Alg.Alias." + service + ".";
for (Entry<Object, Object> me : entrySet) {
String key = (String)me.getKey();
if (key.startsWith(keyPrfix2find)) {
@@ -156,7 +156,7 @@
String alg = (String)me.getValue();
String algUC = Util.toUpperCase(alg);
if (isOID(alias)) {
- if (alias.startsWith("OID.")) {
+ if (alias.startsWith("OID.")) {
alias = alias.substring(4);
}
// Do not overwrite already known mappings
@@ -165,7 +165,7 @@
if (!oid2AlgContains || !alg2OidContains) {
if (!oid2AlgContains) {
oid2AlgMap.put(alias, algUC);
- }
+ }
if (!alg2OidContains) {
alg2OidMap.put(algUC, alias);
}
@@ -180,12 +180,12 @@
}
}
}
-
+
/**
* Checks if parameter represents OID
*
* @param alias alias to be checked
- * @return 'true' if parameter represents OID
+ * @return 'true' if parameter represents OID
*/
public static boolean isOID(String alias) {
// BEGIN android-changed
@@ -197,10 +197,10 @@
* Removes leading "OID." from oid String passed
*
* @param oid string that may contain leading "OID."
- * @return string passed without leading "OID."
+ * @return string passed without leading "OID."
*/
public static String normalize(String oid) {
- return oid.startsWith("OID.")
+ return oid.startsWith("OID.")
? oid.substring(4)
: oid;
}
@@ -210,11 +210,11 @@
* @return Internal maps String representation
*/
public static String dump() {
- StringBuilder sb = new StringBuilder("alg2OidMap: ");
+ StringBuilder sb = new StringBuilder("alg2OidMap: ");
sb.append(alg2OidMap);
- sb.append("\noid2AlgMap: ");
+ sb.append("\noid2AlgMap: ");
sb.append(oid2AlgMap);
- sb.append("\nalgAliasesMap: ");
+ sb.append("\nalgAliasesMap: ");
sb.append(algAliasesMap);
return sb.toString();
}
diff --git a/luni/src/main/java/org/apache/harmony/security/utils/Array.java b/luni/src/main/java/org/apache/harmony/security/utils/Array.java
index 1bb50d9..afcb19d 100644
--- a/luni/src/main/java/org/apache/harmony/security/utils/Array.java
+++ b/luni/src/main/java/org/apache/harmony/security/utils/Array.java
@@ -25,7 +25,7 @@
/**
* Utility class for arrays
- *
+ *
*/
public class Array {
@@ -38,18 +38,18 @@
* for printing. Array length can be up to 32767
*
* @param array to be represented as <code>String</code>
- *
+ *
* @return <code>String</code> representation of the <code>array</code>
*/
public static String toString(byte[] array, String prefix) {
// Prefixes to be added to the offset values
// in <code>String toString(byte[], String)</code> method
final String[] offsetPrefix = {
- "",
- "000",
- "00",
- "0",
- ""
+ "",
+ "000",
+ "00",
+ "0",
+ ""
};
StringBuilder sb = new StringBuilder();
StringBuilder charForm = new StringBuilder();
@@ -93,12 +93,12 @@
if (i%16 != 0) {
int ws2add = 16 - i%16;
for (int j=0; j<ws2add; j++) {
- sb.append(" ");
+ sb.append(" ");
}
if (ws2add > 8) {
sb.append(' ');
}
- sb.append(" ");
+ sb.append(" ");
sb.append(charForm.toString());
sb.append('\n');
}
diff --git a/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java b/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java
index f3a2ba3..8c51adb 100644
--- a/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java
+++ b/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java
@@ -60,8 +60,8 @@
new int[] {1, 2, 840, 113549, 1, 9, 4};
/**
- * This method handle all the work with PKCS7, ASN1 encoding, signature verifying,
- * and certification path building.
+ * This method handle all the work with PKCS7, ASN1 encoding, signature verifying,
+ * and certification path building.
* See also PKCS #7: Cryptographic Message Syntax Standard:
* http://www.ietf.org/rfc/rfc2315.txt
* @param signature - the input stream of signature file to be verified
@@ -70,14 +70,14 @@
* @throws IOException - if some errors occurs during reading from the stream
* @throws GeneralSecurityException - if signature verification process fails
*/
- public static Certificate[] verifySignature(InputStream signature, InputStream
+ public static Certificate[] verifySignature(InputStream signature, InputStream
signatureBlock) throws IOException, GeneralSecurityException {
BerInputStream bis = new BerInputStream(signatureBlock);
- ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis);
+ ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis);
SignedData signedData = info.getSignedData();
if (signedData == null) {
- throw new IOException(Messages.getString("security.173"));
+ throw new IOException(Messages.getString("security.173"));
}
Collection encCerts = signedData.getCertificates();
if (encCerts.isEmpty()) {
@@ -106,7 +106,7 @@
// Locate the certificate
int issuerSertIndex = 0;
for (i = 0; i < certs.length; i++) {
- if (issuer.equals(certs[i].getIssuerDN()) &&
+ if (issuer.equals(certs[i].getIssuerDN()) &&
snum.equals(certs[i].getSerialNumber())) {
issuerSertIndex = i;
break;
@@ -117,7 +117,7 @@
}
if (certs[issuerSertIndex].hasUnsupportedCriticalExtension()) {
- throw new SecurityException(Messages.getString("security.174"));
+ throw new SecurityException(Messages.getString("security.174"));
}
// Get Signature instance
@@ -126,8 +126,8 @@
String dea = sigInfo.getDigestEncryptionAlgorithm();
String alg = null;
if (da != null && dea != null) {
- alg = da + "with" + dea;
- try{
+ alg = da + "with" + dea;
+ try{
// BEGIN android-removed
// sig = OpenSSLSignature.getInstance(alg);
// END android-removed
@@ -141,7 +141,7 @@
if (alg == null) {
return null;
}
- try{
+ try{
// BEGIN android-removed
// sig = OpenSSLSignature.getInstance(alg);
// END android-removed
@@ -163,7 +163,7 @@
signature.read(sfBytes);
if (atr == null) {
- sig.update(sfBytes);
+ sig.update(sfBytes);
} else {
sig.update(sigInfo.getEncodedAuthenticatedAttributes());
@@ -185,18 +185,18 @@
// END android-added
byte[] computedDigest = md.digest(sfBytes);
if (!Arrays.equals(existingDigest, computedDigest)) {
- throw new SecurityException(Messages.getString("security.175"));
+ throw new SecurityException(Messages.getString("security.175"));
}
}
}
if (!sig.verify(sigInfo.getEncryptedDigest())) {
- throw new SecurityException(Messages.getString("security.176"));
+ throw new SecurityException(Messages.getString("security.176"));
}
return createChain(certs[issuerSertIndex], certs);
}
-
+
private static X509Certificate[] createChain(X509Certificate signer, X509Certificate[] candidates) {
LinkedList chain = new LinkedList();
chain.add(0, signer);
diff --git a/luni/src/main/java/org/apache/harmony/security/utils/ObjectIdentifier.java b/luni/src/main/java/org/apache/harmony/security/utils/ObjectIdentifier.java
index 1d64e93..3e69e37 100644
--- a/luni/src/main/java/org/apache/harmony/security/utils/ObjectIdentifier.java
+++ b/luni/src/main/java/org/apache/harmony/security/utils/ObjectIdentifier.java
@@ -27,15 +27,15 @@
/**
* Instance of this class represents ObjectIdentifier (OID).
- *
+ *
* OID is represented as a sequence of subidentifier.
* Each subidentifier is represented as non negative integer value.
* There are at least 2 subidentifiers in the sequence.
- *
+ *
* Valid values for first subidentifier are 0, 1 and 2.
* If the first subidentifier has 0 or 1 value the second
* subidentifier MUST be less then 40.
- *
+ *
* @see <a href="http://asn1.elibel.tm.fr/en/standards/index.htm">ASN.1</a>
*/
@@ -61,7 +61,7 @@
/**
* Creates ObjectIdentifier(OID) from array of integers.
- *
+ *
* @param oid - array of integers
* @return - OID object
* @throws NullPointerException - if oid is null
@@ -76,7 +76,7 @@
/**
* Creates ObjectIdentifier(OID) from array of integers.
- *
+ *
* @param oid - array of integers
* @param name - name of OID
* @param oidGroup - OID's group. Is used to separate different OID's
@@ -88,7 +88,7 @@
this(oid);
if (oidGroup == null) {
- throw new NullPointerException(Messages.getString("security.172"));
+ throw new NullPointerException(Messages.getString("security.172"));
}
this.group = oidGroup;
@@ -98,16 +98,16 @@
/**
* Gets OID.
- *
+ *
* @return oid
*/
public int[] getOid() {
return oid;
}
-
+
/**
* Gets OID's name.
- *
+ *
* @return name
*/
public String getName() {
@@ -116,7 +116,7 @@
/**
* Gets OID's group.
- *
+ *
* @return group
*/
public Object getGroup() {
@@ -125,7 +125,7 @@
/**
* Compares object with OID for equality.
- *
+ *
* @return true if object is ObjectIdentifier and it has the same
* representation as array of integers, otherwise false
*/
@@ -141,19 +141,19 @@
/**
* Add "OID." to the beginning of string representation.
- *
+ *
* @return oid as string
*/
public String toOIDString() {
if (sOID == null) {
- sOID = "OID." + toString();
+ sOID = "OID." + toString();
}
return sOID;
}
/**
* Overrides Object.toString()
- *
+ *
* @return oid as string
*/
public String toString() {
@@ -182,7 +182,7 @@
/**
* Validates ObjectIdentifier (OID).
- *
+ *
* @param oid - oid as array of integers
* @throws NullPointerException - if oid is null
* @throws IllegalArgumentException - if oid is invalid
@@ -190,26 +190,26 @@
public static void validateOid(int[] oid) {
if (oid == null) {
- throw new NullPointerException(Messages.getString("security.98"));
+ throw new NullPointerException(Messages.getString("security.98"));
}
if (oid.length < 2) {
throw new IllegalArgumentException(
- Messages.getString("security.99"));
+ Messages.getString("security.99"));
}
if (oid[0] > 2) {
throw new IllegalArgumentException(
- Messages.getString("security.9A"));
+ Messages.getString("security.9A"));
} else if (oid[0] != 2 && oid[1] > 39) {
throw new IllegalArgumentException(
- Messages.getString("security.9B"));
+ Messages.getString("security.9B"));
}
}
/**
* Returns hash code for array of integers
- *
+ *
* @param oid - array of integers
*/
public static int hashIntArray(int[] array) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/AttributeType.java b/luni/src/main/java/org/apache/harmony/security/x501/AttributeType.java
index a730e4f..6e11358 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/AttributeType.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/AttributeType.java
@@ -27,9 +27,9 @@
/**
* X.501 Attribute Type
- *
+ *
* This is a draft class for Module InformationFramework (X.501).
- *
+ *
* @see <a href="http://www.itu.int/ITU-T/asn1/database/itu-t/x/x501/2001/InformationFramework.html">X.501</a>
*/
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValue.java b/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValue.java
index c4810ce..3a91072 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValue.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValue.java
@@ -95,7 +95,7 @@
// Street attribute (name from RFC 1779)
private static final ObjectIdentifier STREET;
- // Surname attribute (comes from an individual's parent name)
+ // Surname attribute (comes from an individual's parent name)
// (name from API spec)
private static final ObjectIdentifier SURNAME;
@@ -139,47 +139,47 @@
KNOWN_OIDS = new ObjectIdentifier[SIZE][CAPACITY];
// init known attribute type keywords
- C = new ObjectIdentifier(new int[] { 2, 5, 4, 6 }, "C", RFC1779_NAMES);
- CN = new ObjectIdentifier(new int[] { 2, 5, 4, 3 }, "CN", RFC1779_NAMES);
+ C = new ObjectIdentifier(new int[] { 2, 5, 4, 6 }, "C", RFC1779_NAMES);
+ CN = new ObjectIdentifier(new int[] { 2, 5, 4, 3 }, "CN", RFC1779_NAMES);
DC = new ObjectIdentifier(
- new int[] { 0, 9, 2342, 19200300, 100, 1, 25 }, "DC",
+ new int[] { 0, 9, 2342, 19200300, 100, 1, 25 }, "DC",
RFC2253_NAMES);
// DN qualifier aliases
- DNQ = new ObjectIdentifier(new int[] { 2, 5, 4, 46 }, "DNQ",
+ DNQ = new ObjectIdentifier(new int[] { 2, 5, 4, 46 }, "DNQ",
RFC2459_NAMES);
DNQUALIFIER = new ObjectIdentifier(new int[] { 2, 5, 4, 46 },
- "DNQUALIFIER", RFC2459_NAMES);
+ "DNQUALIFIER", RFC2459_NAMES);
EMAILADDRESS = new ObjectIdentifier(new int[] { 1, 2, 840, 113549, 1,
- 9, 1 }, "EMAILADDRESS", RFC2459_NAMES);
+ 9, 1 }, "EMAILADDRESS", RFC2459_NAMES);
GENERATION = new ObjectIdentifier(new int[] { 2, 5, 4, 44 },
- "GENERATION", RFC2459_NAMES);
+ "GENERATION", RFC2459_NAMES);
GIVENNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 42 },
- "GIVENNAME", RFC2459_NAMES);
+ "GIVENNAME", RFC2459_NAMES);
- INITIALS = new ObjectIdentifier(new int[] { 2, 5, 4, 43 }, "INITIALS",
+ INITIALS = new ObjectIdentifier(new int[] { 2, 5, 4, 43 }, "INITIALS",
RFC2459_NAMES);
- L = new ObjectIdentifier(new int[] { 2, 5, 4, 7 }, "L", RFC1779_NAMES);
+ L = new ObjectIdentifier(new int[] { 2, 5, 4, 7 }, "L", RFC1779_NAMES);
- O = new ObjectIdentifier(new int[] { 2, 5, 4, 10 }, "O", RFC1779_NAMES);
- OU = new ObjectIdentifier(new int[] { 2, 5, 4, 11 }, "OU",
+ O = new ObjectIdentifier(new int[] { 2, 5, 4, 10 }, "O", RFC1779_NAMES);
+ OU = new ObjectIdentifier(new int[] { 2, 5, 4, 11 }, "OU",
RFC1779_NAMES);
SERIALNUMBER = new ObjectIdentifier(new int[] { 2, 5, 4, 5 },
- "SERIALNUMBER", RFC2459_NAMES);
- ST = new ObjectIdentifier(new int[] { 2, 5, 4, 8 }, "ST", RFC1779_NAMES);
- STREET = new ObjectIdentifier(new int[] { 2, 5, 4, 9 }, "STREET",
+ "SERIALNUMBER", RFC2459_NAMES);
+ ST = new ObjectIdentifier(new int[] { 2, 5, 4, 8 }, "ST", RFC1779_NAMES);
+ STREET = new ObjectIdentifier(new int[] { 2, 5, 4, 9 }, "STREET",
RFC1779_NAMES);
- SURNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 4 }, "SURNAME",
+ SURNAME = new ObjectIdentifier(new int[] { 2, 5, 4, 4 }, "SURNAME",
RFC2459_NAMES);
- T = new ObjectIdentifier(new int[] { 2, 5, 4, 12 }, "T", RFC2459_NAMES);
+ T = new ObjectIdentifier(new int[] { 2, 5, 4, 12 }, "T", RFC2459_NAMES);
UID = new ObjectIdentifier(
- new int[] { 0, 9, 2342, 19200300, 100, 1, 1 }, "UID",
+ new int[] { 0, 9, 2342, 19200300, 100, 1, 1 }, "UID",
RFC2253_NAMES);
//
@@ -218,7 +218,7 @@
// Init KNOWN_OIDS pool
//
- // add from RFC2253 (includes RFC1779)
+ // add from RFC2253 (includes RFC1779)
Iterator it = RFC2253_NAMES.values().iterator();
while (it.hasNext()) {
addOID((ObjectIdentifier) it.next());
@@ -264,7 +264,7 @@
/**
* Creates AttributeTypeAndValue with OID and AttributeValue. Parses OID
* string representation
- *
+ *
* @param sOid
* string representation of OID
* @param value
@@ -288,7 +288,7 @@
} else {
this.oid = (ObjectIdentifier) KNOWN_NAMES.get(Util.toUpperCase(sOid));
if (this.oid == null) {
- throw new IOException(Messages.getString("security.178", sOid));
+ throw new IOException(Messages.getString("security.178", sOid));
}
}
this.value = value;
@@ -296,7 +296,7 @@
/**
* Appends AttributeTypeAndValue string representation
- *
+ *
* @param attrFormat - format of DN
* @param buf - string buffer to be used
*/
@@ -361,7 +361,7 @@
/**
* Gets type of the AttributeTypeAndValue
- *
+ *
* @return ObjectIdentifier
*/
public ObjectIdentifier getType() {
@@ -369,15 +369,15 @@
}
/**
- * According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt)
+ * According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt)
* X.501 AttributeTypeAndValue structure is defined as follows:
- *
+ *
* AttributeTypeAndValue ::= SEQUENCE {
* type AttributeType,
* value AttributeValue }
- *
+ *
* AttributeType ::= OBJECT IDENTIFIER
- *
+ *
* AttributeValue ::= ANY DEFINED BY AttributeType
* ...
* DirectoryString ::= CHOICE {
@@ -386,7 +386,7 @@
* universalString UniversalString (SIZE (1..MAX)),
* utf8String UTF8String (SIZE (1.. MAX)),
* bmpString BMPString (SIZE (1..MAX)) }
- *
+ *
*/
public static final ASN1Type attributeValue = new ASN1Type(
@@ -417,7 +417,7 @@
public Object getDecodedObject(BerInputStream in) throws IOException {
// stub to avoid wrong decoder usage
- throw new RuntimeException(Messages.getString("security.179"));
+ throw new RuntimeException(Messages.getString("security.179"));
}
//
@@ -438,7 +438,7 @@
}
public void setEncodingContent(BerOutputStream out) {
-
+
AttributeValue av = (AttributeValue) out.content;
if (av.encoded != null) {
@@ -455,7 +455,7 @@
out.content = av;
} else {
try {
- av.bytes = av.rawString.getBytes("UTF-8");
+ av.bytes = av.rawString.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e.getMessage());
}
@@ -466,7 +466,7 @@
public void encodeContent(BerOutputStream out) {
// stub to avoid wrong encoder usage
- throw new RuntimeException(Messages.getString("security.17A"));
+ throw new RuntimeException(Messages.getString("security.17A"));
}
public int getEncodedLength(BerOutputStream out) { //FIXME name
@@ -503,7 +503,7 @@
int index = hashIntArray(oid) % CAPACITY;
- // look for OID in the pool
+ // look for OID in the pool
ObjectIdentifier[] list = KNOWN_OIDS[index];
for (int i = 0; list[i] != null; i++) {
if (Arrays.equals(oid, list[i].getOid())) {
@@ -520,21 +520,21 @@
int[] newOid = oid.getOid();
int index = hashIntArray(newOid) % CAPACITY;
- // look for OID in the pool
+ // look for OID in the pool
ObjectIdentifier[] list = KNOWN_OIDS[index];
int i = 0;
for (; list[i] != null; i++) {
// check wrong static initialization: no duplicate OIDs
if (Arrays.equals(newOid, list[i].getOid())) {
- throw new Error(Messages.getString("security.17B",
+ throw new Error(Messages.getString("security.17B",
oid.getName(), list[i].getName()));
}
}
// check : to avoid NPE
if (i == (CAPACITY - 1)) {
- throw new Error(Messages.getString("security.17C"));
+ throw new Error(Messages.getString("security.17C"));
}
list[i] = oid;
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValueComparator.java b/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValueComparator.java
index 30d71e7..dad1f03 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValueComparator.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/AttributeTypeAndValueComparator.java
@@ -29,7 +29,7 @@
/**
* AttributeTypeAndValue comparator
- *
+ *
*/
public class AttributeTypeAndValueComparator implements Comparator, Serializable {
@@ -37,7 +37,7 @@
/**
* compares two AttributeTypeAndValues
- *
+ *
* @param obj1
* first AttributeTypeAndValue
* @param obj2
@@ -66,10 +66,10 @@
return compateOids(atav1.getType(), atav2.getType());
}
-
+
/**
* compares two Object identifiers
- *
+ *
* @param oid1
* first OID
* @param oid2
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/AttributeValue.java b/luni/src/main/java/org/apache/harmony/security/x501/AttributeValue.java
index 0844c5e..6710a92 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/AttributeValue.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/AttributeValue.java
@@ -168,7 +168,7 @@
//
// Escapes:
- // 1) chars ",", "+", """, "\", "<", ">", ";" (RFC 2253)
+ // 1) chars ",", "+", """, "\", "<", ">", ";" (RFC 2253)
// 2) chars "#", "=" (required by RFC 1779)
// 3) a space char at the beginning or end
// 4) according to the requirement to be RFC 1779 compatible:
@@ -190,7 +190,7 @@
case ' ':
if (index == 0 || index == (length - 1)) {
- // escape first or last space
+ // escape first or last space
buf.append('\\');
}
buf.append(' ');
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/Attributes.java b/luni/src/main/java/org/apache/harmony/security/x501/Attributes.java
index 38c6f4f..294fc8f 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/Attributes.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/Attributes.java
@@ -30,26 +30,26 @@
/**
* X.501 Attributes
- *
+ *
* This is a draft class for Module InformationFramework (X.501).
- *
+ *
* @see <a href="http://www.itu.int/ITU-T/asn1/database/itu-t/x/x501/2001/InformationFramework.html">X.501</a>
*/
public class Attributes {
-
+
/**
* The class corresponds to following ASN.1 type:
- *
+ *
* Attribute ::= SEQUENCE {
* type AttributeType,
* values SET SIZE (0..MAX) OF AttributeValue }
- *
+ *
* AttributeType ::= OBJECT IDENTIFIER
- *
+ *
* AttributeValue ::= ANY DEFINED BY AttributeType
- *
+ *
*/
public static ASN1Sequence getASN1(InformationObjectSet set) {
ASN1OpenType.Id id = new ASN1OpenType.Id();
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/DirectoryString.java b/luni/src/main/java/org/apache/harmony/security/x501/DirectoryString.java
index aafb8b5..3e21b1b 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/DirectoryString.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/DirectoryString.java
@@ -29,7 +29,7 @@
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the DirectoryString structure
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -42,12 +42,12 @@
* printableString PrintableString (SIZE (1..MAX)),
* universalString UniversalString (SIZE (1..MAX)),
* utf8String UTF8String (SIZE (1..MAX)),
- * bmpString BMPString (SIZE (1..MAX))
+ * bmpString BMPString (SIZE (1..MAX))
* }
* </pre>
*/
public class DirectoryString {
-
+
public static final ASN1Choice ASN1 = new ASN1Choice(new ASN1Type[] {
ASN1StringType.TELETEXSTRING,
ASN1StringType.PRINTABLESTRING,
diff --git a/luni/src/main/java/org/apache/harmony/security/x501/Name.java b/luni/src/main/java/org/apache/harmony/security/x501/Name.java
index 123c0e3..7761776 100644
--- a/luni/src/main/java/org/apache/harmony/security/x501/Name.java
+++ b/luni/src/main/java/org/apache/harmony/security/x501/Name.java
@@ -62,7 +62,7 @@
/**
* Creates new <code>Name</code> instance from its DER encoding
- *
+ *
* @param encoding - ASN.1 DER encoding
* @throws IOException - if encoding is wrong
*/
@@ -71,7 +71,7 @@
DerInputStream in = new DerInputStream(encoding);
if (in.getEndOffset() != encoding.length) {
- throw new IOException(Messages.getString("security.111"));
+ throw new IOException(Messages.getString("security.111"));
}
ASN1.decode(in);
@@ -81,7 +81,7 @@
/**
* Creates new <code>Name</code> instance
- *
+ *
* @param name - Name as String
* @throws IOException - if string is wrong
*/
@@ -97,17 +97,17 @@
/**
* Returns <code>X500Principal</code> instance corresponding to this
* <code>Name</code> instance
- *
+ *
* @return equivalent X500Principal object
*/
public X500Principal getX500Principal(){
return new X500Principal(getName0(X500Principal.RFC2253));
}
-
+
/**
* Returns Relative Distinguished Name as <code>String</code> according
* the format requested
- *
+ *
* @param format
* Name format requested
* @return Relative Distinguished Name as <code>String</code> according
@@ -165,21 +165,21 @@
return canonicalString;
} else {
- throw new IllegalArgumentException(Messages.getString("security.177", format));
+ throw new IllegalArgumentException(Messages.getString("security.177", format));
}
}
/**
* Returns Relative Distinguished Name as <code>String</code> according
* the format requested, format is int value
- *
+ *
* @param format
* Name format requested
* @return Relative Distinguished Name as <code>String</code> according
* the format requested
*/
private String getName0(String format) {
-
+
StringBuffer name = new StringBuffer();
// starting with the last element and moving to the first.
@@ -201,7 +201,7 @@
if (it.hasNext()) {
// multi-valued RDN
if (X500Principal.RFC1779 == format) {
- name.append(" + ");
+ name.append(" + ");
} else {
name.append('+');
}
@@ -225,7 +225,7 @@
/**
* Gets encoded form of DN
- *
+ *
* @return return encoding, no copying is performed
*/
public byte[] getEncoded() {
@@ -236,17 +236,17 @@
}
/**
- * According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt)
+ * According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt)
* X.501 Name structure is defined as follows:
- *
+ *
* Name ::= CHOICE {
* RDNSequence }
- *
+ *
* RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
- *
+ *
* RelativeDistinguishedName ::=
* SET OF AttributeTypeAndValue
- *
+ *
*/
public static final ASN1SetOf ASN1_RDN = new ASN1SetOf(
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/AccessDescription.java b/luni/src/main/java/org/apache/harmony/security/x509/AccessDescription.java
index cbb4330..c539f37 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/AccessDescription.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/AccessDescription.java
@@ -30,27 +30,27 @@
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* AccessDescription ::= SEQUENCE {
* accessMethod OBJECT IDENTIFIER,
* accessLocation GeneralName }
- *
+ *
*/
public class AccessDescription {
-
+
// the value of access method
private final String accessMethod;
-
+
// the value of accessLocation
private final GeneralName accessLocation;
-
+
private byte [] encoding;
-
+
public AccessDescription(String accessMethod, GeneralName accessLocation) {
this.accessMethod = accessMethod;
this.accessLocation = accessLocation;
}
-
+
private AccessDescription(String accessMethod, GeneralName accessLocation,
byte[] encoding) {
this.accessMethod = accessMethod;
@@ -71,12 +71,12 @@
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("\n-- AccessDescription:");
- res.append("\naccessMethod: ");
+ res.append("\n-- AccessDescription:");
+ res.append("\naccessMethod: ");
res.append(accessMethod);
- res.append("\naccessLocation: ");
+ res.append("\naccessLocation: ");
res.append(accessLocation);
- res.append("\n-- AccessDescription END\n");
+ res.append("\n-- AccessDescription END\n");
return res.toString();
}
@@ -93,18 +93,18 @@
public String getAccessMethod() {
return accessMethod;
}
-
+
/**
* Custom AccessDescription DER encoder/decoder
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- ASN1Oid.getInstance(),
+ ASN1Oid.getInstance(),
GeneralName.ASN1 }) {
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new AccessDescription(
- ObjectIdentifier.toString((int[]) values[0]),
+ ObjectIdentifier.toString((int[]) values[0]),
(GeneralName) values[1], in.getEncoded());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/AlgorithmIdentifier.java b/luni/src/main/java/org/apache/harmony/security/x509/AlgorithmIdentifier.java
index 28b475a..584457e 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/AlgorithmIdentifier.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/AlgorithmIdentifier.java
@@ -44,7 +44,7 @@
* <pre>
* AlgorithmIdentifier ::= SEQUENCE {
* algorithm OBJECT IDENTIFIER,
- * parameters ANY DEFINED BY algorithm OPTIONAL
+ * parameters ANY DEFINED BY algorithm OPTIONAL
* }
* </pre>
*/
@@ -58,7 +58,7 @@
private byte[] parameters;
// the encoding of AlgorithmIdentifier value
private byte[] encoding;
-
+
/**
* TODO
* @param algorithm: String
@@ -66,7 +66,7 @@
public AlgorithmIdentifier(String algorithm) {
this(algorithm, null, null);
}
-
+
/**
* TODO
* @param algorithm: String
@@ -76,19 +76,19 @@
this(algorithm, parameters, null);
}
- //
+ //
// TODO
// @param algorithm: String
// @param parameters: byte[]
// @param encoding: byte[]
- //
- private AlgorithmIdentifier(String algorithm, byte[] parameters,
+ //
+ private AlgorithmIdentifier(String algorithm, byte[] parameters,
byte[] encoding) {
this.algorithm = algorithm;
this.parameters = parameters;
this.encoding = encoding;
}
-
+
/**
* Returns the value of algorithm field of the structure.
* @return algorithm
@@ -120,7 +120,7 @@
public byte[] getParameters() {
return parameters;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 AlgorithmIdentifier value.
* @return a byte array containing ASN.1 encode form.
@@ -131,7 +131,7 @@
}
return encoding;
}
-
+
public boolean equals(Object ai) {
if (!(ai instanceof AlgorithmIdentifier)) {
return false;
@@ -142,23 +142,23 @@
? algid.parameters == null
: Arrays.equals(parameters, algid.parameters));
}
-
+
public int hashCode() {
- return algorithm.hashCode() * 37 +
+ return algorithm.hashCode() * 37 +
(parameters != null ? parameters.hashCode() : 0);
}
-
+
/**
* Places the string representation into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer) {
buffer.append(getAlgorithmName());
if (parameters == null) {
- buffer.append(", no params, ");
+ buffer.append(", no params, ");
} else {
- buffer.append(", params unparsed, ");
+ buffer.append(", params unparsed, ");
}
- buffer.append("OID = ");
+ buffer.append("OID = ");
buffer.append(getAlgorithm());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/AlternativeName.java b/luni/src/main/java/org/apache/harmony/security/x509/AlternativeName.java
index 0f8a91a..0e84512 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/AlternativeName.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/AlternativeName.java
@@ -86,10 +86,10 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append((which) ? "Subject" : "Issuer")
- .append(" Alternative Names [\n");
- alternativeNames.dumpValue(buffer, prefix + " ");
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append((which) ? "Subject" : "Issuer")
+ .append(" Alternative Names [\n");
+ alternativeNames.dumpValue(buffer, prefix + " ");
+ buffer.append(prefix).append("]\n");
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/AuthorityKeyIdentifier.java b/luni/src/main/java/org/apache/harmony/security/x509/AuthorityKeyIdentifier.java
index 2ca1396..16c6702 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/AuthorityKeyIdentifier.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/AuthorityKeyIdentifier.java
@@ -35,7 +35,7 @@
/**
* The class encapsulates the ASN.1 DER encoding/decoding work
- * with Authority Key Identifier Extension (OID = 2.5.29.35).
+ * with Authority Key Identifier Extension (OID = 2.5.29.35).
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
@@ -53,26 +53,26 @@
* </pre>
*/
public class AuthorityKeyIdentifier extends ExtensionValue {
-
+
private final byte[] keyIdentifier;
private final GeneralNames authorityCertIssuer;
private final BigInteger authorityCertSerialNumber;
-
- public AuthorityKeyIdentifier(byte[] keyIdentifier,
- GeneralNames authorityCertIssuer,
+
+ public AuthorityKeyIdentifier(byte[] keyIdentifier,
+ GeneralNames authorityCertIssuer,
BigInteger authorityCertSerialNumber) {
this.keyIdentifier = keyIdentifier;
this.authorityCertIssuer = authorityCertIssuer;
this.authorityCertSerialNumber = authorityCertSerialNumber;
}
-
- public static AuthorityKeyIdentifier decode(byte[] encoding)
+
+ public static AuthorityKeyIdentifier decode(byte[] encoding)
throws IOException {
AuthorityKeyIdentifier aki =
(AuthorityKeyIdentifier) ASN1.decode(encoding);
aki.encoding = encoding;
return aki;
- }
+ }
public byte[] getEncoded() {
if (encoding == null) {
@@ -82,25 +82,25 @@
}
/**
- * Places the string representation of extension value
+ * Places the string representation of extension value
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("AuthorityKeyIdentifier [\n");
+ buffer.append(prefix).append("AuthorityKeyIdentifier [\n");
if (keyIdentifier != null) {
- buffer.append(prefix).append(" keyIdentifier:\n");
- buffer.append(Array.toString(keyIdentifier, prefix + " "));
+ buffer.append(prefix).append(" keyIdentifier:\n");
+ buffer.append(Array.toString(keyIdentifier, prefix + " "));
}
if (authorityCertIssuer != null) {
- buffer.append(prefix).append(" authorityCertIssuer: [\n");
- authorityCertIssuer.dumpValue(buffer, prefix + " ");
- buffer.append(prefix).append(" ]\n");
+ buffer.append(prefix).append(" authorityCertIssuer: [\n");
+ authorityCertIssuer.dumpValue(buffer, prefix + " ");
+ buffer.append(prefix).append(" ]\n");
}
if (authorityCertSerialNumber != null) {
- buffer.append(prefix).append(" authorityCertSerialNumber: ")
+ buffer.append(prefix).append(" authorityCertSerialNumber: ")
.append(authorityCertSerialNumber).append('\n');
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
public static final ASN1Type ASN1 = new ASN1Sequence(
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/BasicConstraints.java b/luni/src/main/java/org/apache/harmony/security/x509/BasicConstraints.java
index 762d3c2..53a809f 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/BasicConstraints.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/BasicConstraints.java
@@ -95,11 +95,11 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("BasicConstraints [\n").append(prefix)
- .append(" CA: ").append(cA)
- .append("\n ").append(prefix).append("pathLenConstraint: ")
+ buffer.append(prefix).append("BasicConstraints [\n").append(prefix)
+ .append(" CA: ").append(cA)
+ .append("\n ").append(prefix).append("pathLenConstraint: ")
.append(pathLenConstraint).append('\n').append(prefix)
- .append("]\n");
+ .append("]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/CRLDistributionPoints.java b/luni/src/main/java/org/apache/harmony/security/x509/CRLDistributionPoints.java
index 65af58b..47c091a 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/CRLDistributionPoints.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/CRLDistributionPoints.java
@@ -33,7 +33,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the CRL Distribution Points which is the part of X.509 Certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -46,12 +46,12 @@
* DistributionPoint ::= SEQUENCE {
* distributionPoint [0] DistributionPointName OPTIONAL,
* reasons [1] ReasonFlags OPTIONAL,
- * cRLIssuer [2] GeneralNames OPTIONAL
+ * cRLIssuer [2] GeneralNames OPTIONAL
* }
*
* DistributionPointName ::= CHOICE {
* fullName [0] GeneralNames,
- * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
+ * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
* }
*
* ReasonFlags ::= BIT STRING {
@@ -63,27 +63,27 @@
* cessationOfOperation (5),
* certificateHold (6),
* privilegeWithdrawn (7),
- * aACompromise (8)
+ * aACompromise (8)
* }
* </pre>
*/
public class CRLDistributionPoints extends ExtensionValue {
-
+
private List distributionPoints;
private byte[] encoding;
-
+
public CRLDistributionPoints(List distributionPoints) {
- if ((distributionPoints == null)
+ if ((distributionPoints == null)
|| (distributionPoints.size() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.17D"));
+ throw new IllegalArgumentException(Messages.getString("security.17D"));
}
this.distributionPoints = distributionPoints;
}
public CRLDistributionPoints(List distributionPoints, byte[] encoding) {
- if ((distributionPoints == null)
+ if ((distributionPoints == null)
|| (distributionPoints.size() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.17D"));
+ throw new IllegalArgumentException(Messages.getString("security.17D"));
}
this.distributionPoints = distributionPoints;
this.encoding = encoding;
@@ -96,7 +96,7 @@
return encoding;
}
- public static CRLDistributionPoints decode(byte[] encoding)
+ public static CRLDistributionPoints decode(byte[] encoding)
throws IOException {
CRLDistributionPoints cdp = (CRLDistributionPoints) ASN1.decode(encoding);
return cdp;
@@ -107,24 +107,24 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("CRL Distribution Points: [\n");
+ buffer.append(prefix).append("CRL Distribution Points: [\n");
int number = 0;
for (Iterator it=distributionPoints.iterator();
it.hasNext();) {
- buffer.append(prefix).append(" [").append(++number).append("]\n");
- ((DistributionPoint) it.next()).dumpValue(buffer, prefix + " ");
+ buffer.append(prefix).append(" [").append(++number).append("]\n");
+ ((DistributionPoint) it.next()).dumpValue(buffer, prefix + " ");
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
-
+
/**
* Custom X.509 decoder.
*/
- public static final ASN1Type ASN1 =
+ public static final ASN1Type ASN1 =
new ASN1SequenceOf(DistributionPoint.ASN1) {
public Object getDecodedObject(BerInputStream in) {
- return new CRLDistributionPoints((List)in.content,
+ return new CRLDistributionPoints((List)in.content,
in.getEncoded());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/CRLNumber.java b/luni/src/main/java/org/apache/harmony/security/x509/CRLNumber.java
index 92f5fb7..b6d1abf 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/CRLNumber.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/CRLNumber.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509;
@@ -77,8 +77,8 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("CRL Number: [ ").append(number).append(
- " ]\n");
+ buffer.append(prefix).append("CRL Number: [ ").append(number).append(
+ " ]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Certificate.java b/luni/src/main/java/org/apache/harmony/security/x509/Certificate.java
index 0b3fc32..ca1abb0 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Certificate.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Certificate.java
@@ -30,7 +30,7 @@
import org.apache.harmony.security.utils.Array;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the X.509 certificate. Its ASN notation is as follows
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -41,14 +41,14 @@
* Certificate ::= SEQUENCE {
* tbsCertificate TBSCertificate,
* signatureAlgorithm AlgorithmIdentifier,
- * signatureValue BIT STRING
+ * signatureValue BIT STRING
* }
* </pre>
*/
public class Certificate {
// the value of tbsCertificate field of the structure
- private final TBSCertificate tbsCertificate;
+ private final TBSCertificate tbsCertificate;
// the value of signatureAlgorithm field of the structure
private final AlgorithmIdentifier signatureAlgorithm;
// the value of signatureValue field of the structure
@@ -62,30 +62,30 @@
* @param signatureAlgorithm: AlgorithmIdentifier
* @param signatureValue: byte[]
*/
- public Certificate(TBSCertificate tbsCertificate,
+ public Certificate(TBSCertificate tbsCertificate,
AlgorithmIdentifier signatureAlgorithm,
byte[] signatureValue) {
this.tbsCertificate = tbsCertificate;
this.signatureAlgorithm = signatureAlgorithm;
this.signatureValue = new byte[signatureValue.length];
- System.arraycopy(signatureValue, 0, this.signatureValue, 0,
+ System.arraycopy(signatureValue, 0, this.signatureValue, 0,
signatureValue.length);
}
-
- //
+
+ //
// TODO
// @param tbsCertificate: TBSCertificate
// @param signatureAlgorithm: AlgorithmIdentifier
// @param signatureValue: byte[]
// @param encoding: byte[]
- //
- private Certificate(TBSCertificate tbsCertificate,
+ //
+ private Certificate(TBSCertificate tbsCertificate,
AlgorithmIdentifier signatureAlgorithm,
byte[] signatureValue, byte[] encoding) {
this(tbsCertificate, signatureAlgorithm, signatureValue);
this.encoding = encoding;
}
-
+
/**
* Returns the value of tbsCertificate field of the structure.
* @return tbsCertificate
@@ -114,17 +114,17 @@
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("X.509 Certificate:\n[\n");
+ buffer.append("X.509 Certificate:\n[\n");
tbsCertificate.dumpValue(buffer);
- buffer.append("\n Algorithm: [");
+ buffer.append("\n Algorithm: [");
signatureAlgorithm.dumpValue(buffer);
buffer.append(']');
- buffer.append("\n Signature Value:\n");
- buffer.append(Array.toString(signatureValue, ""));
+ buffer.append("\n Signature Value:\n");
+ buffer.append(Array.toString(signatureValue, ""));
buffer.append(']');
return buffer.toString();
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 TBSCertificate value.
* @return a byte array containing ASN.1 encode form.
@@ -139,15 +139,15 @@
/**
* X.509 Certificate encoder/decoder.
*/
- public static final ASN1Sequence ASN1 =
- new ASN1Sequence(new ASN1Type[]
+ public static final ASN1Sequence ASN1 =
+ new ASN1Sequence(new ASN1Type[]
{TBSCertificate.ASN1, AlgorithmIdentifier.ASN1, ASN1BitString.getInstance()}) {
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new Certificate(
(TBSCertificate) values[0],
- (AlgorithmIdentifier) values[1],
+ (AlgorithmIdentifier) values[1],
((BitString) values[2]).bytes, // FIXME keep as BitString object
in.getEncoded()
);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/CertificateIssuer.java b/luni/src/main/java/org/apache/harmony/security/x509/CertificateIssuer.java
index d1b8ae3..4470a75 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/CertificateIssuer.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/CertificateIssuer.java
@@ -71,13 +71,13 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Certificate Issuer: ");
+ buffer.append(prefix).append("Certificate Issuer: ");
if (issuer == null) {
try {
issuer = getIssuer();
} catch (IOException e) {
// incorrect extension value encoding
- buffer.append("Unparseable (incorrect!) extension value:\n");
+ buffer.append("Unparseable (incorrect!) extension value:\n");
super.dumpValue(buffer);
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/CertificateList.java b/luni/src/main/java/org/apache/harmony/security/x509/CertificateList.java
index 9d87963..fbc170d 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/CertificateList.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/CertificateList.java
@@ -30,7 +30,7 @@
import org.apache.harmony.security.utils.Array;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the X.509 CRL. Its ASN notation is as follows
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -41,14 +41,14 @@
* CertificateList ::= SEQUENCE {
* tbsCertList TBSCertList,
* signatureAlgorithm AlgorithmIdentifier,
- * signatureValue BIT STRING
+ * signatureValue BIT STRING
* }
* </pre>
*/
public class CertificateList {
-
+
// the value of tbsCertList field of the structure
- private final TBSCertList tbsCertList;
+ private final TBSCertList tbsCertList;
// the value of signatureAlgorithm field of the structure
private final AlgorithmIdentifier signatureAlgorithm;
// the value of signatureValue field of the structure
@@ -62,30 +62,30 @@
* @param signatureAlgorithm: AlgorithmIdentifier
* @param signatureValue: byte[]
*/
- public CertificateList(TBSCertList tbsCertList,
+ public CertificateList(TBSCertList tbsCertList,
AlgorithmIdentifier signatureAlgorithm,
byte[] signatureValue) {
this.tbsCertList = tbsCertList;
this.signatureAlgorithm = signatureAlgorithm;
this.signatureValue = new byte[signatureValue.length];
- System.arraycopy(signatureValue, 0, this.signatureValue, 0,
+ System.arraycopy(signatureValue, 0, this.signatureValue, 0,
signatureValue.length);
}
-
- //
+
+ //
// TODO
// @param tbsCertList: TBSCertList
// @param signatureAlgorithm: AlgorithmIdentifier
// @param signatureValue: byte[]
// @param encoding: byte[]
- //
- private CertificateList(TBSCertList tbsCertList,
+ //
+ private CertificateList(TBSCertList tbsCertList,
AlgorithmIdentifier signatureAlgorithm,
byte[] signatureValue, byte[] encoding) {
this(tbsCertList, signatureAlgorithm, signatureValue);
this.encoding = encoding;
}
-
+
/**
* Returns the value of tbsCertList field of the structure.
* @return tbsCertList
@@ -115,11 +115,11 @@
public String toString() {
StringBuffer res = new StringBuffer();
tbsCertList.dumpValue(res);
- res.append("\nSignature Value:\n");
- res.append(Array.toString(signatureValue, ""));
+ res.append("\nSignature Value:\n");
+ res.append(Array.toString(signatureValue, ""));
return res.toString();
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 TBSCertList value.
* @return a byte array containing ASN.1 encode form.
@@ -134,16 +134,16 @@
/**
* X.509 CertList encoder/decoder.
*/
- public static final ASN1Sequence ASN1 =
- new ASN1Sequence(new ASN1Type[]
- {TBSCertList.ASN1, AlgorithmIdentifier.ASN1,
+ public static final ASN1Sequence ASN1 =
+ new ASN1Sequence(new ASN1Type[]
+ {TBSCertList.ASN1, AlgorithmIdentifier.ASN1,
ASN1BitString.getInstance()}) {
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new CertificateList(
(TBSCertList) values[0],
- (AlgorithmIdentifier) values[1],
+ (AlgorithmIdentifier) values[1],
((BitString) values[2]).bytes, // FIXME keep as BitString object
in.getEncoded()
);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/CertificatePolicies.java b/luni/src/main/java/org/apache/harmony/security/x509/CertificatePolicies.java
index b3c7598..1e77d64 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/CertificatePolicies.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/CertificatePolicies.java
@@ -33,17 +33,17 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with Certificate Policies structure which is a part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* certificatePolicies ::= SEQUENCE SIZE (1..MAX) OF PolicyInformation
* </pre>
- *
+ *
*/
public class CertificatePolicies extends ExtensionValue {
@@ -52,12 +52,12 @@
private List policyInformations;
// the ASN.1 encoded form of CertificatePolicies
private byte[] encoding;
-
+
/**
* Constructs an object representing the value of CertificatePolicies.
*/
public CertificatePolicies() {}
-
+
/**
* TODO
* @param policyInformations: List
@@ -66,18 +66,18 @@
this.policyInformations = policyInformations;
}
- public static CertificatePolicies decode(byte[] encoding)
+ public static CertificatePolicies decode(byte[] encoding)
throws IOException {
CertificatePolicies cps = ((CertificatePolicies) ASN1.decode(encoding));
cps.encoding = encoding;
return cps;
}
-
- //
+
+ //
// TODO
// @param policyInformations: List
// @param encoding: byte[]
- //
+ //
private CertificatePolicies(List policyInformations, byte[] encoding) {
this.policyInformations = policyInformations;
this.encoding = encoding;
@@ -118,24 +118,24 @@
}
/**
- * Places the string representation of extension value
+ * Places the string representation of extension value
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("CertificatePolicies [\n");
+ buffer.append(prefix).append("CertificatePolicies [\n");
for (Iterator it=policyInformations.iterator(); it.hasNext();) {
buffer.append(prefix);
- buffer.append(" ");
+ buffer.append(" ");
((PolicyInformation) it.next()).dumpValue(buffer);
buffer.append('\n');
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
/**
* ASN.1 DER X.509 CertificatePolicies encoder/decoder class.
*/
- public static final ASN1Type ASN1 =
+ public static final ASN1Type ASN1 =
new ASN1SequenceOf(PolicyInformation.ASN1) {
public Object getDecodedObject(BerInputStream in) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/DNParser.java b/luni/src/main/java/org/apache/harmony/security/x509/DNParser.java
index 4cecb0a..0920b21 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/DNParser.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/DNParser.java
@@ -33,14 +33,14 @@
/**
* Distinguished Name Parser.
- *
+ *
* Parses a distinguished name(DN) string according
* BNF syntax specified in RFC 2253 and RFC 1779
- *
+ *
* RFC 2253: Lightweight Directory Access Protocol (v3):
* UTF-8 String Representation of Distinguished Names
* http://www.ietf.org/rfc/rfc2253.txt
- *
+ *
* RFC 1779: A String Representation of Distinguished Names
* http://www.ietf.org/rfc/rfc1779.txt
*/
@@ -65,7 +65,7 @@
/**
* Constructs DN parser
- *
+ *
* @param dn - distinguished name string to be parsed
*/
public DNParser(String dn) throws IOException {
@@ -98,7 +98,7 @@
if (pos >= length) {
// unexpected end of DN
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
// mark the end of attribute type
@@ -113,7 +113,7 @@
if (chars[pos] != '=' || pos == length) {
// unexpected end of DN
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
}
@@ -136,7 +136,7 @@
return new String(chars, beg, end - beg);
}
- // gets quoted attribute value: QUOTATION *( quotechar / pair ) QUOTATION
+ // gets quoted attribute value: QUOTATION *( quotechar / pair ) QUOTATION
protected String quotedAV() throws IOException {
pos++;
@@ -147,7 +147,7 @@
if (pos == length) {
// unexpected end of DN
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
if (chars[pos] == '"') {
@@ -178,14 +178,14 @@
if (pos + 4 >= length) {
// encoded byte array must be not less then 4 c
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
beg = pos; // store '#' position
pos++;
while (true) {
- // check for end of attribute value
+ // check for end of attribute value
// looks for space and component separators
if (pos == length || chars[pos] == '+' || chars[pos] == ','
|| chars[pos] == ';') {
@@ -213,7 +213,7 @@
int hexLen = end - beg; // skip first '#' char
if (hexLen < 5 || (hexLen & 1) == 0) {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
// get byte encoding from string representation
@@ -250,7 +250,7 @@
break;
case ' ':
// need to figure out whether space defines
- // the end of attribute value or not
+ // the end of attribute value or not
cur = end;
pos++;
@@ -278,7 +278,7 @@
pos++;
if (pos == length) {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
switch (chars[pos]) {
@@ -296,10 +296,10 @@
case '*':
case '%':
case '_':
- //FIXME: escaping is allowed only for leading or trailing space char
+ //FIXME: escaping is allowed only for leading or trailing space char
return chars[pos];
default:
- // RFC doesn't explicitly say that escaped hex pair is
+ // RFC doesn't explicitly say that escaped hex pair is
// interpreted as UTF-8 char. It only contains an example of such DN.
return getUTF8();
}
@@ -361,7 +361,7 @@
if ((position + 1) >= length) {
// to avoid ArrayIndexOutOfBoundsException
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
int b1, b2;
@@ -375,7 +375,7 @@
b1 = b1 - 55; // 55 = 'A' - 10
} else {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
b2 = chars[position + 1];
@@ -387,7 +387,7 @@
b2 = b2 - 55; // 55 = 'A' - 10
} else {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
return (b1 << 4) + b2;
@@ -406,7 +406,7 @@
String attValue;
String attType = nextAT();
if (attType == null) {
- return list; //empty list of RDNs
+ return list; //empty list of RDNs
}
List atav = new ArrayList();
@@ -416,7 +416,7 @@
//empty Attribute Value
atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
- "", false)));
+ "", false)));
list.add(0, atav);
return list;
@@ -439,7 +439,7 @@
case ';': // compatibility with RFC 1779: semicolon can separate RDNs
//empty attribute value
atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
- "", false)));
+ "", false)));
break;
default:
attValue = escapedAV();
@@ -457,14 +457,14 @@
atav = new ArrayList();
} else if (chars[pos] != '+') {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
pos++;
attType = nextAT();
if (attType == null) {
throw new IOException(
- Messages.getString("security.192"));
+ Messages.getString("security.192"));
}
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/DistributionPoint.java b/luni/src/main/java/org/apache/harmony/security/x509/DistributionPoint.java
index 302fbda..6499659 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/DistributionPoint.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/DistributionPoint.java
@@ -32,7 +32,7 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the DistributionPoint structure which is the part of X.509 CRL
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -45,12 +45,12 @@
* DistributionPoint ::= SEQUENCE {
* distributionPoint [0] DistributionPointName OPTIONAL,
* reasons [1] ReasonFlags OPTIONAL,
- * cRLIssuer [2] GeneralNames OPTIONAL
+ * cRLIssuer [2] GeneralNames OPTIONAL
* }
*
* DistributionPointName ::= CHOICE {
* fullName [0] GeneralNames,
- * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
+ * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
* }
*
* ReasonFlags ::= BIT STRING {
@@ -62,16 +62,16 @@
* cessationOfOperation (5),
* certificateHold (6),
* privilegeWithdrawn (7),
- * aACompromise (8)
+ * aACompromise (8)
* }
* </pre>
*/
public class DistributionPoint {
-
+
private final DistributionPointName distributionPoint;
private final ReasonFlags reasons;
private final GeneralNames cRLIssuer;
-
+
public DistributionPoint() {
distributionPoint = null;
reasons = null;
@@ -80,10 +80,10 @@
public DistributionPoint(DistributionPointName distributionPoint,
ReasonFlags reasons, GeneralNames cRLIssuer) {
- if ((reasons != null) && (distributionPoint == null)
+ if ((reasons != null) && (distributionPoint == null)
&& (cRLIssuer == null)) {
throw new IllegalArgumentException(
- Messages.getString("security.17F"));
+ Messages.getString("security.17F"));
}
this.distributionPoint = distributionPoint;
this.reasons = reasons;
@@ -96,22 +96,22 @@
*/
public void dumpValue(StringBuffer buffer, String prefix) {
buffer.append(prefix);
- buffer.append("Distribution Point: [\n");
+ buffer.append("Distribution Point: [\n");
if (distributionPoint != null) {
- distributionPoint.dumpValue(buffer, prefix + " ");
+ distributionPoint.dumpValue(buffer, prefix + " ");
}
if (reasons != null) {
- reasons.dumpValue(buffer, prefix + " ");
+ reasons.dumpValue(buffer, prefix + " ");
}
if (cRLIssuer != null) {
buffer.append(prefix);
- buffer.append(" CRL Issuer: [\n");
- cRLIssuer.dumpValue(buffer, prefix + " ");
+ buffer.append(" CRL Issuer: [\n");
+ cRLIssuer.dumpValue(buffer, prefix + " ");
buffer.append(prefix);
- buffer.append(" ]\n");
+ buffer.append(" ]\n");
}
buffer.append(prefix);
- buffer.append("]\n");
+ buffer.append("]\n");
}
/**
@@ -130,7 +130,7 @@
protected Object getDecodedObject(BerInputStream in) throws IOException {
Object[] values = (Object[]) in.content;
- return new DistributionPoint((DistributionPointName) values[0],
+ return new DistributionPoint((DistributionPointName) values[0],
(ReasonFlags) values[1], (GeneralNames) values[2]);
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/DistributionPointName.java b/luni/src/main/java/org/apache/harmony/security/x509/DistributionPointName.java
index 6a9a0d7..279ff4f 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/DistributionPointName.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/DistributionPointName.java
@@ -32,8 +32,8 @@
import org.apache.harmony.security.x501.Name;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
- * with the DistributionPointName structure which is the part
+ * The class encapsulates the ASN.1 DER encoding/decoding work
+ * with the DistributionPointName structure which is the part
* of X.509 CRL
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -46,12 +46,12 @@
* DistributionPoint ::= SEQUENCE {
* distributionPoint [0] DistributionPointName OPTIONAL,
* reasons [1] ReasonFlags OPTIONAL,
- * cRLIssuer [2] GeneralNames OPTIONAL
+ * cRLIssuer [2] GeneralNames OPTIONAL
* }
*
* DistributionPointName ::= CHOICE {
* fullName [0] GeneralNames,
- * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
+ * nameRelativeToCRLIssuer [1] RelativeDistinguishedName
* }
*
* ReasonFlags ::= BIT STRING {
@@ -63,12 +63,12 @@
* cessationOfOperation (5),
* certificateHold (6),
* privilegeWithdrawn (7),
- * aACompromise (8)
+ * aACompromise (8)
* }
* </pre>
*/
public class DistributionPointName {
-
+
private final GeneralNames fullName;
private final Name nameRelativeToCRLIssuer;
@@ -77,7 +77,7 @@
this.fullName = fullName;
this.nameRelativeToCRLIssuer = null;
}
-
+
public DistributionPointName(Name nameRelativeToCRLIssuer) {
this.fullName = null;
this.nameRelativeToCRLIssuer = nameRelativeToCRLIssuer;
@@ -89,21 +89,21 @@
*/
public void dumpValue(StringBuffer buffer, String prefix) {
buffer.append(prefix);
- buffer.append("Distribution Point Name: [\n");
+ buffer.append("Distribution Point Name: [\n");
if (fullName != null) {
- fullName.dumpValue(buffer, prefix + " ");
+ fullName.dumpValue(buffer, prefix + " ");
} else {
buffer.append(prefix);
- buffer.append(" ");
+ buffer.append(" ");
buffer.append(nameRelativeToCRLIssuer.getName(
X500Principal.RFC2253));
- }
+ }
buffer.append(prefix);
- buffer.append("]\n");
+ buffer.append("]\n");
}
public static final ASN1Choice ASN1 = new ASN1Choice(new ASN1Type[] {
- new ASN1Implicit(0, GeneralNames.ASN1),
+ new ASN1Implicit(0, GeneralNames.ASN1),
new ASN1Implicit(1, Name.ASN1_RDN) }) {
public int getIndex(java.lang.Object object) {
@@ -116,7 +116,7 @@
if (in.choiceIndex == 0) {
result = new DistributionPointName((GeneralNames) in.content);
} else {
- // note: ASN.1 decoder will report an error if index
+ // note: ASN.1 decoder will report an error if index
// is neither 0 or 1
result = new DistributionPointName((Name) in.content);
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/EDIPartyName.java b/luni/src/main/java/org/apache/harmony/security/x509/EDIPartyName.java
index f5976c0..c0197b4 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/EDIPartyName.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/EDIPartyName.java
@@ -29,25 +29,25 @@
import org.apache.harmony.security.x501.DirectoryString;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the following structure which is a subpart of GeneralName
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* EDIPartyName ::= SEQUENCE {
* nameAssigner [0] DirectoryString OPTIONAL,
- * partyName [1] DirectoryString
+ * partyName [1] DirectoryString
* }
- *
+ *
* DirectoryString ::= CHOICE {
* teletexString TeletexString (SIZE (1..MAX)),
* printableString PrintableString (SIZE (1..MAX)),
* universalString UniversalString (SIZE (1..MAX)),
* utf8String UTF8String (SIZE (1..MAX)),
- * bmpString BMPString (SIZE (1..MAX))
+ * bmpString BMPString (SIZE (1..MAX))
* }
* </pre>
*/
@@ -58,7 +58,7 @@
private String partyName;
// the ASN.1 encoded form of EDIPartyName
private byte[] encoding;
-
+
/**
* TODO
* @param nameAssigner: String
@@ -68,20 +68,20 @@
this.nameAssigner = nameAssigner;
this.partyName = partyName;
}
-
- //
+
+ //
// TODO
// @param nameAssigner: String
// @param partyName: String
// @param encoding: byte[]
- //
- private EDIPartyName(String nameAssigner, String partyName,
+ //
+ private EDIPartyName(String nameAssigner, String partyName,
byte[] encoding) {
this.nameAssigner = nameAssigner;
this.partyName = partyName;
this.encoding = encoding;
}
-
+
/**
* Returns the value of nameAssigner field of the structure.
* @return nameAssigner
@@ -89,7 +89,7 @@
public String getNameAssigner() {
return nameAssigner;
}
-
+
/**
* Returns the value of partyName field of the structure.
* @return partyName
@@ -97,7 +97,7 @@
public String getPartyName() {
return partyName;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 EDIPartyName value.
* @return a byte array containing ASN.1 encode form.
@@ -114,7 +114,7 @@
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(
new ASN1Type[] {
- new ASN1Explicit(0, DirectoryString.ASN1),
+ new ASN1Explicit(0, DirectoryString.ASN1),
new ASN1Explicit(1, DirectoryString.ASN1)
}) {
{
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/ExtendedKeyUsage.java b/luni/src/main/java/org/apache/harmony/security/x509/ExtendedKeyUsage.java
index e56a137..8950203 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/ExtendedKeyUsage.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/ExtendedKeyUsage.java
@@ -86,7 +86,7 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Extended Key Usage: ");
+ buffer.append(prefix).append("Extended Key Usage: ");
if (keys == null) {
try {
keys = getExtendedKeyUsage();
@@ -98,12 +98,12 @@
}
buffer.append('[');
for (Iterator it=keys.iterator(); it.hasNext();) {
- buffer.append(" \"").append(it.next()).append('"');
+ buffer.append(" \"").append(it.next()).append('"');
if (it.hasNext()) {
buffer.append(',');
}
}
- buffer.append(" ]\n");
+ buffer.append(" ]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Extension.java b/luni/src/main/java/org/apache/harmony/security/x509/Extension.java
index d139bc4..cad8f7b 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Extension.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Extension.java
@@ -35,7 +35,7 @@
import org.apache.harmony.security.utils.Array;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the Extension part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -46,7 +46,7 @@
* Extension ::= SEQUENCE {
* extnID OBJECT IDENTIFIER,
* critical BOOLEAN DEFAULT FALSE,
- * extnValue OCTET STRING
+ * extnValue OCTET STRING
* }
* </pre>
*/
@@ -55,7 +55,7 @@
// critical constants
public static final boolean CRITICAL = true;
public static final boolean NON_CRITICAL = false;
-
+
// constants: the extension OIDs
// certificate extensions:
static final int[] SUBJ_DIRECTORY_ATTRS = {2, 5, 29, 9};
@@ -86,7 +86,7 @@
static final int[] INVALIDITY_DATE = {2, 5, 29, 24};
static final int[] REASON_CODE = {2, 5, 29, 21};
static final int[] ISSUING_DISTR_POINTS = {2, 5, 29, 28};
-
+
// the value of extnID field of the structure
private final int[] extnID;
private String extnID_str;
@@ -109,7 +109,7 @@
* @param critical: boolean
* @param extnValue: byte[]
*/
- public Extension(String extnID, boolean critical,
+ public Extension(String extnID, boolean critical,
ExtensionValue extnValueObject) {
this.extnID_str = extnID;
this.extnID = ObjectIdentifier.toIntArray(extnID);
@@ -118,7 +118,7 @@
this.valueDecoded = true;
this.extnValue = extnValueObject.getEncoded();
}
-
+
/**
* TODO
* @param extnID: String
@@ -131,7 +131,7 @@
this.critical = critical;
this.extnValue = extnValue;
}
-
+
/**
* TODO
* @param extnID: int[]
@@ -143,7 +143,7 @@
this.critical = critical;
this.extnValue = extnValue;
}
-
+
/**
* TODO
* @param extnID: String
@@ -162,15 +162,15 @@
this(extnID, NON_CRITICAL, extnValue);
}
- //
+ //
// TODO
// @param extnID: int[]
// @param critical: boolean
// @param extnValue: byte[]
// @param encoding: byte[]
- //
+ //
private Extension(int[] extnID, boolean critical, byte[] extnValue,
- byte[] rawExtnValue, byte[] encoding,
+ byte[] rawExtnValue, byte[] encoding,
ExtensionValue decodedExtValue) {
this(extnID, critical, extnValue);
this.rawExtnValue = rawExtnValue;
@@ -178,7 +178,7 @@
this.extnValueObject = decodedExtValue;
this.valueDecoded = (decodedExtValue != null);
}
-
+
/**
* Returns the value of extnID field of the structure.
* @return extnID
@@ -189,7 +189,7 @@
}
return extnID_str;
}
-
+
/**
* Returns the value of critical field of the structure.
* @return critical
@@ -207,7 +207,7 @@
}
/**
- * Returns the raw (undecoded octet string) value of extnValue
+ * Returns the raw (undecoded octet string) value of extnValue
* field of the structure.
* @return rawExtnValue
*/
@@ -234,11 +234,11 @@
return false;
}
Extension extn = (Extension) ext;
- return Arrays.equals(extnID, extn.extnID)
+ return Arrays.equals(extnID, extn.extnID)
&& (critical == extn.critical)
&& Arrays.equals(extnValue, extn.extnValue);
}
-
+
public int hashCode() {
return (extnID.hashCode() * 37 + (critical ? 1 : 0)) * 37 + extnValue.hashCode();
}
@@ -330,8 +330,8 @@
* Places the string representation into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append("OID: ").append(getExtnID())
- .append(", Critical: ").append(critical).append('\n');
+ buffer.append("OID: ").append(getExtnID())
+ .append(", Critical: ").append(critical).append('\n');
if (!valueDecoded) {
try {
decodeExtensionValue();
@@ -344,50 +344,50 @@
// else: dump unparsed hex representation
buffer.append(prefix);
if (oidEquals(extnID, SUBJ_DIRECTORY_ATTRS)) {
- buffer.append("Subject Directory Attributes Extension");
+ buffer.append("Subject Directory Attributes Extension");
} else if (oidEquals(extnID, SUBJ_KEY_ID)) {
- buffer.append("Subject Key Identifier Extension");
+ buffer.append("Subject Key Identifier Extension");
} else if (oidEquals(extnID, KEY_USAGE)) {
- buffer.append("Key Usage Extension");
+ buffer.append("Key Usage Extension");
} else if (oidEquals(extnID, PRIVATE_KEY_USAGE_PERIOD)) {
- buffer.append("Private Key Usage Period Extension");
+ buffer.append("Private Key Usage Period Extension");
} else if (oidEquals(extnID, SUBJECT_ALT_NAME)) {
- buffer.append("Subject Alternative Name Extension");
+ buffer.append("Subject Alternative Name Extension");
} else if (oidEquals(extnID, ISSUER_ALTERNATIVE_NAME)) {
- buffer.append("Issuer Alternative Name Extension");
+ buffer.append("Issuer Alternative Name Extension");
} else if (oidEquals(extnID, BASIC_CONSTRAINTS)) {
- buffer.append("Basic Constraints Extension");
+ buffer.append("Basic Constraints Extension");
} else if (oidEquals(extnID, NAME_CONSTRAINTS)) {
- buffer.append("Name Constraints Extension");
+ buffer.append("Name Constraints Extension");
} else if (oidEquals(extnID, CRL_DISTR_POINTS)) {
- buffer.append("CRL Distribution Points Extension");
+ buffer.append("CRL Distribution Points Extension");
} else if (oidEquals(extnID, CERTIFICATE_POLICIES)) {
- buffer.append("Certificate Policies Extension");
+ buffer.append("Certificate Policies Extension");
} else if (oidEquals(extnID, POLICY_MAPPINGS)) {
- buffer.append("Policy Mappings Extension");
+ buffer.append("Policy Mappings Extension");
} else if (oidEquals(extnID, AUTH_KEY_ID)) {
- buffer.append("Authority Key Identifier Extension");
+ buffer.append("Authority Key Identifier Extension");
} else if (oidEquals(extnID, POLICY_CONSTRAINTS)) {
- buffer.append("Policy Constraints Extension");
+ buffer.append("Policy Constraints Extension");
} else if (oidEquals(extnID, EXTENDED_KEY_USAGE)) {
- buffer.append("Extended Key Usage Extension");
+ buffer.append("Extended Key Usage Extension");
} else if (oidEquals(extnID, INHIBIT_ANY_POLICY)) {
- buffer.append("Inhibit Any-Policy Extension");
+ buffer.append("Inhibit Any-Policy Extension");
} else if (oidEquals(extnID, AUTHORITY_INFO_ACCESS)) {
- buffer.append("Authority Information Access Extension");
+ buffer.append("Authority Information Access Extension");
} else if (oidEquals(extnID, SUBJECT_INFO_ACCESS)) {
- buffer.append("Subject Information Access Extension");
+ buffer.append("Subject Information Access Extension");
} else if (oidEquals(extnID, INVALIDITY_DATE)) {
- buffer.append("Invalidity Date Extension");
+ buffer.append("Invalidity Date Extension");
} else if (oidEquals(extnID, CRL_NUMBER)) {
- buffer.append("CRL Number Extension");
+ buffer.append("CRL Number Extension");
} else if (oidEquals(extnID, REASON_CODE)) {
- buffer.append("Reason Code Extension");
+ buffer.append("Reason Code Extension");
} else {
- buffer.append("Unknown Extension");
+ buffer.append("Unknown Extension");
}
buffer.append('\n').append(prefix)
- .append("Unparsed Extension Value:\n");
+ .append("Unparsed Extension Value:\n");
buffer.append(Array.toString(extnValue, prefix));
}
@@ -405,19 +405,19 @@
}
return true;
}
-
+
/**
* X.509 Extension encoder/decoder.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- ASN1Oid.getInstance(),
+ ASN1Oid.getInstance(),
ASN1Boolean.getInstance(),
new ASN1OctetString() {
- public Object getDecodedObject(BerInputStream in)
+ public Object getDecodedObject(BerInputStream in)
throws IOException {
// first - decoded octet string,
// second - raw encoding of octet string
- return new Object[]
+ return new Object[]
{super.getDecodedObject(in), in.getEncoded()};
}
}
@@ -432,7 +432,7 @@
int[] oid = (int[]) values[0];
byte[] extnValue = (byte[]) ((Object[]) values[2])[0];
byte[] rawExtnValue = (byte[]) ((Object[]) values[2])[1];
-
+
ExtensionValue decodedExtValue = null;
// decode Key Usage and Basic Constraints extension values
if (oidEquals(oid, KEY_USAGE)) {
@@ -441,7 +441,7 @@
decodedExtValue = new BasicConstraints(extnValue);
}
- return
+ return
new Extension((int[]) values[0],
((Boolean) values[1]).booleanValue(),
extnValue, rawExtnValue, in.getEncoded(), decodedExtValue);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/ExtensionValue.java b/luni/src/main/java/org/apache/harmony/security/x509/ExtensionValue.java
index 4ffdc9e..87f72eb 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/ExtensionValue.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/ExtensionValue.java
@@ -53,12 +53,12 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Unparseable extension value:\n");
+ buffer.append(prefix).append("Unparseable extension value:\n");
if (encoding == null) {
encoding = getEncoded();
}
if (encoding == null) {
- buffer.append("NULL\n");
+ buffer.append("NULL\n");
} else {
buffer.append(Array.toString(encoding, prefix));
}
@@ -69,7 +69,7 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer) {
- dumpValue(buffer, "");
+ dumpValue(buffer, "");
};
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Extensions.java b/luni/src/main/java/org/apache/harmony/security/x509/Extensions.java
index cbd5d16..68fe6e6 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Extensions.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Extensions.java
@@ -39,7 +39,7 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the Extensions part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -55,9 +55,9 @@
// Supported critical extensions oids:
private static List SUPPORTED_CRITICAL = Arrays.asList(
- new String[] {"2.5.29.15", "2.5.29.19", "2.5.29.32", "2.5.29.17",
- "2.5.29.30", "2.5.29.36", "2.5.29.37", "2.5.29.54"});
-
+ new String[] {"2.5.29.15", "2.5.29.19", "2.5.29.32", "2.5.29.17",
+ "2.5.29.30", "2.5.29.36", "2.5.29.37", "2.5.29.54"});
+
// the values of extensions of the structure
private List<Extension> extensions;
private Set critical;
@@ -70,12 +70,12 @@
private HashMap oidMap;
// the ASN.1 encoded form of Extensions
private byte[] encoding;
-
+
/**
* Constructs an object representing the value of Extensions.
*/
public Extensions() {}
-
+
/**
* TODO
* @param extensions: List
@@ -83,7 +83,7 @@
public Extensions(List extensions) {
this.extensions = extensions;
}
-
+
/**
* Returns the values of extensions.
* @return extensions
@@ -91,13 +91,13 @@
public List getExtensions() {
return extensions;
}
-
+
public int size() {
- return (extensions == null)
+ return (extensions == null)
? 0
: extensions.size();
}
-
+
/**
* Returns the list of critical extensions.
* @return extensions
@@ -128,7 +128,7 @@
}
//
- // Makes the separated lists with oids of critical
+ // Makes the separated lists with oids of critical
// and non-critical extensions
//
private void makeOidsLists() {
@@ -151,7 +151,7 @@
}
}
}
-
+
/**
* Returns the values of extensions.
* @param oid - the OID of needed extension.
@@ -177,7 +177,7 @@
* Returns the value of Key Usage extension (OID == 2.5.29.15).
* The ASN.1 definition of Key Usage Extension is:
*
- * <pre>
+ * <pre>
* id-ce-keyUsage OBJECT IDENTIFIER ::= { id-ce 15 }
*
* KeyUsage ::= BIT STRING {
@@ -189,9 +189,9 @@
* keyCertSign (5),
* cRLSign (6),
* encipherOnly (7),
- * decipherOnly (8)
+ * decipherOnly (8)
* }
- * </pre>
+ * </pre>
* (as specified in RFC 3280)
*
* @return the value of Key Usage Extension if it is in the list,
@@ -200,23 +200,23 @@
* than 9.
*/
public boolean[] valueOfKeyUsage() {
- Extension extn = getExtensionByOID("2.5.29.15");
+ Extension extn = getExtensionByOID("2.5.29.15");
KeyUsage kUsage = null;
if ((extn == null) || ((kUsage = extn.getKeyUsageValue()) == null)) {
return null;
}
return kUsage.getKeyUsage();
}
-
+
/**
* Returns the value of Extended Key Usage extension (OID == 2.5.29.37).
* The ASN.1 definition of Extended Key Usage Extension is:
*
- * <pre>
+ * <pre>
* id-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-ce 37 }
- *
+ *
* ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
- *
+ *
* KeyPurposeId ::= OBJECT IDENTIFIER
* </pre>
* (as specified in RFC 3280)
@@ -226,24 +226,24 @@
* @throws IOException if extension was incorrectly encoded.
*/
public List valueOfExtendedKeyUsage() throws IOException {
- Extension extn = getExtensionByOID("2.5.29.37");
+ Extension extn = getExtensionByOID("2.5.29.37");
if (extn == null) {
return null;
}
- return ((ExtendedKeyUsage)
+ return ((ExtendedKeyUsage)
extn.getDecodedExtensionValue()).getExtendedKeyUsage();
}
-
+
/**
* Returns the value of Basic Constraints Extension (OID = 2.5.29.19).
* The ASN.1 definition of Basic Constraints Extension is:
*
- * <pre>
+ * <pre>
* id-ce-basicConstraints OBJECT IDENTIFIER ::= { id-ce 19 }
*
* BasicConstraints ::= SEQUENCE {
* cA BOOLEAN DEFAULT FALSE,
- * pathLenConstraint INTEGER (0..MAX) OPTIONAL
+ * pathLenConstraint INTEGER (0..MAX) OPTIONAL
* }
* </pre>
* (as specified in RFC 3280)
@@ -252,65 +252,65 @@
* and Integer.MAX_VALUE if does not.
*/
public int valueOfBasicConstrains() {
- Extension extn = getExtensionByOID("2.5.29.19");
+ Extension extn = getExtensionByOID("2.5.29.19");
BasicConstraints bc = null;
- if ((extn == null)
+ if ((extn == null)
|| ((bc = extn.getBasicConstraintsValue()) == null)) {
return Integer.MAX_VALUE;
}
return bc.getPathLenConstraint();
}
-
+
/**
* Returns the value of Subject Alternative Name (OID = 2.5.29.17).
* The ASN.1 definition for Subject Alternative Name is:
*
- * <pre>
+ * <pre>
* id-ce-subjectAltName OBJECT IDENTIFIER ::= { id-ce 17 }
- *
+ *
* SubjectAltName ::= GeneralNames
* </pre>
* (as specified in RFC 3280)
*
- * @return Returns the collection of pairs:
+ * @return Returns the collection of pairs:
* (Integer (tag), Object (name value)) if extension presents, and
* null if does not.
*/
public List valueOfSubjectAlternativeName() throws IOException {
- Extension extn = getExtensionByOID("2.5.29.17");
+ Extension extn = getExtensionByOID("2.5.29.17");
if (extn == null) {
return null;
}
return ((GeneralNames) GeneralNames.ASN1.decode(extn.getExtnValue()))
.getPairsList();
}
-
+
/**
* Returns the value of Issuer Alternative Name Extension (OID = 2.5.29.18).
* The ASN.1 definition for Issuer Alternative Name is:
*
- * <pre>
+ * <pre>
* id-ce-issuerAltName OBJECT IDENTIFIER ::= { id-ce 18 }
- *
+ *
* IssuerAltName ::= GeneralNames
* </pre>
* (as specified in RFC 3280)
*
- * @return Returns the collection of pairs:
+ * @return Returns the collection of pairs:
* (Integer (tag), Object (name value)) if extension presents, and
* null if does not.
*/
public List valueOfIssuerAlternativeName() throws IOException {
- Extension extn = getExtensionByOID("2.5.29.18");
+ Extension extn = getExtensionByOID("2.5.29.18");
if (extn == null) {
return null;
}
- return ((GeneralNames)
+ return ((GeneralNames)
GeneralNames.ASN1.decode(extn.getExtnValue())).getPairsList();
}
-
+
/**
- * Returns the value of Certificate Issuer Extension (OID = 2.5.29.29).
+ * Returns the value of Certificate Issuer Extension (OID = 2.5.29.29).
* It is a CRL entry extension and contains the GeneralNames describing
* the issuer of revoked certificate. Its ASN.1 notation is as follows:
* <pre>
@@ -322,16 +322,16 @@
*
* @return the value of Certificate Issuer Extension
*/
- public X500Principal valueOfCertificateIssuerExtension()
+ public X500Principal valueOfCertificateIssuerExtension()
throws IOException {
- Extension extn = getExtensionByOID("2.5.29.29");
+ Extension extn = getExtensionByOID("2.5.29.29");
if (extn == null) {
return null;
}
- return ((CertificateIssuer)
+ return ((CertificateIssuer)
extn.getDecodedExtensionValue()).getIssuer();
}
-
+
/**
* TODO
* @param extn: Extension
@@ -369,23 +369,23 @@
}
return encoding;
}
-
+
public boolean equals(Object exts) {
if (!(exts instanceof Extensions)) {
return false;
}
Extensions extns = (Extensions) exts;
- return ((extensions == null) || (extensions.size() == 0)
- ? ((extns.extensions == null)
+ return ((extensions == null) || (extensions.size() == 0)
+ ? ((extns.extensions == null)
|| (extns.extensions.size() == 0))
- : ((extns.extensions == null)
+ : ((extns.extensions == null)
|| (extns.extensions.size() == 0))
? false
: (extensions.containsAll(extns.extensions)
&& (extensions.size() == extns.extensions.size()))
);
}
-
+
public int hashCode() {
int hashcode = 0;
if (extensions != null) {
@@ -393,7 +393,7 @@
}
return hashcode;
}
-
+
/**
* Places the string representation into the StringBuffer object.
*/
@@ -404,7 +404,7 @@
int num = 1;
for (Extension extension: extensions) {
buffer.append('\n').append(prefix)
- .append('[').append(num++).append("]: ");
+ .append('[').append(num++).append("]: ");
extension.dumpValue(buffer, prefix);
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/GeneralName.java b/luni/src/main/java/org/apache/harmony/security/x509/GeneralName.java
index fec6979..700bcf9 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/GeneralName.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/GeneralName.java
@@ -44,15 +44,15 @@
import org.apache.harmony.security.x501.Name;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the GeneralName structure which is a part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
- *
+ *
* GeneralName::= CHOICE {
* otherName [0] OtherName,
* rfc822Name [1] IA5String,
@@ -64,32 +64,32 @@
* iPAddress [7] OCTET STRING,
* registeredID [8] OBJECT IDENTIFIER
* }
- *
+ *
* OtherName::= SEQUENCE {
* type-id OBJECT IDENTIFIER,
- * value [0] EXPLICIT ANY DEFINED BY type-id
+ * value [0] EXPLICIT ANY DEFINED BY type-id
* }
- *
+ *
* EDIPartyName::= SEQUENCE {
* nameAssigner [0] DirectoryString OPTIONAL,
- * partyName [1] DirectoryString
+ * partyName [1] DirectoryString
* }
- *
+ *
* DirectoryString::= CHOICE {
* teletexString TeletexString (SIZE (1..MAX)),
* printableString PrintableString (SIZE (1..MAX)),
* universalString UniversalString (SIZE (1..MAX)),
* utf8String UTF8String (SIZE (1..MAX)),
- * bmpString BMPString (SIZE (1..MAX))
+ * bmpString BMPString (SIZE (1..MAX))
* }
- *
+ *
* </pre>
- *
+ *
* @see org.apache.harmony.security.x509.NameConstraints
* @see org.apache.harmony.security.x509.GeneralSubtree
*/
public class GeneralName {
-
+
/**
* The values of the tags of fields
*/
@@ -102,10 +102,10 @@
public static final int UR_ID = 6;
public static final int IP_ADDR = 7;
public static final int REG_ID = 8;
-
+
// ASN1 encoders/decoders for name choices
private static ASN1Type[] nameASN1 = new ASN1Type[9];
-
+
static {
nameASN1[OTHER_NAME] = OtherName.ASN1;
nameASN1[RFC822_NAME] = ASN1StringType.IA5STRING;
@@ -117,14 +117,14 @@
nameASN1[IP_ADDR] = ASN1OctetString.getInstance();
nameASN1[REG_ID] = ASN1Oid.getInstance();
}
-
+
// the tag of the name type
private int tag;
// the name value (can be String or byte array)
private Object name;
// the ASN.1 encoded form of GeneralName
private byte[] encoding;
- // the ASN.1 encoded form of GeneralName's field
+ // the ASN.1 encoded form of GeneralName's field
private byte[] name_encoding;
/**
@@ -140,23 +140,23 @@
* Note that the names:
* [0] otherName, [3] x400Address, [5] ediPartyName
* have no the string representation, so exception will be thrown.
- * To make the GeneralName object with such names use another constructor.
- * @param tag is an integer which value corresponds to the name type.
+ * To make the GeneralName object with such names use another constructor.
+ * @param tag is an integer which value corresponds to the name type.
* @param name is a name value corresponding to the tag.
* <pre>
*/
public GeneralName(int tag, String name) throws IOException {
if (name == null) {
- throw new IOException(Messages.getString("security.28"));
+ throw new IOException(Messages.getString("security.28"));
}
this.tag = tag;
switch (tag) {
case OTHER_NAME :
case X400_ADDR :
case EDIP_NAME :
- throw new IOException( Messages.getString("security.180", tag ));
+ throw new IOException( Messages.getString("security.180", tag ));
case DNS_NAME :
- // according to RFC 3280 p.34 the DNS name should be
+ // according to RFC 3280 p.34 the DNS name should be
// checked against the
// RFC 1034 p.10 (3.5. Preferred name syntax):
checkDNS(name);
@@ -181,7 +181,7 @@
this.name = ipStrToBytes(name);
break;
default:
- throw new IOException(Messages.getString("security.181", tag));
+ throw new IOException(Messages.getString("security.181", tag));
}
}
@@ -221,7 +221,7 @@
this.name = name;
}
/**
- * Constructor for type [7] iPAddress.
+ * Constructor for type [7] iPAddress.
* name is an array of bytes such as:
* For IP v4, as specified in RFC 791, the address must
* contain exactly 4 byte component. For IP v6, as specified in
@@ -234,7 +234,7 @@
int length = name.length;
if (length != 4 && length != 8 && length != 16 && length != 32) {
throw new IllegalArgumentException(
- Messages.getString("security.182"));
+ Messages.getString("security.182"));
}
this.tag = IP_ADDR;
this.name = new byte[name.length];
@@ -244,23 +244,23 @@
/**
* Constructs an object representing the value of GeneralName.
* @param tag is an integer which value corresponds
- * to the name type (0-8),
+ * to the name type (0-8),
* @param name is a DER encoded for of the name value
*/
- public GeneralName(int tag, byte[] name)
+ public GeneralName(int tag, byte[] name)
throws IOException {
if (name == null) {
- throw new NullPointerException(Messages.getString("security.28"));
+ throw new NullPointerException(Messages.getString("security.28"));
}
if ((tag < 0) || (tag > 8)) {
- throw new IOException(Messages.getString("security.183", tag));
+ throw new IOException(Messages.getString("security.183", tag));
}
this.tag = tag;
this.name_encoding = new byte[name.length];
System.arraycopy(name, 0, this.name_encoding, 0, name.length);
this.name = nameASN1[tag].decode(this.name_encoding);
}
-
+
/**
* Returns the tag of the name in the structure
* @return the tag of the name
@@ -270,7 +270,7 @@
}
/**
- * @return the value of the name.
+ * @return the value of the name.
* The class of name object depends on the tag as follows:
* [0] otherName - OtherName object,
* [1] rfc822Name - String object,
@@ -291,7 +291,7 @@
public Object getName() {
return name;
}
-
+
/**
* TODO
* @param _gname: Object
@@ -313,10 +313,10 @@
(String) gname.getName());
case REG_ID:
return Arrays.equals((int[]) name, (int[]) gname.name);
- case IP_ADDR:
+ case IP_ADDR:
// iPAddress [7], check by using ranges.
return Arrays.equals((byte[]) name, (byte[]) gname.name);
- case DIR_NAME:
+ case DIR_NAME:
case X400_ADDR:
case OTHER_NAME:
case EDIP_NAME:
@@ -327,16 +327,16 @@
//System.out.println(false);
return false;
}
-
+
public int hashCode() {
switch(tag) {
case RFC822_NAME:
case DNS_NAME:
case UR_ID:
case REG_ID:
- case IP_ADDR:
+ case IP_ADDR:
return name.hashCode();
- case DIR_NAME:
+ case DIR_NAME:
case X400_ADDR:
case OTHER_NAME:
case EDIP_NAME:
@@ -345,19 +345,19 @@
return super.hashCode();
}
}
-
+
/**
* Checks if the other general name is acceptable by this object.
* The name is acceptable if it has the same type name and its
* name value is equal to name value of this object. Also the name
- * is acceptable if this general name object is a part of name
+ * is acceptable if this general name object is a part of name
* constraints and the specified name is satisfied the restriction
* provided by this object (for more detail see section 4.2.1.11
* of rfc 3280).
* Note that for X400Address [3] check procedure is unclear so method
* just checks the equality of encoded forms.
- * For otherName [0], ediPartyName [5], and registeredID [8]
- * the check procedure if not defined by rfc 3280 and for names of
+ * For otherName [0], ediPartyName [5], and registeredID [8]
+ * the check procedure if not defined by rfc 3280 and for names of
* these types this method also checks only for equality of encoded forms.
*/
public boolean isAcceptable(GeneralName gname) {
@@ -366,47 +366,47 @@
}
switch (this.tag) {
case RFC822_NAME:
- // Mail address [1]:
+ // Mail address [1]:
// a@b.c - particular address is acceptable by the same address,
// or by b.c - host name.
return ((String) gname.getName()).toLowerCase()
.endsWith(((String) name).toLowerCase());
case DNS_NAME:
- // DNS name [2] that can be constructed by simply adding
- // to the left hand side of the name satisfies the name
+ // DNS name [2] that can be constructed by simply adding
+ // to the left hand side of the name satisfies the name
// constraint: aaa.aa.aa satisfies to aaa.aa.aa, aa.aa, ..
String dns = (String) name;
String _dns = (String) gname.getName();
if (dns.equalsIgnoreCase(_dns)) {
return true;
} else {
- return _dns.toLowerCase().endsWith("." + dns.toLowerCase());
+ return _dns.toLowerCase().endsWith("." + dns.toLowerCase());
}
case UR_ID:
- // For URIs the constraint ".xyz.com" is satisfied by both
- // abc.xyz.com and abc.def.xyz.com. However, the constraint
- // ".xyz.com" is not satisfied by "xyz.com".
+ // For URIs the constraint ".xyz.com" is satisfied by both
+ // abc.xyz.com and abc.def.xyz.com. However, the constraint
+ // ".xyz.com" is not satisfied by "xyz.com".
// When the constraint does not begin with a period, it
// specifies a host.
// Extract the host from URI:
String uri = (String) name;
- int begin = uri.indexOf("://")+3;
+ int begin = uri.indexOf("://")+3;
int end = uri.indexOf('/', begin);
- String host = (end == -1)
+ String host = (end == -1)
? uri.substring(begin)
: uri.substring(begin, end);
uri = (String) gname.getName();
- begin = uri.indexOf("://")+3;
+ begin = uri.indexOf("://")+3;
end = uri.indexOf('/', begin);
- String _host = (end == -1)
+ String _host = (end == -1)
? uri.substring(begin)
: uri.substring(begin, end);
- if (host.startsWith(".")) {
+ if (host.startsWith(".")) {
return _host.toLowerCase().endsWith(host.toLowerCase());
} else {
return host.equalsIgnoreCase(_host);
}
- case IP_ADDR:
+ case IP_ADDR:
// iPAddress [7], check by using ranges.
byte[] address = (byte[]) name;
byte[] _address = (byte[]) gname.getName();
@@ -416,7 +416,7 @@
return Arrays.equals(address, _address);
} else if (length == 2*_length) {
for (int i=0; i<_address.length; i++) {
- if ((_address[i] < address[i])
+ if ((_address[i] < address[i])
|| (_address[i] > address[i+_length])) {
return false;
}
@@ -425,13 +425,13 @@
} else {
return false;
}
- case DIR_NAME:
+ case DIR_NAME:
// FIXME: false:
// directoryName according to 4.1.2.4
// comparing the encoded forms of the names
//TODO:
- //Legacy implementations exist where an RFC 822 name
- //is embedded in the subject distinguished name in an
+ //Legacy implementations exist where an RFC 822 name
+ //is embedded in the subject distinguished name in an
//attribute of type EmailAddress
case X400_ADDR:
case OTHER_NAME:
@@ -443,23 +443,23 @@
}
return true;
}
-
+
/**
* Gets a list representation of this GeneralName object.
* The first entry of the list is an Integer object representing
* the type of mane (0-8), and the second entry is a value of the name:
* string or ASN.1 DER encoded form depending on the type as follows:
- * rfc822Name, dNSName, uniformResourceIdentifier names are returned
+ * rfc822Name, dNSName, uniformResourceIdentifier names are returned
* as Strings, using the string formats for those types (rfc 3280)
- * IP v4 address names are returned using dotted quad notation.
- * IP v6 address names are returned in the form "p1:p2:...:p8",
- * where p1-p8 are hexadecimal values representing the eight 16-bit
- * pieces of the address. registeredID name are returned as Strings
- * represented as a series of nonnegative integers separated by periods.
- * And directory names (distinguished names) are returned in
- * RFC 2253 string format.
- * otherName, X400Address, ediPartyName returned as byte arrays
- * containing the ASN.1 DER encoded form of the name.
+ * IP v4 address names are returned using dotted quad notation.
+ * IP v6 address names are returned in the form "p1:p2:...:p8",
+ * where p1-p8 are hexadecimal values representing the eight 16-bit
+ * pieces of the address. registeredID name are returned as Strings
+ * represented as a series of nonnegative integers separated by periods.
+ * And directory names (distinguished names) are returned in
+ * RFC 2253 string format.
+ * otherName, X400Address, ediPartyName returned as byte arrays
+ * containing the ASN.1 DER encoded form of the name.
*/
public List getAsList() {
ArrayList result = new ArrayList();
@@ -494,19 +494,19 @@
return Collections.unmodifiableList(result);
}
- //
+ //
// TODO
// @param data: byte[]
// @return
- //
+ //
private String getBytesAsString(byte[] data) {
- String result = "";
+ String result = "";
for (int i=0; i<data.length; i++) {
String tail = Integer.toHexString(0x00ff & data[i]);
if (tail.length() == 1) {
- tail = "0" + tail;
+ tail = "0" + tail;
}
- result += tail + " ";
+ result += tail + " ";
}
return result;
}
@@ -516,45 +516,45 @@
* @return
*/
public String toString() {
- String result = "";
+ String result = "";
switch (tag) {
case OTHER_NAME:
- result = "otherName[0]: "
+ result = "otherName[0]: "
+ getBytesAsString(getEncoded());
break;
case RFC822_NAME:
- result = "rfc822Name[1]: " + name;
+ result = "rfc822Name[1]: " + name;
break;
case DNS_NAME:
- result = "dNSName[2]: " + name;
+ result = "dNSName[2]: " + name;
break;
case UR_ID:
- result = "uniformResourceIdentifier[6]: " + name;
+ result = "uniformResourceIdentifier[6]: " + name;
break;
case REG_ID:
- result = "registeredID[8]: " + ObjectIdentifier.toString((int[]) name);
+ result = "registeredID[8]: " + ObjectIdentifier.toString((int[]) name);
break;
case X400_ADDR:
- result = "x400Address[3]: "
+ result = "x400Address[3]: "
+ getBytesAsString(getEncoded());
break;
- case DIR_NAME:
- result = "directoryName[4]: "
+ case DIR_NAME:
+ result = "directoryName[4]: "
+ ((Name) name).getName(X500Principal.RFC2253);
break;
case EDIP_NAME:
- result = "ediPartyName[5]: "
+ result = "ediPartyName[5]: "
+ getBytesAsString(getEncoded());
break;
- case IP_ADDR:
- result = "iPAddress[7]: " + ipBytesToStr((byte[]) name);
+ case IP_ADDR:
+ result = "iPAddress[7]: " + ipBytesToStr((byte[]) name);
break;
default:
// should never happen
}
return result;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 GeneralName value.
* @return a byte array containing ASN.1 encode form.
@@ -567,9 +567,9 @@
}
/**
- * @return the encoded value of the name without the tag associated
+ * @return the encoded value of the name without the tag associated
* with the name in the GeneralName structure
- * @throws IOException
+ * @throws IOException
*/
public byte[] getEncodedName() {
if (name_encoding == null) {
@@ -584,7 +584,7 @@
* by RFC 1123 (section 2.1).
*/
public static void checkDNS(String dns) throws IOException {
- byte[] bytes = dns.toLowerCase().getBytes("UTF-8");
+ byte[] bytes = dns.toLowerCase().getBytes("UTF-8");
// indicates if it is a first letter of the label
boolean first_letter = true;
for (int i=0; i<bytes.length; i++) {
@@ -595,7 +595,7 @@
continue;
}
if ((ch > 'z' || ch < 'a') && (ch < '0' || ch > '9')) {
- throw new IOException(Messages.getString("security.184",
+ throw new IOException(Messages.getString("security.184",
(char)ch, dns));
}
first_letter = false;
@@ -603,14 +603,14 @@
}
if (!((ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')
|| (ch == '-') || (ch == '.'))) {
- throw new IOException(Messages.getString("security.185", dns));
+ throw new IOException(Messages.getString("security.185", dns));
}
if (ch == '.') {
// check the end of the previous label, it should not
// be '-' sign
if (bytes[i-1] == '-') {
throw new IOException(
- Messages.getString("security.186", dns));
+ Messages.getString("security.186", dns));
}
first_letter = true;
}
@@ -624,17 +624,17 @@
public static void checkURI(String uri) throws IOException {
try {
URI ur = new URI(uri);
- if ((ur.getScheme() == null)
+ if ((ur.getScheme() == null)
|| (ur.getRawSchemeSpecificPart().length() == 0)) {
- throw new IOException(Messages.getString("security.187", uri));
+ throw new IOException(Messages.getString("security.187", uri));
}
if (!ur.isAbsolute()) {
- throw new IOException(Messages.getString("security.188", uri));
+ throw new IOException(Messages.getString("security.188", uri));
}
} catch (URISyntaxException e) {
throw (IOException) new IOException(
Messages.getString("security.189", uri)).initCause(e);
-
+
}
}
@@ -642,9 +642,9 @@
* Converts OID into array of bytes.
*/
public static int[] oidStrToInts(String oid) throws IOException {
- byte[] bytes = oid.getBytes("UTF-8");
+ byte[] bytes = oid.getBytes("UTF-8");
if (bytes[bytes.length-1] == '.') {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
int[] result = new int[bytes.length/2+1]; // best case: a.b.c.d.e
int number = 0; // the number of OID's components
@@ -657,14 +657,14 @@
}
if (i == pos) {
// the number was not read
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
result[number++] = value;
if (i >= bytes.length) {
break;
}
if (bytes[i] != '.') {
- throw new IOException(Messages.getString("security.56", oid));
+ throw new IOException(Messages.getString("security.56", oid));
}
}
if (number < 2) {
@@ -696,7 +696,7 @@
}
// the resulting array
byte[] result = new byte[num_components];
- byte[] ip_bytes = ip.getBytes("UTF-8");
+ byte[] ip_bytes = ip.getBytes("UTF-8");
// number of address component to be read
int component = 0;
// if it is reading the second bound of a range
@@ -715,7 +715,7 @@
&& (ip_bytes[i] <= '9')) {
digits++;
if (digits > 3) {
- throw new IOException(Messages.getString("security.18B", ip));
+ throw new IOException(Messages.getString("security.18B", ip));
}
value = 10 * value + (ip_bytes[i] - 48);
i++;
@@ -732,28 +732,28 @@
}
// check the reached delimiter
if ((ip_bytes[i] != '.' && ip_bytes[i] != '/')) {
- throw new IOException(Messages.getString("security.18C", ip));
+ throw new IOException(Messages.getString("security.18C", ip));
}
// check the correctness of the range
if (ip_bytes[i] == '/') {
if (reading_second_bound) {
// more than 2 bounds in the range
- throw new IOException(Messages.getString("security.18C", ip));
+ throw new IOException(Messages.getString("security.18C", ip));
}
if (component != 4) {
- throw new IOException(Messages.getString("security.18D", ip));
+ throw new IOException(Messages.getString("security.18D", ip));
}
reading_second_bound = true;
}
// check the number of the components
if (component > ((reading_second_bound) ? 7 : 3)) {
- throw new IOException(Messages.getString("security.18D", ip));
+ throw new IOException(Messages.getString("security.18D", ip));
}
i++;
}
// check the number of read components
if (component != num_components) {
- throw new IOException(Messages.getString("security.18D", ip));
+ throw new IOException(Messages.getString("security.18D", ip));
}
} else {
// IPv6 address is expected in the form of
@@ -763,7 +763,7 @@
// 010a:020b:3337:1000:FFFA:ABCD:9999:0000/010a:020b:3337:1000:FFFA:ABCD:9999:1111
if (ip_bytes.length != 39 && ip_bytes.length != 79) {
// incorrect length of the string representation
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
}
int value = 0;
// indicates the reading of the second half of byte
@@ -781,32 +781,32 @@
} else if (second_hex) {
// second hex value of a byte is expected but was not read
// (it is the situation like: ...ABCD:A:ABCD...)
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
} else if ((bytik == ':') || (bytik == '/')) {
if (component % 2 == 1) {
- // second byte of the component is omitted
+ // second byte of the component is omitted
// (it is the situation like: ... ABDC:AB:ABCD ...)
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
}
if (bytik == '/') {
if (reading_second_bound) {
// more than 2 bounds in the range
throw new IOException(
- Messages.getString("security.18E", ip));
+ Messages.getString("security.18E", ip));
}
if (component != 16) {
// check the number of read components
- throw new IOException(Messages.getString("security.18F", ip));
+ throw new IOException(Messages.getString("security.18F", ip));
}
reading_second_bound = true;
}
expect_delimiter = false;
continue;
} else {
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
}
if (expect_delimiter) { // delimiter is expected but was not read
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
}
if (!second_hex) {
// first half of byte has been read
@@ -824,50 +824,50 @@
}
// check the correctness of the read address:
if (second_hex || (component % 2 == 1)) {
- throw new IOException(Messages.getString("security.18E", ip));
+ throw new IOException(Messages.getString("security.18E", ip));
}
}
return result;
}
-
+
/**
* Helper method. Converts the byte array representation of ip address
* to the String.
* @param ip : byte array representation of ip address
- * If the length of byte array 4 then it represents an IP v4
- * and the output String will be in the dotted quad form.
- * If the length is 16 then it represents an IP v6
- * and the output String will be returned in format "p1:p2:...:p8",
- * where p1-p8 are hexadecimal values representing the eight 16-bit
+ * If the length of byte array 4 then it represents an IP v4
+ * and the output String will be in the dotted quad form.
+ * If the length is 16 then it represents an IP v6
+ * and the output String will be returned in format "p1:p2:...:p8",
+ * where p1-p8 are hexadecimal values representing the eight 16-bit
* pieces of the address.
* If the length is 8 or 32 then it represents an address range (RFC 1519)
* and the output String will contain 2 IP address divided by "/"
* @return String representation of ip address
*/
public static String ipBytesToStr(byte[] ip) {
- String result = "";
+ String result = "";
if (ip.length < 9) { // IP v4
for (int i=0; i<ip.length; i++) {
result += Integer.toString(ip[i] & 0xff);
if (i != ip.length-1) {
- result += (i == 3) ? "/": ".";
+ result += (i == 3) ? "/": ".";
}
}
} else {
for (int i=0; i<ip.length; i++) {
result += Integer.toHexString(0x00ff & ip[i]);
if ((i % 2 != 0) && (i != ip.length-1)) {
- result += (i == 15) ? "/": ":";
+ result += (i == 15) ? "/": ":";
}
}
}
return result;
}
-
+
public static final ASN1Choice ASN1 = new ASN1Choice(new ASN1Type[] {
- new ASN1Implicit(0, OtherName.ASN1),
- new ASN1Implicit(1, ASN1StringType.IA5STRING),
+ new ASN1Implicit(0, OtherName.ASN1),
+ new ASN1Implicit(1, ASN1StringType.IA5STRING),
new ASN1Implicit(2, ASN1StringType.IA5STRING),
new ASN1Implicit(3, ORAddress.ASN1),
new ASN1Implicit(4, Name.ASN1),
@@ -879,7 +879,7 @@
public Object getObjectToEncode(Object value) {
return ((GeneralName) value).name;
}
-
+
public int getIndex(java.lang.Object object) {
return ((GeneralName) object).tag;
}
@@ -905,9 +905,9 @@
break;
case UR_ID: // uniformResourceIdentifier
String uri = (String) in.content;
- if (uri.indexOf(":") == -1) {
+ if (uri.indexOf(":") == -1) {
throw new IOException(
- Messages.getString("security.190", uri));
+ Messages.getString("security.190", uri));
}
result = new GeneralName(in.choiceIndex, uri);
break;
@@ -915,17 +915,17 @@
result = new GeneralName((byte[]) in.content);
break;
case REG_ID: // registeredID
- result = new GeneralName(in.choiceIndex,
+ result = new GeneralName(in.choiceIndex,
ObjectIdentifier.toString((int[]) in.content));
break;
default:
- throw new IOException(Messages.getString("security.191", in.choiceIndex));
+ throw new IOException(Messages.getString("security.191", in.choiceIndex));
}
result.encoding = in.getEncoded();
return result;
}
};
-
+
// public static void printAsHex(int perLine,
// String prefix,
// String delimiter,
@@ -933,10 +933,10 @@
// for (int i=0; i<data.length; i++) {
// String tail = Integer.toHexString(0x000000ff & data[i]);
// if (tail.length() == 1) {
- // tail = "0" + tail;
+ // tail = "0" + tail;
// }
// System.out.print(prefix + "0x" + tail + delimiter);
-
+
// if (((i+1)%perLine) == 0) {
// System.out.println();
// }
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/GeneralNames.java b/luni/src/main/java/org/apache/harmony/security/x509/GeneralNames.java
index 0ad78df..823b7bd 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/GeneralNames.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/GeneralNames.java
@@ -33,18 +33,18 @@
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the GeneralNames structure which is a part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
*
- *
+ *
* <pre>
* GeneralNames ::= SEQUENCE SIZE (1..MAX) OF GeneralName
* </pre>
- *
+ *
* @see org.apache.harmony.security.x509.NameConstraints
* @see org.apache.harmony.security.x509.GeneralSubtree
*/
@@ -54,14 +54,14 @@
private List generalNames;
// the ASN.1 encoded form of GeneralNames
private byte[] encoding;
-
+
/**
* Constructs an object representing the value of GeneralNames.
*/
public GeneralNames() {
generalNames = new ArrayList();
}
-
+
/**
* TODO
* @param generalNames: List
@@ -69,12 +69,12 @@
public GeneralNames(List generalNames) {
this.generalNames = generalNames;
}
-
- //
+
+ //
// TODO
// @param generalNames: List
// @param encoding: byte[]
- //
+ //
private GeneralNames(List generalNames, byte[] encoding) {
this.generalNames = generalNames;
this.encoding = encoding;
@@ -124,7 +124,7 @@
* TODO
* @param name: GeneralName
* @return
- *
+ *
public GeneralName getNameByTag(int tag) {
encoding = null;
if ((generalNames == null) || (generalNames.size() == 0)) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtree.java b/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtree.java
index 3003c54..4ea1b41 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtree.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtree.java
@@ -29,24 +29,24 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the GeneralSubtree structure which is a part of X.509 certificate:
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
- *
+ *
* GeneralSubtree ::= SEQUENCE {
* base GeneralName,
* minimum [0] BaseDistance DEFAULT 0,
* maximum [1] BaseDistance OPTIONAL }
- *
+ *
* BaseDistance ::= INTEGER (0..MAX)
- *
+ *
* </pre>
- *
+ *
* @see org.apache.harmony.security.x509.NameConstraints
* @see org.apache.harmony.security.x509.GeneralName
*/
@@ -68,7 +68,7 @@
public GeneralSubtree(GeneralName base) {
this(base, 0, -1);
}
-
+
/**
* TODO
* @param base: GeneralName
@@ -77,7 +77,7 @@
public GeneralSubtree(GeneralName base, int minimum) {
this(base, minimum, -1);
}
-
+
/**
* TODO
* @param base: GeneralName
@@ -89,7 +89,7 @@
this.minimum = minimum;
this.maximum = maximum;
}
-
+
/**
* Returns the value of base field of the structure.
* @return base
@@ -130,15 +130,15 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("General Subtree: [\n");
- buffer.append(prefix).append(" base: ").append(base).append('\n');
- buffer.append(prefix).append(" minimum: ")
+ buffer.append(prefix).append("General Subtree: [\n");
+ buffer.append(prefix).append(" base: ").append(base).append('\n');
+ buffer.append(prefix).append(" minimum: ")
.append(minimum).append('\n');
if (maximum >= 0) {
- buffer.append(prefix).append(" maximum: ")
+ buffer.append(prefix).append(" maximum: ")
.append(maximum).append('\n');
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
/**
@@ -146,7 +146,7 @@
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
GeneralName.ASN1,
- new ASN1Implicit(0, ASN1Integer.getInstance()),
+ new ASN1Implicit(0, ASN1Integer.getInstance()),
new ASN1Implicit(1, ASN1Integer.getInstance()) }) {
{
setDefault(new byte[] {0}, 1); // minimum 0
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtrees.java b/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtrees.java
index 1f87f9a..1dc1721 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtrees.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/GeneralSubtrees.java
@@ -31,17 +31,17 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the GeneralSubtrees structure which is a part of X.509 certificate:
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
* </pre>
- *
+ *
* @see org.apache.harmony.security.x509.NameConstraints
* @see org.apache.harmony.security.x509.GeneralSubtree
*/
@@ -52,12 +52,12 @@
private List generalSubtrees;
// the ASN.1 encoded form of GeneralSubtrees
private byte[] encoding;
-
+
/**
* Constructs an object representing the value of GeneralSubtrees.
*/
public GeneralSubtrees() {}
-
+
/**
* TODO
* @param generalSubtrees: List
@@ -66,7 +66,7 @@
// TODO: the size should not be less than one
this.generalSubtrees = generalSubtrees;
}
-
+
/**
* Returns the list of values of subtrees.
* @return subtrees
@@ -111,7 +111,7 @@
public Collection getValues(Object object) {
GeneralSubtrees gss = (GeneralSubtrees) object;
- return (gss.generalSubtrees == null)
+ return (gss.generalSubtrees == null)
? new ArrayList() : gss.generalSubtrees;
}
};
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/InfoAccessSyntax.java b/luni/src/main/java/org/apache/harmony/security/x509/InfoAccessSyntax.java
index 631b25b..cb34fe6 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/InfoAccessSyntax.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/InfoAccessSyntax.java
@@ -30,23 +30,23 @@
/**
* The class encapsulates the ASN.1 DER encoding/decoding work
- * with the SubjectInfoAccessSyntax and AuthorityInfoAccessSyntax
+ * with the SubjectInfoAccessSyntax and AuthorityInfoAccessSyntax
* which are a part of X.509 framework
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* SubjectInfoAccessSyntax ::=
* SEQUENCE SIZE (1..MAX) OF AccessDescriptions
* AuthorityInfoAccessSyntax ::=
* SEQUENCE SIZE (1..MAX) OF AccessDescriptions
- *
+ *
* AccessDescription ::= SEQUENCE {
* accessMethod OBJECT IDENTIFIER,
* accessLocation GeneralName }
- *
+ *
*/
public class InfoAccessSyntax extends ExtensionValue {
@@ -60,7 +60,7 @@
throws IOException {
if (accessDescriptions == null || accessDescriptions.isEmpty()) {
// "AccessDescriptions list is null or empty"
- throw new IOException(Messages.getString("security.1A3"));
+ throw new IOException(Messages.getString("security.1A3"));
}
this.accessDescriptions = accessDescriptions;
this.encoding = encoding;
@@ -69,7 +69,7 @@
public List getAccessDescriptions() {
return new ArrayList(accessDescriptions);
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 InfoAccessSyntax.
* @return a byte array containing ASN.1 encoded form.
@@ -87,14 +87,14 @@
public String toString() {
StringBuilder res = new StringBuilder();
- res.append("\n---- InfoAccessSyntax:");
+ res.append("\n---- InfoAccessSyntax:");
if (accessDescriptions != null) {
for (Iterator it = accessDescriptions.iterator(); it.hasNext();) {
res.append('\n');
res.append(it.next());
}
}
- res.append("\n---- InfoAccessSyntax END\n");
+ res.append("\n---- InfoAccessSyntax END\n");
return res.toString();
}
@@ -103,9 +103,9 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("AccessDescriptions:\n");
+ buffer.append(prefix).append("AccessDescriptions:\n");
if (accessDescriptions == null || accessDescriptions.isEmpty()) {
- buffer.append("NULL\n");
+ buffer.append("NULL\n");
} else {
Iterator itr = accessDescriptions.iterator();
while (itr.hasNext()) {
@@ -114,9 +114,9 @@
}
}
-
+
/**
- * ASN.1 DER X.509 AuthorityInfoAccessSyntax and SubjectInfoAccessSyntax
+ * ASN.1 DER X.509 AuthorityInfoAccessSyntax and SubjectInfoAccessSyntax
* encoder/decoder class.
*/
public static final ASN1Type ASN1 = new ASN1SequenceOf(AccessDescription.ASN1) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/InhibitAnyPolicy.java b/luni/src/main/java/org/apache/harmony/security/x509/InhibitAnyPolicy.java
index 8f7fb0b..df0d95d 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/InhibitAnyPolicy.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/InhibitAnyPolicy.java
@@ -78,7 +78,7 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Inhibit Any-Policy: ")
+ buffer.append(prefix).append("Inhibit Any-Policy: ")
.append(skipCerts).append('\n');
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/InvalidityDate.java b/luni/src/main/java/org/apache/harmony/security/x509/InvalidityDate.java
index e44b7e3..3019078 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/InvalidityDate.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/InvalidityDate.java
@@ -75,8 +75,8 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Invalidity Date: [ ")
- .append(date).append(" ]\n");
+ buffer.append(prefix).append("Invalidity Date: [ ")
+ .append(date).append(" ]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/IssuingDistributionPoint.java b/luni/src/main/java/org/apache/harmony/security/x509/IssuingDistributionPoint.java
index 28ece58..6ae7204 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/IssuingDistributionPoint.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/IssuingDistributionPoint.java
@@ -65,7 +65,7 @@
/**
* Creates the extension object on the base of its encoded form.
*/
- public static IssuingDistributionPoint decode(byte[] encoding)
+ public static IssuingDistributionPoint decode(byte[] encoding)
throws IOException {
IssuingDistributionPoint idp =
(IssuingDistributionPoint) ASN1.decode(encoding);
@@ -160,20 +160,20 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Issuing Distribution Point: [\n");
+ buffer.append(prefix).append("Issuing Distribution Point: [\n");
if (distributionPoint != null) {
- distributionPoint.dumpValue(buffer, " " + prefix);
+ distributionPoint.dumpValue(buffer, " " + prefix);
}
- buffer.append(prefix).append(" onlyContainsUserCerts: ")
+ buffer.append(prefix).append(" onlyContainsUserCerts: ")
.append(onlyContainsUserCerts).append('\n');
- buffer.append(prefix).append(" onlyContainsCACerts: ")
+ buffer.append(prefix).append(" onlyContainsCACerts: ")
.append(onlyContainsCACerts).append('\n');
if (onlySomeReasons != null) {
- onlySomeReasons.dumpValue(buffer, prefix + " ");
+ onlySomeReasons.dumpValue(buffer, prefix + " ");
}
- buffer.append(prefix).append(" indirectCRL: ")
+ buffer.append(prefix).append(" indirectCRL: ")
.append(indirectCRL).append('\n');
- buffer.append(prefix).append(" onlyContainsAttributeCerts: ")
+ buffer.append(prefix).append(" onlyContainsAttributeCerts: ")
.append(onlyContainsAttributeCerts).append('\n');
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/KeyUsage.java b/luni/src/main/java/org/apache/harmony/security/x509/KeyUsage.java
index 5733413..349d3c6 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/KeyUsage.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/KeyUsage.java
@@ -49,15 +49,15 @@
* The names of the usages.
*/
private static final String[] USAGES = {
- "digitalSignature",
- "nonRepudiation",
- "keyEncipherment",
- "dataEncipherment",
- "keyAgreement",
- "keyCertSign",
- "cRLSign",
- "encipherOnly",
- "decipherOnly",
+ "digitalSignature",
+ "nonRepudiation",
+ "keyEncipherment",
+ "dataEncipherment",
+ "keyAgreement",
+ "keyCertSign",
+ "cRLSign",
+ "encipherOnly",
+ "decipherOnly",
};
// the value of extension
@@ -98,14 +98,14 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("KeyUsage [\n");
+ buffer.append(prefix).append("KeyUsage [\n");
for (int i=0; i<keyUsage.length; i++) {
if (keyUsage[i]) {
- buffer.append(prefix).append(" ")
+ buffer.append(prefix).append(" ")
.append(USAGES[i]).append('\n');
}
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/NameConstraints.java b/luni/src/main/java/org/apache/harmony/security/x509/NameConstraints.java
index c718dae..88e3067 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/NameConstraints.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/NameConstraints.java
@@ -36,24 +36,24 @@
import org.apache.harmony.security.internal.nls.Messages;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the following structure which is a part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
- *
+ *
* NameConstraints ::= SEQUENCE {
* permittedSubtrees [0] GeneralSubtrees OPTIONAL,
* excludedSubtrees [1] GeneralSubtrees OPTIONAL }
- *
+ *
* GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree
- *
+ *
* </pre>
- *
- *
+ *
+ *
* @see org.apache.harmony.security.x509.GeneralSubtree
* @see org.apache.harmony.security.x509.GeneralName
*/
@@ -76,26 +76,26 @@
public NameConstraints() {
this(null, null);
}
-
+
/**
* Constructs <code>NameConstrains</code> object
* @param permittedSubtrees: GeneralSubtrees
* @param excludedSubtrees: GeneralSubtrees
*/
- public NameConstraints(GeneralSubtrees permittedSubtrees,
+ public NameConstraints(GeneralSubtrees permittedSubtrees,
GeneralSubtrees excludedSubtrees) {
if (permittedSubtrees != null) {
List ps = permittedSubtrees.getSubtrees();
if ((ps == null) || (ps.size() == 0)) {
- throw
- new IllegalArgumentException(Messages.getString("security.17D"));
+ throw
+ new IllegalArgumentException(Messages.getString("security.17D"));
}
}
if (excludedSubtrees != null) {
List es = excludedSubtrees.getSubtrees();
if ((es == null) || (es.size() == 0)) {
- throw
- new IllegalArgumentException(Messages.getString("security.17E"));
+ throw
+ new IllegalArgumentException(Messages.getString("security.17E"));
}
}
this.permittedSubtrees = permittedSubtrees;
@@ -108,7 +108,7 @@
// @param excludedSubtrees: GeneralSubtrees
// @param encoding: byte[]
//
- private NameConstraints(GeneralSubtrees permittedSubtrees,
+ private NameConstraints(GeneralSubtrees permittedSubtrees,
GeneralSubtrees excludedSubtrees, byte[] encoding) {
this(permittedSubtrees, excludedSubtrees);
this.encoding = encoding;
@@ -117,7 +117,7 @@
public static NameConstraints decode(byte[] encoding) throws IOException {
return (NameConstraints) ASN1.decode(encoding);
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 NameConstraints value.
* @return a byte array containing ASN.1 encode form.
@@ -129,9 +129,9 @@
return encoding;
}
- //
+ //
// Prepare the data structure to speed up the checking process.
- //
+ //
private void prepareNames() {
// array of lists with permitted General Names divided by type
permitted_names = new ArrayList[9];
@@ -162,10 +162,10 @@
}
}
}
-
- //
+
+ //
// Returns the value of certificate extension
- //
+ //
private byte[] getExtensionValue(X509Certificate cert, String OID) {
try {
byte[] bytes = cert.getExtensionValue(OID);
@@ -177,17 +177,17 @@
return null;
}
}
-
+
/**
* Apply the name restrictions specified by this NameConstraints
* instance to the subject distinguished name and subject alternative
* names of specified X509Certificate. Restrictions apply only
* if specified name form is present in the certificate.
- * The restrictions are applied according the RFC 3280
+ * The restrictions are applied according the RFC 3280
* (see 4.2.1.11 Name Constraints), excepting that restrictions are applied
- * and to CA certificates, and to certificates which issuer and subject
+ * and to CA certificates, and to certificates which issuer and subject
* names the same (i.e. method does not check if it CA's certificate or not,
- * or if the names differ or not. This check if it is needed should be done
+ * or if the names differ or not. This check if it is needed should be done
* by caller before calling this method).
* @param X509Certificate : X.509 Certificate to be checked.
* @return true, if the certificate is acceptable according
@@ -198,10 +198,10 @@
prepareNames();
}
- byte[] bytes = getExtensionValue(cert, "2.5.29.17");
+ byte[] bytes = getExtensionValue(cert, "2.5.29.17");
List names;
try {
- names = (bytes == null)
+ names = (bytes == null)
? new ArrayList(1) // will check the subject field only
: ((GeneralNames) GeneralNames.ASN1.decode(bytes)).getNames();
} catch (IOException e) {
@@ -211,7 +211,7 @@
}
if ((excluded_names[4] != null) || (permitted_names[4] != null)) {
try {
- names.add(new GeneralName(4,
+ names.add(new GeneralName(4,
cert.getSubjectX500Principal().getName()));
} catch (IOException e) {
// should never be happened
@@ -219,23 +219,23 @@
}
return isAcceptable(names);
}
-
+
/**
* Check if this list of names is acceptable accoring to this
* NameConstraints object.
* @param names: List
- * @return
+ * @return
*/
public boolean isAcceptable(List names) {
if (permitted_names == null) {
prepareNames();
}
-
+
Iterator it = names.iterator();
- // check map: shows which types of permitted alternative names are
+ // check map: shows which types of permitted alternative names are
// presented in the certificate
boolean[] types_presented = new boolean[9];
- // check map: shows if permitted name of presented type is found
+ // check map: shows if permitted name of presented type is found
// among the certificate's alternative names
boolean[] permitted_found = new boolean[9];
while (it.hasNext()) {
@@ -277,31 +277,31 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Name Constraints: [\n");
+ buffer.append(prefix).append("Name Constraints: [\n");
if (permittedSubtrees != null) {
- buffer.append(prefix).append(" Permitted: [\n");
+ buffer.append(prefix).append(" Permitted: [\n");
for (Iterator it=permittedSubtrees.getSubtrees().iterator();
it.hasNext();) {
- ((GeneralSubtree) it.next()).dumpValue(buffer, prefix + " ");
+ ((GeneralSubtree) it.next()).dumpValue(buffer, prefix + " ");
}
- buffer.append(prefix).append(" ]\n");
+ buffer.append(prefix).append(" ]\n");
}
if (excludedSubtrees != null) {
- buffer.append(prefix).append(" Excluded: [\n");
+ buffer.append(prefix).append(" Excluded: [\n");
for (Iterator it=excludedSubtrees.getSubtrees().iterator();
it.hasNext();) {
- ((GeneralSubtree) it.next()).dumpValue(buffer, prefix + " ");
+ ((GeneralSubtree) it.next()).dumpValue(buffer, prefix + " ");
}
- buffer.append(prefix).append(" ]\n");
+ buffer.append(prefix).append(" ]\n");
}
- buffer.append('\n').append(prefix).append("]\n");
+ buffer.append('\n').append(prefix).append("]\n");
}
-
+
/**
* X.509 NameConstraints encoder/decoder.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- new ASN1Implicit(0, GeneralSubtrees.ASN1),
+ new ASN1Implicit(0, GeneralSubtrees.ASN1),
new ASN1Implicit(1, GeneralSubtrees.ASN1) }) {
{
setOptional(0);
@@ -311,7 +311,7 @@
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new NameConstraints(
- (GeneralSubtrees) values[0],
+ (GeneralSubtrees) values[0],
(GeneralSubtrees) values[1],
in.getEncoded());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/ORAddress.java b/luni/src/main/java/org/apache/harmony/security/x509/ORAddress.java
index 0e3bf98..f5b4bae 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/ORAddress.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/ORAddress.java
@@ -27,7 +27,7 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the ORAddress structure which is a part of X.509 certificate:
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -39,7 +39,7 @@
* built-in-standard-attributes BuiltInStandardAttributes,
* built-in-domain-defined-attributes
* BuiltInDomainDefinedAttributes OPTIONAL,
- * extension-attributes ExtensionAttributes OPTIONAL
+ * extension-attributes ExtensionAttributes OPTIONAL
* }
* </pre>
*
@@ -54,7 +54,7 @@
* TODO
*/
public ORAddress() {}
-
+
/**
* Returns ASN.1 encoded form of this X.509 ORAddress value.
* @return a byte array containing ASN.1 encode form.
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/OtherName.java b/luni/src/main/java/org/apache/harmony/security/x509/OtherName.java
index 150e81e..d0e9693 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/OtherName.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/OtherName.java
@@ -31,17 +31,17 @@
import org.apache.harmony.security.asn1.ObjectIdentifier;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with OtherName structure which is a subpart of GeneralName
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* OtherName ::= SEQUENCE {
* type-id OBJECT IDENTIFIER,
- * value [0] EXPLICIT ANY DEFINED BY type-id
+ * value [0] EXPLICIT ANY DEFINED BY type-id
* }
* </pre>
*/
@@ -52,7 +52,7 @@
private byte[] value;
// the ASN.1 encoded form of OtherName
private byte[] encoding;
-
+
/**
* TODO
* @param typeID: String
@@ -62,18 +62,18 @@
this(typeID, value, null);
}
- //
+ //
// TODO
// @param typeID: String
// @param value: byte[]
// @param encoding: byte[]
- //
+ //
private OtherName(String typeID, byte[] value, byte[] encoding) {
this.typeID = typeID;
this.value = value;
this.encoding = encoding;
}
-
+
/**
* Returns the value of typeID field of the structure.
* @return typeID
@@ -89,7 +89,7 @@
public byte[] getValue() {
return value;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 OtherName value.
* @return a byte array containing ASN.1 encode form.
@@ -105,7 +105,7 @@
* ASN.1 DER X.509 OtherName encoder/decoder class.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- ASN1Oid.getInstance(),
+ ASN1Oid.getInstance(),
new ASN1Explicit(0, ASN1Any.getInstance()) }) {
protected Object getDecodedObject(BerInputStream in) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/PolicyConstraints.java b/luni/src/main/java/org/apache/harmony/security/x509/PolicyConstraints.java
index 2b6ceca..6687c89 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/PolicyConstraints.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/PolicyConstraints.java
@@ -32,13 +32,13 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with PolicyConstraints structure which is a part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
*
* PolicyConstraints ::= SEQUENCE {
@@ -48,7 +48,7 @@
* SkipCerts ::= INTEGER (0..MAX)
*
* </pre>
- *
+ *
* TODO: This class is not fully implemented.
*
* @see org.apache.harmony.security.x509.GeneralSubtree
@@ -69,7 +69,7 @@
public PolicyConstraints() {
this(null, null);
}
-
+
/**
* TODO
* @param requireExplicitPolicy: GeneralSubtrees
@@ -105,12 +105,12 @@
// @param inhibitPolicyMapping: GeneralSubtrees
// @param encoding: byte[]
//
- private PolicyConstraints(BigInteger requireExplicitPolicy,
+ private PolicyConstraints(BigInteger requireExplicitPolicy,
BigInteger inhibitPolicyMapping, byte[] encoding) {
this(requireExplicitPolicy, inhibitPolicyMapping);
this.encoding = encoding;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 PolicyConstraints value.
* @return a byte array containing ASN.1 encode form.
@@ -123,27 +123,27 @@
}
/**
- * Places the string representation of extension value
+ * Places the string representation of extension value
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("PolicyConstraints: [\n");
+ buffer.append(prefix).append("PolicyConstraints: [\n");
if (requireExplicitPolicy != null) {
- buffer.append(prefix).append(" requireExplicitPolicy: ")
+ buffer.append(prefix).append(" requireExplicitPolicy: ")
.append(requireExplicitPolicy).append('\n');
}
if (inhibitPolicyMapping != null) {
- buffer.append(prefix).append(" inhibitPolicyMapping: ")
+ buffer.append(prefix).append(" inhibitPolicyMapping: ")
.append(inhibitPolicyMapping).append('\n');
}
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
/**
* X.509 PolicyConstraints encoder/decoder.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- new ASN1Implicit(0, ASN1Integer.getInstance()),
+ new ASN1Implicit(0, ASN1Integer.getInstance()),
new ASN1Implicit(1, ASN1Integer.getInstance()) }) {
{
setOptional(0);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/PolicyInformation.java b/luni/src/main/java/org/apache/harmony/security/x509/PolicyInformation.java
index dad75a3..bdade63 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/PolicyInformation.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/PolicyInformation.java
@@ -30,21 +30,21 @@
import org.apache.harmony.security.asn1.ObjectIdentifier;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with PolicyInformation structure which is a subpart of certificatePolicies
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* PolicyInformation ::= SEQUENCE {
* policyIdentifier CertPolicyId,
* policyQualifiers SEQUENCE SIZE (1..MAX) OF
- * PolicyQualifierInfo OPTIONAL
+ * PolicyQualifierInfo OPTIONAL
* }
* </pre>
- *
+ *
* TODO: This class is not fully implemented, implemented only work
* with OIDs.
*/
@@ -55,7 +55,7 @@
private String policyIdentifier;
// the ASN.1 encoded form of PolicyInformation
private byte[] encoding;
-
+
/**
* TODO
* @param policyIdentifier: String
@@ -84,11 +84,11 @@
}
/**
- * Places the string representation of extension value
+ * Places the string representation of extension value
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer) {
- buffer.append("Policy Identifier [")
+ buffer.append("Policy Identifier [")
.append(policyIdentifier).append(']');
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/PolicyQualifierInfo.java b/luni/src/main/java/org/apache/harmony/security/x509/PolicyQualifierInfo.java
index 1cc672a..7eda5cf 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/PolicyQualifierInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/PolicyQualifierInfo.java
@@ -30,13 +30,13 @@
/**
/**
- * The class encapsulates the ASN.1 DER decoding work
+ * The class encapsulates the ASN.1 DER decoding work
* with PolicyQualifierInfo structure
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
* Certificate and Certificate Revocation List (CRL) Profile.
* http://www.ietf.org/rfc/rfc3280.txt):
- *
+ *
* <pre>
* PolicyQualifierInfo ::= SEQUENCE {
* policyQualifierId PolicyQualifierId,
@@ -46,7 +46,7 @@
* OBJECT IDENTIFIER ( id-qt-cps | id-qt-unotice )
*
* </pre>
- *
+ *
*/
public class PolicyQualifierInfo {
// Contains only ASN1 DER decoder currently
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/PrivateKeyUsagePeriod.java b/luni/src/main/java/org/apache/harmony/security/x509/PrivateKeyUsagePeriod.java
index 417479a..65767e0 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/PrivateKeyUsagePeriod.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/PrivateKeyUsagePeriod.java
@@ -31,7 +31,7 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the following certificate extension (OID: 2.5.29.16)
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -41,7 +41,7 @@
* <pre>
* PrivateKeyUsagePeriod ::= SEQUENCE {
* notBefore [0] GeneralizedTime OPTIONAL,
- * notAfter [1] GeneralizedTime OPTIONAL
+ * notAfter [1] GeneralizedTime OPTIONAL
* }
* </pre>
*/
@@ -60,22 +60,22 @@
* @param notAfterDate: Date
*/
public PrivateKeyUsagePeriod(Date notBeforeDate, Date notAfterDate) {
- this(notBeforeDate, notAfterDate, null);
+ this(notBeforeDate, notAfterDate, null);
}
- //
+ //
// TODO
// @param notBeforeDate: Date
// @param notAfterDate: Date
// @param encoding: byte[]
- //
- private PrivateKeyUsagePeriod(Date notBeforeDate,
+ //
+ private PrivateKeyUsagePeriod(Date notBeforeDate,
Date notAfterDate, byte[] encoding) {
this.notBeforeDate = notBeforeDate;
this.notAfterDate = notAfterDate;
this.encoding = encoding;
}
-
+
/**
* Returns the value of notBefore field of the structure.
* @return notBefore
@@ -91,7 +91,7 @@
public Date getNotAfter() {
return notAfterDate;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 PrivateKeyUsagePeriod value.
* @return a byte array containing ASN.1 encode form.
@@ -107,7 +107,7 @@
* ASN.1 DER X.509 PrivateKeyUsagePeriod encoder/decoder class.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- new ASN1Implicit(0, ASN1GeneralizedTime.getInstance()),
+ new ASN1Implicit(0, ASN1GeneralizedTime.getInstance()),
new ASN1Implicit(1, ASN1GeneralizedTime.getInstance()) }) {
{
setOptional(0);
@@ -116,7 +116,7 @@
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[])in.content;
- return
+ return
new PrivateKeyUsagePeriod((Date) values[0], (Date) values[1],
in.getEncoded());
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/ReasonCode.java b/luni/src/main/java/org/apache/harmony/security/x509/ReasonCode.java
index 11b6b21..0118206 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/ReasonCode.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/ReasonCode.java
@@ -89,40 +89,40 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Reason Code: [ ");
+ buffer.append(prefix).append("Reason Code: [ ");
switch (code) {
case UNSPECIFIED:
- buffer.append("unspecified");
+ buffer.append("unspecified");
break;
case KEY_COMPROMISE:
- buffer.append("keyCompromise");
+ buffer.append("keyCompromise");
break;
case CA_COMPROMISE:
- buffer.append("cACompromise");
+ buffer.append("cACompromise");
break;
case AFFILIATION_CHANGED:
- buffer.append("affiliationChanged");
+ buffer.append("affiliationChanged");
break;
case SUPERSEDED:
- buffer.append("superseded");
+ buffer.append("superseded");
break;
case CESSATION_OF_OPERATION:
- buffer.append("cessationOfOperation");
+ buffer.append("cessationOfOperation");
break;
case CERTIFICATE_HOLD:
- buffer.append("certificateHold");
+ buffer.append("certificateHold");
break;
case REMOVE_FROM_CRL:
- buffer.append("removeFromCRL");
+ buffer.append("removeFromCRL");
break;
case PRIVILEGE_WITHDRAWN:
- buffer.append("privilegeWithdrawn");
+ buffer.append("privilegeWithdrawn");
break;
case AA_COMPROMISE:
- buffer.append("aACompromise");
+ buffer.append("aACompromise");
break;
}
- buffer.append(" ]\n");
+ buffer.append(" ]\n");
}
/**
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/ReasonFlags.java b/luni/src/main/java/org/apache/harmony/security/x509/ReasonFlags.java
index 2cd4ba9..66e1aab 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/ReasonFlags.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/ReasonFlags.java
@@ -29,7 +29,7 @@
import org.apache.harmony.security.asn1.BerOutputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with the following part of X.509 CRL
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -46,30 +46,30 @@
* cessationOfOperation (5),
* certificateHold (6),
* privilegeWithdrawn (7),
- * aACompromise (8)
+ * aACompromise (8)
* }
* </pre>
*/
public class ReasonFlags {
-
+
/**
* The names of the reasons.
*/
static final String[] REASONS = {
- "unused",
- "keyCompromise",
- "cACompromise",
- "affiliationChanged",
- "superseded",
- "cessationOfOperation",
- "certificateHold",
- "privilegeWithdrawn",
- "aACompromise"
+ "unused",
+ "keyCompromise",
+ "cACompromise",
+ "affiliationChanged",
+ "superseded",
+ "cessationOfOperation",
+ "certificateHold",
+ "privilegeWithdrawn",
+ "aACompromise"
};
// the value of extension
private boolean[] flags;
-
+
/**
* Creates the extension object corresponding to the given flags.
*/
@@ -83,26 +83,26 @@
*/
public void dumpValue(StringBuffer buffer, String prefix) {
buffer.append(prefix);
- buffer.append("ReasonFlags [\n");
+ buffer.append("ReasonFlags [\n");
for (int i=0; i<flags.length; i++) {
if (flags[i]) {
- buffer.append(prefix).append(" ")
+ buffer.append(prefix).append(" ")
.append(REASONS[i]).append('\n');
}
}
buffer.append(prefix);
- buffer.append("]\n");
+ buffer.append("]\n");
}
-
+
/**
* ASN.1 Encoder/Decoder.
*/
- public static final ASN1BitString ASN1 =
+ public static final ASN1BitString ASN1 =
new ASN1BitString.ASN1NamedBitList(REASONS.length) {
public Object getDecodedObject(BerInputStream in) throws IOException {
return new ReasonFlags((boolean[]) super.getDecodedObject(in));
}
-
+
public void setEncodingContent(BerOutputStream out) {
out.content = ((ReasonFlags) out.content).flags;
super.setEncodingContent(out);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/SubjectKeyIdentifier.java b/luni/src/main/java/org/apache/harmony/security/x509/SubjectKeyIdentifier.java
index 54d7a7d..04ae096 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/SubjectKeyIdentifier.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/SubjectKeyIdentifier.java
@@ -75,9 +75,9 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("SubjectKeyIdentifier: [\n");
+ buffer.append(prefix).append("SubjectKeyIdentifier: [\n");
buffer.append(Array.toString(keyIdentifier, prefix));
- buffer.append(prefix).append("]\n");
+ buffer.append(prefix).append("]\n");
}
}
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/SubjectPublicKeyInfo.java b/luni/src/main/java/org/apache/harmony/security/x509/SubjectPublicKeyInfo.java
index 852b3ce..7a31b93 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/SubjectPublicKeyInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/SubjectPublicKeyInfo.java
@@ -46,7 +46,7 @@
* <pre>
* SubjectPublicKeyInfo ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
- * subjectPublicKey BIT STRING
+ * subjectPublicKey BIT STRING
* }
* </pre>
*/
@@ -62,14 +62,14 @@
private int unusedBits;
// the ASN.1 encoded form of SubjectPublicKeyInfo
private byte[] encoding;
-
+
/**
* TODO
* @param algID: AlgorithmIdentifier
* @param subjectPublicKey: byte[]
*/
- public SubjectPublicKeyInfo(AlgorithmIdentifier algID,
- byte[] subjectPublicKey) {
+ public SubjectPublicKeyInfo(AlgorithmIdentifier algID,
+ byte[] subjectPublicKey) {
this(algID, subjectPublicKey, 0);
}
@@ -79,20 +79,20 @@
* @param subjectPublicKey: byte[]
* @param unused: int
*/
- public SubjectPublicKeyInfo(AlgorithmIdentifier algID,
+ public SubjectPublicKeyInfo(AlgorithmIdentifier algID,
byte[] subjectPublicKey, int unused) {
this(algID, subjectPublicKey, 0, null);
}
- //
+ //
// TODO
// @param algID: AlgorithmIdentifier
// @param subjectPublicKey: byte[]
// @param unused: int
// @param encoding: byte[]
- //
- private SubjectPublicKeyInfo(AlgorithmIdentifier algID,
- byte[] subjectPublicKey, int unused,
+ //
+ private SubjectPublicKeyInfo(AlgorithmIdentifier algID,
+ byte[] subjectPublicKey, int unused,
byte[] encoding) {
this.algorithmID = algID;
this.subjectPublicKey = subjectPublicKey;
@@ -144,9 +144,9 @@
if (publicKey == null) {
String alg_oid = algorithmID.getAlgorithm();
try {
- String alg =
+ String alg =
AlgNameMapper.map2AlgName(alg_oid);
-
+
if (alg == null) {
alg = alg_oid;
}
@@ -162,7 +162,7 @@
}
return publicKey;
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
AlgorithmIdentifier.ASN1, ASN1BitString.getInstance() }) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/TBSCertList.java b/luni/src/main/java/org/apache/harmony/security/x509/TBSCertList.java
index 5f7cad0..17cf841 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/TBSCertList.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/TBSCertList.java
@@ -41,7 +41,7 @@
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with TBSCertList structure which is the part of X.509 CRL
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -70,9 +70,9 @@
public class TBSCertList {
// the value of version field of the structure
- private final int version;
+ private final int version;
// the value of signature field of the structure
- private final AlgorithmIdentifier signature;
+ private final AlgorithmIdentifier signature;
// the value of issuer field of the structure
private final Name issuer;
// the value of thisUpdate of the structure
@@ -90,7 +90,7 @@
private final BigInteger userCertificate;
private final Date revocationDate;
private final Extensions crlEntryExtensions;
-
+
private boolean issuerRetrieved;
private X500Principal issuer;
private byte[] encoding;
@@ -124,7 +124,7 @@
}
if (!issuerRetrieved) {
try {
- issuer =
+ issuer =
crlEntryExtensions.valueOfCertificateIssuerExtension();
} catch (IOException e) {
e.printStackTrace();
@@ -133,27 +133,27 @@
}
return issuer;
}
-
+
public byte[] getEncoded() {
if (encoding == null) {
encoding = ASN1.encode(this);
}
return encoding;
}
-
+
public boolean equals(Object rc) {
if (!(rc instanceof RevokedCertificate)) {
return false;
}
RevokedCertificate rcert = (RevokedCertificate) rc;
return userCertificate.equals(rcert.userCertificate)
- && ((revocationDate.getTime() / 1000)
+ && ((revocationDate.getTime() / 1000)
== (rcert.revocationDate.getTime() / 1000))
&& ((crlEntryExtensions == null)
? rcert.crlEntryExtensions == null
: crlEntryExtensions.equals(rcert.crlEntryExtensions));
}
-
+
public int hashCode() {
return userCertificate.hashCode() * 37 + (int)revocationDate.getTime() / 1000
+ (crlEntryExtensions == null ? 0 : crlEntryExtensions.hashCode());
@@ -164,18 +164,18 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer, String prefix) {
- buffer.append(prefix).append("Certificate Serial Number: ")
+ buffer.append(prefix).append("Certificate Serial Number: ")
.append(userCertificate).append('\n');
- buffer.append(prefix).append("Revocation Date: ")
+ buffer.append(prefix).append("Revocation Date: ")
.append(revocationDate);
if (crlEntryExtensions != null) {
buffer.append('\n').append(prefix)
- .append("CRL Entry Extensions: [");
- crlEntryExtensions.dumpValue(buffer, prefix + " ");
+ .append("CRL Entry Extensions: [");
+ crlEntryExtensions.dumpValue(buffer, prefix + " ");
buffer.append(prefix).append(']');
}
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(
new ASN1Type[] {ASN1Integer.getInstance(), Time.ASN1,
Extensions.ASN1}) {
@@ -219,10 +219,10 @@
* @param issuer: Name
* @param thisUpdate: Time
*/
- public TBSCertList(AlgorithmIdentifier signature,
+ public TBSCertList(AlgorithmIdentifier signature,
Name issuer, Date thisUpdate) {
- this.version = 1;
- this.signature = signature;
+ this.version = 1;
+ this.signature = signature;
this.issuer = issuer;
this.thisUpdate = thisUpdate;
this.nextUpdate = null;
@@ -232,7 +232,7 @@
/**
* Constructs the instance of TBSCertList with all optional fields
- * @param version: version of the CRL. Should be 1 or 2.
+ * @param version: version of the CRL. Should be 1 or 2.
* Note that if the version of CRL is 1, then nextUpdate,
* crlExtensions fields of CRL and crlEntryExtensions field
* of CRL entry must not be presented in CRL.
@@ -244,11 +244,11 @@
* @param revokedCertificates: List
* @param crlExtensions: Extensions
*/
- public TBSCertList(int version, AlgorithmIdentifier signature,
- Name issuer, Date thisUpdate, Date nextUpdate,
+ public TBSCertList(int version, AlgorithmIdentifier signature,
+ Name issuer, Date thisUpdate, Date nextUpdate,
List revokedCertificates, Extensions crlExtensions) {
- this.version = version;
- this.signature = signature;
+ this.version = version;
+ this.signature = signature;
this.issuer = issuer;
this.thisUpdate = thisUpdate;
this.nextUpdate = nextUpdate;
@@ -257,12 +257,12 @@
}
// Constructs the object with associated ASN.1 encoding
- private TBSCertList(int version, AlgorithmIdentifier signature,
- Name issuer, Date thisUpdate, Date nextUpdate,
+ private TBSCertList(int version, AlgorithmIdentifier signature,
+ Name issuer, Date thisUpdate, Date nextUpdate,
List revokedCertificates, Extensions crlExtensions,
byte[] encoding) {
- this.version = version;
- this.signature = signature;
+ this.version = version;
+ this.signature = signature;
this.issuer = issuer;
this.thisUpdate = thisUpdate;
this.nextUpdate = nextUpdate;
@@ -286,7 +286,7 @@
public AlgorithmIdentifier getSignature() {
return signature;
}
-
+
/**
* Returns the value of issuer field of the structure.
* @return issuer
@@ -294,7 +294,7 @@
public Name getIssuer() {
return issuer;
}
-
+
/**
* Returns the value of thisUpdate field of the structure.
* @return thisUpdate
@@ -302,7 +302,7 @@
public Date getThisUpdate() {
return thisUpdate;
}
-
+
/**
* Returns the value of nextUpdate field of the structure.
* @return nextUpdate
@@ -310,7 +310,7 @@
public Date getNextUpdate() {
return nextUpdate;
}
-
+
/**
* Returns the value of revokedCertificates field of the structure.
* @return revokedCertificates
@@ -337,7 +337,7 @@
}
return encoding;
}
-
+
public boolean equals(Object tbs) {
if (!(tbs instanceof TBSCertList)) {
return false;
@@ -347,23 +347,23 @@
&& (signature.equals(tbscert.signature))
// FIXME use Name.equals when it will be implemented
&& (Arrays.equals(issuer.getEncoded(), tbscert.issuer.getEncoded()))
- && ((thisUpdate.getTime() / 1000)
+ && ((thisUpdate.getTime() / 1000)
== (tbscert.thisUpdate.getTime() / 1000))
- && ((nextUpdate == null)
+ && ((nextUpdate == null)
? tbscert.nextUpdate == null
- : ((nextUpdate.getTime() / 1000)
+ : ((nextUpdate.getTime() / 1000)
== (tbscert.nextUpdate.getTime() / 1000)))
- && ((((revokedCertificates == null)
+ && ((((revokedCertificates == null)
|| (tbscert.revokedCertificates == null))
&& (revokedCertificates == tbscert.revokedCertificates))
|| (revokedCertificates.containsAll(tbscert.revokedCertificates)
- && (revokedCertificates.size()
+ && (revokedCertificates.size()
== tbscert.revokedCertificates.size())))
&& ((crlExtensions == null)
? tbscert.crlExtensions == null
: crlExtensions.equals(tbscert.crlExtensions));
}
-
+
public int hashCode() {
return ((version * 37 + signature.hashCode()) * 37
+ issuer.getEncoded().hashCode()) * 37
@@ -375,29 +375,29 @@
* into the StringBuffer object.
*/
public void dumpValue(StringBuffer buffer) {
- buffer.append("X.509 CRL v").append(version);
- buffer.append("\nSignature Algorithm: [");
+ buffer.append("X.509 CRL v").append(version);
+ buffer.append("\nSignature Algorithm: [");
signature.dumpValue(buffer);
buffer.append(']');
- buffer.append("\nIssuer: ").append(issuer.getName(X500Principal.RFC2253));
- buffer.append("\n\nThis Update: ").append(thisUpdate);
- buffer.append("\nNext Update: ").append(nextUpdate).append('\n');
+ buffer.append("\nIssuer: ").append(issuer.getName(X500Principal.RFC2253));
+ buffer.append("\n\nThis Update: ").append(thisUpdate);
+ buffer.append("\nNext Update: ").append(nextUpdate).append('\n');
if (revokedCertificates != null) {
- buffer.append("\nRevoked Certificates: ")
- .append(revokedCertificates.size()).append(" [");
+ buffer.append("\nRevoked Certificates: ")
+ .append(revokedCertificates.size()).append(" [");
int number = 1;
for (Iterator it = revokedCertificates.iterator();it.hasNext();) {
- buffer.append("\n [").append(number++).append(']');
- ((RevokedCertificate) it.next()).dumpValue(buffer, " ");
+ buffer.append("\n [").append(number++).append(']');
+ ((RevokedCertificate) it.next()).dumpValue(buffer, " ");
buffer.append('\n');
}
- buffer.append("]\n");
+ buffer.append("]\n");
}
if (crlExtensions != null) {
- buffer.append("\nCRL Extensions: ")
- .append(crlExtensions.size()).append(" [");
- crlExtensions.dumpValue(buffer, " ");
- buffer.append("]\n");
+ buffer.append("\nCRL Extensions: ")
+ .append(crlExtensions.size()).append(" [");
+ crlExtensions.dumpValue(buffer, " ");
+ buffer.append("]\n");
}
}
@@ -420,17 +420,17 @@
setOptional(6);
}
- protected Object getDecodedObject(BerInputStream in)
+ protected Object getDecodedObject(BerInputStream in)
throws IOException {
Object[] values = (Object[]) in.content;
return new TBSCertList(
- (values[0] == null)
+ (values[0] == null)
? 1
: ASN1Integer.toIntValue(values[0])+1,
(AlgorithmIdentifier) values[1],
- (Name) values[2],
- (Date) values[3],
- (Date) values[4],
+ (Name) values[2],
+ (Date) values[3],
+ (Date) values[4],
(List) values[5],
(Extensions) values[6],
in.getEncoded()
@@ -442,7 +442,7 @@
values[0] = (tbs.version > 1)
? ASN1Integer.fromIntValue(tbs.version - 1) : null;
values[1] = tbs.signature;
- values[2] = tbs.issuer;
+ values[2] = tbs.issuer;
values[3] = tbs.thisUpdate;
values[4] = tbs.nextUpdate;
values[5] = tbs.revokedCertificates;
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/TBSCertificate.java b/luni/src/main/java/org/apache/harmony/security/x509/TBSCertificate.java
index e4e594e..71e993b 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/TBSCertificate.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/TBSCertificate.java
@@ -36,7 +36,7 @@
import org.apache.harmony.security.x501.Name;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with TBSCertificate structure which is the part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -64,11 +64,11 @@
public class TBSCertificate {
// the value of version field of the structure
- private final int version;
+ private final int version;
// the value of serialNumber field of the structure
private final BigInteger serialNumber;
// the value of signature field of the structure
- private final AlgorithmIdentifier signature;
+ private final AlgorithmIdentifier signature;
// the value of issuer field of the structure
private final Name issuer;
// the value of validity field of the structure
@@ -97,11 +97,11 @@
* @param subject : Name
* @param subjectPublicKeyInfo : SubjectPublicKeyInfo
*/
- public TBSCertificate(int version, BigInteger serialNumber,
+ public TBSCertificate(int version, BigInteger serialNumber,
AlgorithmIdentifier signature, Name issuer,
- Validity validity, Name subject,
+ Validity validity, Name subject,
SubjectPublicKeyInfo subjectPublicKeyInfo) {
- this(version, serialNumber, signature, issuer, validity, subject,
+ this(version, serialNumber, signature, issuer, validity, subject,
subjectPublicKeyInfo, null, null, null);
}
@@ -118,15 +118,15 @@
* @param subjectUniqueID: byte[]
* @param extensions: Extensions
*/
- public TBSCertificate(int version, BigInteger serialNumber,
+ public TBSCertificate(int version, BigInteger serialNumber,
AlgorithmIdentifier signature, Name issuer,
- Validity validity, Name subject,
+ Validity validity, Name subject,
SubjectPublicKeyInfo subjectPublicKeyInfo,
boolean[] issuerUniqueID, boolean[] subjectUniqueID,
Extensions extensions) {
- this.version = version;
+ this.version = version;
this.serialNumber = serialNumber;
- this.signature = signature;
+ this.signature = signature;
this.issuer = issuer;
this.validity = validity;
this.subject = subject;
@@ -135,8 +135,8 @@
this.subjectUniqueID = subjectUniqueID;
this.extensions = extensions;
}
-
- //
+
+ //
// TODO
// @param version: int
// @param serialNumber: BigInteger
@@ -149,18 +149,18 @@
// @param subjectUniqueID: byte[]
// @param extensions: Extensions
// @param encoding: byte[]
- //
- private TBSCertificate(int version, BigInteger serialNumber,
+ //
+ private TBSCertificate(int version, BigInteger serialNumber,
AlgorithmIdentifier signature, Name issuer,
- Validity validity, Name subject,
+ Validity validity, Name subject,
SubjectPublicKeyInfo subjectPublicKeyInfo,
boolean[] issuerUniqueID, boolean[] subjectUniqueID,
Extensions extensions, byte[] encoding) {
- this(version, serialNumber, signature, issuer, validity, subject,
+ this(version, serialNumber, signature, issuer, validity, subject,
subjectPublicKeyInfo, issuerUniqueID, subjectUniqueID, extensions);
this.encoding = encoding;
}
-
+
/**
* Returns the value of version field of the structure.
* @return version
@@ -176,7 +176,7 @@
public BigInteger getSerialNumber() {
return serialNumber;
}
-
+
/**
* Returns the value of signature field of the structure.
* @return signature
@@ -184,7 +184,7 @@
public AlgorithmIdentifier getSignature() {
return signature;
}
-
+
/**
* Returns the value of issuer field of the structure.
* @return issuer
@@ -192,7 +192,7 @@
public Name getIssuer() {
return issuer;
}
-
+
/**
* Returns the value of validity field of the structure.
* @return validity
@@ -200,7 +200,7 @@
public Validity getValidity() {
return validity;
}
-
+
/**
* Returns the value of subject field of the structure.
* @return subject
@@ -208,7 +208,7 @@
public Name getSubject() {
return subject;
}
-
+
/**
* Returns the value of subjectPublicKeyInfo field of the structure.
* @return subjectPublicKeyInfo
@@ -216,7 +216,7 @@
public SubjectPublicKeyInfo getSubjectPublicKeyInfo() {
return subjectPublicKeyInfo;
}
-
+
/**
* Returns the value of issuerUniqueID field of the structure.
* @return issuerUniqueID
@@ -224,7 +224,7 @@
public boolean[] getIssuerUniqueID() {
return issuerUniqueID;
}
-
+
/**
* Returns the value of subjectUniqueID field of the structure.
* @return subjectUniqueID
@@ -232,7 +232,7 @@
public boolean[] getSubjectUniqueID() {
return subjectUniqueID;
}
-
+
/**
* Returns the value of extensions field of the structure.
* @return extensions
@@ -257,51 +257,51 @@
*/
public void dumpValue(StringBuffer buffer) {
buffer.append('[');
- buffer.append("\n Version: V").append(version+1);
- buffer.append("\n Subject: ")
+ buffer.append("\n Version: V").append(version+1);
+ buffer.append("\n Subject: ")
.append(subject.getName(X500Principal.RFC2253));
- buffer.append("\n Signature Algorithm: ");
+ buffer.append("\n Signature Algorithm: ");
signature.dumpValue(buffer);
- buffer.append("\n Key: ");
+ buffer.append("\n Key: ");
buffer.append(subjectPublicKeyInfo.getPublicKey().toString());
- buffer.append("\n Validity: [From: ");
+ buffer.append("\n Validity: [From: ");
buffer.append(validity.getNotBefore());
- buffer.append("\n To: ");
+ buffer.append("\n To: ");
buffer.append(validity.getNotAfter()).append(']');
- buffer.append("\n Issuer: ");
+ buffer.append("\n Issuer: ");
buffer.append(issuer.getName(X500Principal.RFC2253));
- buffer.append("\n Serial Number: ");
+ buffer.append("\n Serial Number: ");
buffer.append(serialNumber);
if (issuerUniqueID != null) {
- buffer.append("\n Issuer Id: ");
+ buffer.append("\n Issuer Id: ");
for (int i=0; i<issuerUniqueID.length; i++) {
buffer.append(issuerUniqueID[i] ? '1' : '0');
}
}
if (subjectUniqueID != null) {
- buffer.append("\n Subject Id: ");
+ buffer.append("\n Subject Id: ");
for (int i=0; i<subjectUniqueID.length; i++) {
buffer.append(subjectUniqueID[i] ? '1' : '0');
}
}
if (extensions != null) {
- buffer.append("\n\n Extensions: ");
- buffer.append("[\n");
- extensions.dumpValue(buffer, " ");
- buffer.append(" ]");
+ buffer.append("\n\n Extensions: ");
+ buffer.append("[\n");
+ extensions.dumpValue(buffer, " ");
+ buffer.append(" ]");
}
- buffer.append("\n]");
+ buffer.append("\n]");
}
/**
* X.509 TBSCertificate encoder/decoder.
*/
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
- new ASN1Explicit(0, ASN1Integer.getInstance()), ASN1Integer.getInstance(),
+ new ASN1Explicit(0, ASN1Integer.getInstance()), ASN1Integer.getInstance(),
AlgorithmIdentifier.ASN1, Name.ASN1,
- Validity.ASN1, Name.ASN1, SubjectPublicKeyInfo.ASN1,
- new ASN1Implicit(1, ASN1BitString.getInstance()),
- new ASN1Implicit(2, ASN1BitString.getInstance()),
+ Validity.ASN1, Name.ASN1, SubjectPublicKeyInfo.ASN1,
+ new ASN1Implicit(1, ASN1BitString.getInstance()),
+ new ASN1Implicit(2, ASN1BitString.getInstance()),
new ASN1Explicit(3, Extensions.ASN1)}) {
{
setDefault(new byte[] {0}, 0);
@@ -313,18 +313,18 @@
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
- boolean[] issuerUniqueID = (values[7] == null)
+ boolean[] issuerUniqueID = (values[7] == null)
? null : ((BitString) values[7]).toBooleanArray();
- boolean[] subjectUniqueID = (values[8] == null)
+ boolean[] subjectUniqueID = (values[8] == null)
? null : ((BitString) values[8]).toBooleanArray();
return new TBSCertificate(
ASN1Integer.toIntValue(values[0]),
- new BigInteger((byte[]) values[1]),
+ new BigInteger((byte[]) values[1]),
(AlgorithmIdentifier) values[2],
- (Name) values[3],
- (Validity) values[4],
+ (Name) values[3],
+ (Validity) values[4],
(Name) values[5],
- (SubjectPublicKeyInfo) values[6],
+ (SubjectPublicKeyInfo) values[6],
issuerUniqueID,
subjectUniqueID,
(Extensions) values[9],
@@ -337,7 +337,7 @@
values[0] = ASN1Integer.fromIntValue(tbs.version);
values[1] = tbs.serialNumber.toByteArray();
values[2] = tbs.signature;
- values[3] = tbs.issuer;
+ values[3] = tbs.issuer;
values[4] = tbs.validity;
values[5] = tbs.subject;
values[6] = tbs.subjectPublicKeyInfo;
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Time.java b/luni/src/main/java/org/apache/harmony/security/x509/Time.java
index 912e014..b60711a 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Time.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Time.java
@@ -37,14 +37,14 @@
* <pre>
* Time ::= CHOICE {
* utcTime UTCTime,
- * generalTime GeneralizedTime
+ * generalTime GeneralizedTime
* }
* </pre>
*/
public class Time {
-
+
private static final long JAN_01_2050 = 2524608000000L;
-
+
public static final ASN1Choice ASN1 = new ASN1Choice(new ASN1Type[] {
ASN1GeneralizedTime.getInstance(), ASN1UTCTime.getInstance() }) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Utils.java b/luni/src/main/java/org/apache/harmony/security/x509/Utils.java
index 8c72710..99951a1 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Utils.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Utils.java
@@ -27,7 +27,7 @@
*/
public class Utils {
-
+
/**
* Checks if the string is PrintableString (see X.680)
* @param str input string
@@ -35,11 +35,11 @@
*/
public static boolean isPrintableString(String str) {
for (int i= 0; i< str.length(); ++i) {
- char ch= str.charAt(i);
- if (!(ch== 0x20
+ char ch= str.charAt(i);
+ if (!(ch== 0x20
|| ch>= 0x27 && ch<= 0x29 // '()
|| ch>= 0x2B && ch<= 0x3A // +,-./0-9:
- || ch== '='
+ || ch== '='
|| ch== '?'
|| ch>= 'A' && ch<= 'Z'
|| ch>= 'a' && ch<= 'z')) {
@@ -48,4 +48,4 @@
}
return true;
}
-}
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/Validity.java b/luni/src/main/java/org/apache/harmony/security/x509/Validity.java
index e5d9c19..c031817 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/Validity.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/Validity.java
@@ -29,7 +29,7 @@
import org.apache.harmony.security.asn1.BerInputStream;
/**
- * The class encapsulates the ASN.1 DER encoding/decoding work
+ * The class encapsulates the ASN.1 DER encoding/decoding work
* with Validity structure which is the part of X.509 certificate
* (as specified in RFC 3280 -
* Internet X.509 Public Key Infrastructure.
@@ -39,7 +39,7 @@
* <pre>
* Validity ::= SEQUENCE {
* notBefore Time,
- * notAfter Time
+ * notAfter Time
* }
* </pre>
*/
@@ -76,7 +76,7 @@
public Date getNotAfter() {
return notAfter;
}
-
+
/**
* Returns ASN.1 encoded form of this X.509 Validity value.
* @return a byte array containing ASN.1 encode form.
@@ -91,7 +91,7 @@
/**
* ASN.1 DER X.509 Validity encoder/decoder class.
*/
- public static final ASN1Sequence ASN1
+ public static final ASN1Sequence ASN1
= new ASN1Sequence(new ASN1Type[] {Time.ASN1, Time.ASN1 }) {
protected Object getDecodedObject(BerInputStream in) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/X509PublicKey.java b/luni/src/main/java/org/apache/harmony/security/x509/X509PublicKey.java
index b3fae57..08b19d5 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/X509PublicKey.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/X509PublicKey.java
@@ -50,7 +50,7 @@
StringBuilder buf = new StringBuilder("algorithm = ");
buf.append(algorithm);
buf.append(", params unparsed, unparsed keybits = \n");
- // TODO: implement compatible toString method()
+ // TODO: implement compatible toString method()
// buf.append(Arrays.toString(keyBytes));
return buf.toString();
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/MessageImprint.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/MessageImprint.java
index cf17ce1..789fdcf 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/MessageImprint.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/MessageImprint.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -28,33 +28,33 @@
/**
* As defined in Time-Stamp Protocol (TSP)
* (http://www.ietf.org/rfc/rfc3161.txt)
- *
+ *
* MessageImprint ::= SEQUENCE {
* hashAlgorithm AlgorithmIdentifier,
- * hashedMessage OCTET STRING
+ * hashedMessage OCTET STRING
* }
- *
+ *
*/
public class MessageImprint {
private final AlgorithmIdentifier algId;
private final byte [] hashedMessage;
-
+
public MessageImprint(AlgorithmIdentifier algId, byte [] hashedMessage){
this.algId = algId;
this.hashedMessage = hashedMessage;
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
AlgorithmIdentifier.ASN1,
ASN1OctetString.getInstance()}) {
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new MessageImprint(
(AlgorithmIdentifier)values[0],
(byte[])values[1]);
}
-
+
protected void getValues(Object object, Object[] values) {
MessageImprint mi = (MessageImprint) object;
values[0] = mi.algId;
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java
index 702513c..7a4489b 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIFailureInfo.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -27,7 +27,7 @@
Internet X.509 Public Key Infrastructure
Time-Stamp Protocol (TSP)
http://www.ietf.org/rfc/rfc3161.txt)
-
+
PKIFailureInfo ::= BIT STRING {
badAlg (0),
-- unrecognized or unsupported Algorithm Identifier
@@ -52,46 +52,46 @@
*/
public enum PKIFailureInfo {
/**
- * Unrecognized algorithm ID
+ * Unrecognized algorithm ID
*/
BAD_ALG(0),
-
+
/**
- * Transaction is not supported
+ * Transaction is not supported
*/
BAD_REQUEST(2),
-
+
/**
- * Data format is wrong
+ * Data format is wrong
*/
BAD_DATA_FORMAT(5),
-
+
/**
- * TSA cannot use the time source
+ * TSA cannot use the time source
*/
TIME_NOT_AVAILABLE(14),
-
+
/**
* The policy is not supported
*/
UNACCEPTED_POLICY(15),
-
+
/**
* The extension is not supported
*/
UNACCEPTED_EXTENSION(16),
-
+
/**
* The requested additional info is not available
*/
ADD_INFO_NOT_AVAILABLE(17),
-
+
/**
* System failure has occured
*/
SYSTEM_FAILURE(25);
-
+
private final int value;
private static int maxValue;
@@ -99,7 +99,7 @@
PKIFailureInfo(int value) {
this.value = value;
}
-
+
/**
* @return int value of the failure
*/
@@ -119,7 +119,7 @@
}
return maxValue;
}
-
+
/**
* @param value
* @return
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatus.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatus.java
index afe58b1..d97b3a3 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatus.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatus.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -27,7 +27,7 @@
Internet X.509 Public Key Infrastructure
Time-Stamp Protocol (TSP)
http://www.ietf.org/rfc/rfc3161.txt)
-
+
PKIStatus ::= INTEGER {
granted (0),
-- when the PKIStatus contains the value zero a TimeStampToken, as
@@ -44,11 +44,11 @@
-- notification that a revocation has occurred }
*/
public enum PKIStatus {
- /**
+ /**
* TimeStampToken is present as requested
*/
GRANTED(0),
- /**
+ /**
* TimeStampToken is present with modifications
*/
GRANTED_WITH_MODS(1),
@@ -60,7 +60,7 @@
* waiting
*/
WAITING(3),
- /**
+ /**
* revocation time comes soon
*/
REVOCATION_WARNING(4),
@@ -73,14 +73,14 @@
PKIStatus(int status) {
this.status = status;
}
-
+
/**
* @return int value of the status
*/
public int getStatus(){
return status;
}
-
+
public static PKIStatus getInstance(int status) {
for (PKIStatus curStatus : values()) {
if (status == curStatus.status) {
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java
index b0b75a6..2406d12 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/PKIStatusInfo.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -35,29 +35,29 @@
/**
* As defined in Time-Stamp Protocol (TSP)
* (http://www.ietf.org/rfc/rfc3161.txt)
- *
- * PKIStatusInfo ::= SEQUENCE {
- * status PKIStatus,
- * statusString PKIFreeText OPTIONAL,
+ *
+ * PKIStatusInfo ::= SEQUENCE {
+ * status PKIStatus,
+ * statusString PKIFreeText OPTIONAL,
* failInfo PKIFailureInfo OPTIONAL
* }
- *
+ *
*/
public class PKIStatusInfo {
private final PKIStatus status;
-
+
private final List statusString;
-
+
private final PKIFailureInfo failInfo;
-
+
public PKIStatusInfo(PKIStatus pKIStatus, List statusString,
PKIFailureInfo failInfo) {
this.status = pKIStatus;
this.statusString = statusString;
this.failInfo = failInfo;
}
-
+
public String toString(){
StringBuilder res = new StringBuilder();
res.append("-- PKIStatusInfo:");
@@ -70,7 +70,7 @@
res.append("\n-- PKIStatusInfo End\n");
return res.toString();
}
-
+
/**
* @return Returns the failInfo.
*/
@@ -91,7 +91,7 @@
public List getStatusString() {
return statusString;
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
ASN1Integer.getInstance(), // status
new ASN1SequenceOf(ASN1StringType.UTF8STRING), // statusString
@@ -100,7 +100,7 @@
setOptional(1);
setOptional(2);
}
-
+
protected void getValues(Object object, Object[] values) {
PKIStatusInfo psi = (PKIStatusInfo) object;
values[0] = BigInteger.valueOf(psi.status.getStatus())
@@ -116,10 +116,10 @@
values[2] = null;
}
}
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
-
+
int failInfoValue = -1;
if (values[2] != null) {
boolean[] failInfoBoolArray = ((BitString) values[2]).toBooleanArray();
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TSTInfo.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TSTInfo.java
index f2aa0ee..3a4db0e 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TSTInfo.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TSTInfo.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -37,9 +37,9 @@
import org.apache.harmony.security.x509.GeneralName;
/**
- * As defined in Time-Stamp Protocol (TSP)
+ * As defined in Time-Stamp Protocol (TSP)
* (http://www.ietf.org/rfc/rfc3161.txt)
- *
+ *
* TSTInfo ::= SEQUENCE {
* version INTEGER { v1(1) },
* policy TSAPolicyId,
@@ -58,33 +58,33 @@
* tsa [0] GeneralName OPTIONAL,
* extensions [1] IMPLICIT Extensions OPTIONAL
* }
- *
+ *
* TSAPolicyId ::= OBJECT IDENTIFIER
- *
- * "tsa [0] GeneralName OPTIONAL" is EXPLICIT and the word EXPLICIT is omitted.
+ *
+ * "tsa [0] GeneralName OPTIONAL" is EXPLICIT and the word EXPLICIT is omitted.
*/
public class TSTInfo {
-
+
private final int version;
-
+
private final String policy;
-
+
private final MessageImprint messageImprint;
-
+
private final BigInteger serialNumber;
-
+
private final Date genTime;
-
+
private final int [] accuracy;
-
+
private final Boolean ordering;
-
+
private final BigInteger nonce;
-
+
private final GeneralName tsa;
-
+
private final Extensions extensions;
-
+
public TSTInfo(int version, String policy, MessageImprint messageImprint,
BigInteger serialNumber, Date genTime, int[] accuracy,
Boolean ordering, BigInteger nonce, GeneralName tsa,
@@ -100,7 +100,7 @@
this.tsa = tsa;
this.extensions = extensions;
}
-
+
public String toString() {
StringBuilder res = new StringBuilder();
res.append("-- TSTInfo:");
@@ -218,10 +218,10 @@
setOptional(1);
setOptional(2);
}
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
-
+
int [] accuracy = new int [3];
for (int i = 0; i < 3; i++) {
if (values[i] != null) {
@@ -235,7 +235,7 @@
}
return accuracy;
}
-
+
protected void getValues(Object object, Object[] values) {
int [] accuracy = (int []) object;
for (int i = 0; i < 3; i++) {
@@ -248,15 +248,15 @@
}
}
};
-
- public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
+
+ public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
ASN1Integer.getInstance(), // version
ASN1Oid.getInstance(), // policy
MessageImprint.ASN1, // messageImprint
ASN1Integer.getInstance(), // serialNumber
ASN1GeneralizedTime.getInstance(), // genTime
ACCURACY, // accuracy
- ASN1Boolean.getInstance(), // ordering
+ ASN1Boolean.getInstance(), // ordering
ASN1Integer.getInstance(), // nonce
new ASN1Explicit(0, GeneralName.ASN1), // tsa
new ASN1Implicit(1, Extensions.ASN1) }) {// extensions
@@ -270,10 +270,10 @@
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
-
+
BigInteger nonce = (values[7] == null) ? null : new BigInteger(
(byte[]) values[7]);
-
+
return new TSTInfo(
ASN1Integer.toIntValue(values[0]),
ObjectIdentifier.toString((int[]) values[1]),
@@ -289,7 +289,7 @@
protected void getValues(Object object, Object[] values) {
TSTInfo info = (TSTInfo) object;
-
+
values[0] = ASN1Integer.fromIntValue(info.version);
values[1] = ObjectIdentifier.toIntArray(info.policy);
values[2] = info.messageImprint;
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampReq.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampReq.java
index 5e4e6ff..24e3c22 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampReq.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampReq.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -34,7 +34,7 @@
/**
* As defined in Time-Stamp Protocol (TSP)
* (http://www.ietf.org/rfc/rfc3161.txt)
- *
+ *
* TimeStampReq ::= SEQUENCE {
* version INTEGER { v1(1) },
* messageImprint MessageImprint,
@@ -43,9 +43,9 @@
* reqPolicy TSAPolicyId OPTIONAL,
* nonce INTEGER OPTIONAL,
* certReq BOOLEAN DEFAULT FALSE,
- * extensions [0] IMPLICIT Extensions OPTIONAL
+ * extensions [0] IMPLICIT Extensions OPTIONAL
* }
- *
+ *
* TSAPolicyId ::= OBJECT IDENTIFIER
*/
public class TimeStampReq {
@@ -60,7 +60,7 @@
private final Boolean certReq;
private final Extensions extensions;
-
+
private byte [] encoding;
public TimeStampReq(int version, MessageImprint messageImprint,
@@ -151,31 +151,31 @@
*/
public int getVersion() {
return version;
- }
-
+ }
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
ASN1Integer.getInstance(), // version
- MessageImprint.ASN1, // messageImprint
+ MessageImprint.ASN1, // messageImprint
ASN1Oid.getInstance(), // reqPolicy
ASN1Integer.getInstance(), // nonce
ASN1Boolean.getInstance(), // certReq
new ASN1Implicit(0, Extensions.ASN1)}) {// extensions
-
+
{
setDefault(Boolean.FALSE, 4);
setOptional(2);
setOptional(3);
setOptional(5);
}
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
-
+
String objID = (values[2] == null) ? null : ObjectIdentifier
.toString((int[]) values[2]);
BigInteger nonce = (values[3] == null) ? null : new BigInteger(
(byte[]) values[3]);
-
+
if (values[5] == null) {
return new TimeStampReq(
ASN1Integer.toIntValue(values[0]),
@@ -198,7 +198,7 @@
);
}
}
-
+
protected void getValues(Object object, Object[] values) {
TimeStampReq req = (TimeStampReq) object;
values[0] = ASN1Integer.fromIntValue(req.version);
diff --git a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampResp.java b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampResp.java
index af03ea5..63270fe 100644
--- a/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampResp.java
+++ b/luni/src/main/java/org/apache/harmony/security/x509/tsp/TimeStampResp.java
@@ -14,7 +14,7 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
*/
package org.apache.harmony.security.x509.tsp;
@@ -27,24 +27,24 @@
/**
* As defined in Time-Stamp Protocol (TSP)
* (http://www.ietf.org/rfc/rfc3161.txt)
- *
- * TimeStampResp ::= SEQUENCE {
- * status PKIStatusInfo,
- * timeStampToken TimeStampToken OPTIONAL
+ *
+ * TimeStampResp ::= SEQUENCE {
+ * status PKIStatusInfo,
+ * timeStampToken TimeStampToken OPTIONAL
* }
- *
+ *
*/
public class TimeStampResp {
private final PKIStatusInfo status;
private final ContentInfo timeStampToken;
-
+
public TimeStampResp(PKIStatusInfo status, ContentInfo timeStampToken) {
this.status = status;
this.timeStampToken = timeStampToken;
}
-
+
public String toString(){
StringBuilder res = new StringBuilder();
res.append("-- TimeStampResp:");
@@ -55,7 +55,7 @@
res.append("\n-- TimeStampResp End\n");
return res.toString();
}
-
+
/**
* @return Returns the status.
*/
@@ -69,28 +69,28 @@
public ContentInfo getTimeStampToken() {
return timeStampToken;
}
-
+
public static final ASN1Sequence ASN1 = new ASN1Sequence(new ASN1Type[] {
PKIStatusInfo.ASN1, // status
ContentInfo.ASN1}) { // timeStampToken
-
+
{
setOptional(1);
}
-
+
protected Object getDecodedObject(BerInputStream in) {
Object[] values = (Object[]) in.content;
return new TimeStampResp(
(PKIStatusInfo) values[0],
(ContentInfo) values[1]);
}
-
+
protected void getValues(Object object, Object[] values) {
TimeStampResp resp = (TimeStampResp) object;
-
+
values[0] = resp.status;
values[1] = resp.timeStampToken;
- }
+ }
};
}
diff --git a/luni/src/main/java/org/apache/harmony/text/BidiRun.java b/luni/src/main/java/org/apache/harmony/text/BidiRun.java
index d1033f4..8cbe8d1 100644
--- a/luni/src/main/java/org/apache/harmony/text/BidiRun.java
+++ b/luni/src/main/java/org/apache/harmony/text/BidiRun.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/text/BidiWrapper.java b/luni/src/main/java/org/apache/harmony/text/BidiWrapper.java
index f9dc8da..bc88280 100644
--- a/luni/src/main/java/org/apache/harmony/text/BidiWrapper.java
+++ b/luni/src/main/java/org/apache/harmony/text/BidiWrapper.java
@@ -1,13 +1,13 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
diff --git a/luni/src/main/java/org/apache/harmony/xml/ExpatParser.java b/luni/src/main/java/org/apache/harmony/xml/ExpatParser.java
index be933ca..44a0e47 100644
--- a/luni/src/main/java/org/apache/harmony/xml/ExpatParser.java
+++ b/luni/src/main/java/org/apache/harmony/xml/ExpatParser.java
@@ -224,7 +224,7 @@
ContentHandler contentHandler = xmlReader.contentHandler;
if (contentHandler != null) {
contentHandler.processingInstruction(target, data);
- }
+ }
}
/*package*/ void notationDecl(String name, String publicId, String systemId) throws SAXException {
@@ -340,7 +340,7 @@
* Expat complains if the external entity isn't wrapped with a root
* element so we add one and ignore it later on during parsing.
*/
-
+
// Try the character stream.
Reader reader = inputSource.getCharacterStream();
if (reader != null) {
@@ -743,7 +743,7 @@
+ column + ": " + message;
}
}
-
+
/**
* Opens an InputStream for the given URL.
*/
@@ -767,7 +767,7 @@
*/
private static class EntityParser extends ExpatParser {
- private int depth = 0;
+ private int depth = 0;
private EntityParser(String encoding, ExpatReader xmlReader,
int pointer, String publicId, String systemId) {
@@ -786,7 +786,7 @@
attributeCount);
}
}
-
+
@Override
void endElement(String uri, String localName, String qName)
throws SAXException {
diff --git a/luni/src/main/java/org/apache/harmony/xml/ExpatPullParser.java b/luni/src/main/java/org/apache/harmony/xml/ExpatPullParser.java
index 4759718..8696511 100644
--- a/luni/src/main/java/org/apache/harmony/xml/ExpatPullParser.java
+++ b/luni/src/main/java/org/apache/harmony/xml/ExpatPullParser.java
@@ -55,7 +55,7 @@
public void setFeature(String name, boolean state)
throws XmlPullParserException {
if (name == null) {
- // Required by API.
+ // Required by API.
throw new IllegalArgumentException("Null feature name");
}
@@ -392,7 +392,7 @@
// This node has an index of -1 since the actual first node in the
// stack has index 0.
this.index = -1;
-
+
// The actual first node will have a depth of 1.
this.depth = 0;
}
@@ -453,7 +453,7 @@
while (depth < node.depth) {
node = node.parent;
}
- return node.index + 1;
+ return node.index + 1;
}
/** Builds a NamespaceStack. */
@@ -500,7 +500,7 @@
/** The namespace stack at the time of this event. */
final NamespaceStack namespaceStack;
- /** Next event in the queue. */
+ /** Next event in the queue. */
Event next = null;
Event(int depth, NamespaceStack namespaceStack) {
@@ -734,7 +734,7 @@
/** Namespace stack builder. */
NamespaceStack.Builder namespaceStackBuilder
= new NamespaceStack.Builder();
-
+
Event currentEvent = new StartDocumentEvent();
Event last = currentEvent;
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/AttrImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/AttrImpl.java
index c601de6..fb98212 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/AttrImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/AttrImpl.java
@@ -56,12 +56,12 @@
super(document);
this.namespaceAware = false;
-
+
int prefixSeparator = name.lastIndexOf(":");
if (prefixSeparator != -1) {
String prefix = name.substring(0, prefixSeparator);
String localName = name.substring(prefixSeparator + 1);
-
+
if (!DocumentImpl.isXMLIdentifier(prefix) || !DocumentImpl.isXMLIdentifier(localName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, name);
}
@@ -70,7 +70,7 @@
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, name);
}
}
-
+
this.localName = name;
}
@@ -125,7 +125,7 @@
public void setPrefix(String prefix) {
this.prefix = validatePrefix(prefix, namespaceAware, namespaceURI);
}
-
+
public void setValue(String value) throws DOMException {
this.value = value;
}
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java
index 7d122f2..c7cd8a9 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java
@@ -53,7 +53,7 @@
if (!needsSplitting()) {
return;
}
-
+
Node parent = getParentNode();
String[] parts = getData().split("\\]\\]>");
parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this);
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/DOMImplementationImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/DOMImplementationImpl.java
index 3106c3f..e852e6c 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/DOMImplementationImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/DOMImplementationImpl.java
@@ -73,7 +73,7 @@
/**
* Requests the singleton instance of the class. Creates it first, if
* necessary.
- *
+ *
* @return The singleton Android DOMImplementationImpl instance.
*/
public static DOMImplementationImpl getInstance() {
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/DocumentImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/DocumentImpl.java
index 56283a8..4c2aea6 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/DocumentImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/DocumentImpl.java
@@ -104,17 +104,17 @@
if (s.length() == 0) {
return false;
}
-
+
if (!isXMLIdentifierStart(s.charAt(0))) {
return false;
}
-
+
for (int i = 1; i < s.length(); i++) {
if (!isXMLIdentifierPart(s.charAt(i))) {
return false;
}
}
-
+
return true;
}
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/DocumentTypeImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/DocumentTypeImpl.java
index b0e8eda..d9b903f 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/DocumentTypeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/DocumentTypeImpl.java
@@ -46,12 +46,12 @@
if (qualifiedName == null || "".equals(qualifiedName)) {
throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName);
}
-
+
int prefixSeparator = qualifiedName.lastIndexOf(":");
if (prefixSeparator != -1) {
String prefix = qualifiedName.substring(0, prefixSeparator);
String localName = qualifiedName.substring(prefixSeparator + 1);
-
+
if (!DocumentImpl.isXMLIdentifier(prefix)) {
throw new DOMException(DOMException.NAMESPACE_ERR, qualifiedName);
}
@@ -64,7 +64,7 @@
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, qualifiedName);
}
}
-
+
this.qualifiedName = qualifiedName;
this.publicId = publicId;
this.systemId = systemId;
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/ElementImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/ElementImpl.java
index cbc4570..6e11afa 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/ElementImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/ElementImpl.java
@@ -55,12 +55,12 @@
super(document);
this.namespaceAware = false;
-
+
int p = name.lastIndexOf(":");
if (p != -1) {
String prefix = name.substring(0, p);
String localName = name.substring(p + 1);
-
+
if (!DocumentImpl.isXMLIdentifier(prefix) || !DocumentImpl.isXMLIdentifier(localName)) {
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, name);
}
@@ -69,7 +69,7 @@
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, name);
}
}
-
+
this.localName = name;
}
@@ -80,10 +80,10 @@
return i;
}
}
-
+
return -1;
}
-
+
private int indexOfAttributeNS(String namespaceURI, String localName) {
for (int i = 0; i < attributes.size(); i++) {
AttrImpl attr = attributes.get(i);
@@ -91,10 +91,10 @@
return i;
}
}
-
+
return -1;
}
-
+
public String getAttribute(String name) {
Attr attr = getAttributeNode(name);
@@ -117,21 +117,21 @@
public AttrImpl getAttributeNode(String name) {
int i = indexOfAttribute(name);
-
+
if (i == -1) {
return null;
}
-
+
return attributes.get(i);
}
public AttrImpl getAttributeNodeNS(String namespaceURI, String localName) {
int i = indexOfAttributeNS(namespaceURI, localName);
-
+
if (i == -1) {
return null;
}
-
+
return attributes.get(i);
}
@@ -203,7 +203,7 @@
if (matchesNameNS(namespaceURI, localName, true)) {
list.add(this);
}
-
+
for (NodeImpl node : children) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
((ElementImpl) node).getElementsByTagNameNS(list, namespaceURI,
@@ -257,7 +257,7 @@
public void removeAttribute(String name) throws DOMException {
int i = indexOfAttribute(name);
-
+
if (i != -1) {
attributes.remove(i);
}
@@ -266,7 +266,7 @@
public void removeAttributeNS(String namespaceURI, String localName)
throws DOMException {
int i = indexOfAttributeNS(namespaceURI, localName);
-
+
if (i != -1) {
attributes.remove(i);
}
@@ -310,7 +310,7 @@
public Attr setAttributeNode(Attr newAttr) throws DOMException {
AttrImpl newAttrImpl = (AttrImpl) newAttr;
-
+
if (newAttrImpl.document != this.document) {
throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, null);
}
@@ -320,13 +320,13 @@
}
AttrImpl oldAttrImpl = null;
-
+
int i = indexOfAttribute(newAttr.getName());
if (i != -1) {
oldAttrImpl = attributes.get(i);
attributes.remove(i);
}
-
+
attributes.add(newAttrImpl);
newAttrImpl.ownerElement = this;
@@ -345,13 +345,13 @@
}
AttrImpl oldAttrImpl = null;
-
+
int i = indexOfAttributeNS(newAttr.getNamespaceURI(), newAttr.getLocalName());
if (i != -1) {
oldAttrImpl = attributes.get(i);
attributes.remove(i);
}
-
+
attributes.add(newAttrImpl);
newAttrImpl.ownerElement = this;
@@ -372,7 +372,7 @@
private int indexOfItem(String name) {
return ElementImpl.this.indexOfAttribute(name);
}
-
+
private int indexOfItemNS(String namespaceURI, String localName) {
return ElementImpl.this.indexOfAttributeNS(namespaceURI, localName);
}
@@ -391,7 +391,7 @@
public Node removeNamedItem(String name) throws DOMException {
int i = indexOfItem(name);
-
+
if (i == -1) {
throw new DOMException(DOMException.NOT_FOUND_ERR, null);
}
@@ -402,7 +402,7 @@
public Node removeNamedItemNS(String namespaceURI, String localName)
throws DOMException {
int i = indexOfItemNS(namespaceURI, localName);
-
+
if (i == -1) {
throw new DOMException(DOMException.NOT_FOUND_ERR, null);
}
@@ -422,7 +422,7 @@
if (!(arg instanceof Attr)) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
}
-
+
return ElementImpl.this.setAttributeNodeNS((Attr)arg);
}
}
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java
index bd4affb..8d2276b 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/InnerNodeImpl.java
@@ -100,12 +100,12 @@
* node is already child of another node, it is first removed from there.
* This method is the generalization of the appendChild() and insertBefore()
* methods.
- *
+ *
* @param newChild The new child node to add.
* @param index The index at which to insert the new child node.
- *
+ *
* @return The node added.
- *
+ *
* @throws DOMException If the attempted operation violates the XML/DOM
* well-formedness rules.
*/
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/NamedNodeMapImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/NamedNodeMapImpl.java
index 6eb8efa..c561d38 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/NamedNodeMapImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/NamedNodeMapImpl.java
@@ -37,7 +37,7 @@
public class NamedNodeMapImpl implements NamedNodeMap {
private Class<?> type;
-
+
private List<NodeImpl> list;
NamedNodeMapImpl(Class<?> type) {
@@ -61,10 +61,10 @@
return i;
}
}
-
+
return -1;
}
-
+
private int indexOfItemNS(String namespaceURI, String localName) {
for (int i = 0; i < list.size(); i++) {
NodeImpl node = list.get(i);
@@ -72,19 +72,19 @@
return i;
}
}
-
+
return -1;
}
public Node getNamedItem(String name) {
int i = indexOfItem(name);
-
+
return (i == -1 ? null : item(i));
}
public Node getNamedItemNS(String namespaceURI, String localName) {
int i = indexOfItemNS(namespaceURI, localName);
-
+
return (i == -1 ? null : item(i));
}
@@ -94,7 +94,7 @@
public Node removeNamedItem(String name) throws DOMException {
int i = indexOfItem(name);
-
+
if (i == -1) {
throw new DOMException(DOMException.NOT_FOUND_ERR, null);
}
@@ -105,7 +105,7 @@
public Node removeNamedItemNS(String namespaceURI, String localName)
throws DOMException {
int i = indexOfItemNS(namespaceURI, localName);
-
+
if (i == -1) {
throw new DOMException(DOMException.NOT_FOUND_ERR, null);
}
@@ -118,7 +118,7 @@
if (!type.isAssignableFrom(arg.getClass())) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
}
-
+
// All nodes in the map must belong to the same document.
if (list.size() != 0) {
Document document = list.get(0).document;
@@ -134,11 +134,11 @@
// }
int i = indexOfItem(arg.getNodeName());
-
+
if (i != -1) {
list.remove(i);
}
-
+
list.add((NodeImpl)arg);
return arg;
}
@@ -148,7 +148,7 @@
if (!type.isAssignableFrom(arg.getClass())) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, null);
}
-
+
// All nodes in the map must belong to the same document.
if (list.size() != 0) {
Document document = list.get(0).document;
@@ -164,11 +164,11 @@
// }
int i = indexOfItemNS(arg.getNamespaceURI(), arg.getLocalName());
-
+
if (i != -1) {
list.remove(i);
}
-
+
list.add((NodeImpl)arg);
return arg;
}
diff --git a/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java b/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
index 8beb18c..230dd2a 100644
--- a/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/dom/NodeImpl.java
@@ -271,7 +271,7 @@
* Checks whether a required string matches an actual string. This utility
* method is used for comparing namespaces and such. It takes into account
* null arguments and the "*" special case.
- *
+ *
* @param required The required string.
* @param actual The actual string.
* @return True if and only if the actual string matches the required one.
@@ -280,18 +280,18 @@
if (wildcard && "*".equals(required)) {
return true;
}
-
+
if (required == null) {
return (actual == null);
}
-
+
return required.equals(actual);
}
/**
* Checks whether this node's name matches a required name. It takes into
* account null arguments and the "*" special case.
- *
+ *
* @param name The required name.
* @return True if and only if the actual name matches the required one.
*/
@@ -678,7 +678,7 @@
throw new AssertionError(); // unexpected type
}
}
-
+
return true;
}
diff --git a/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java b/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
index 5cdba97..8efaa30 100644
--- a/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderFactoryImpl.java
@@ -33,7 +33,7 @@
private static final String VALIDATION =
"http://xml.org/sax/features/validation";
-
+
@Override
public Object getAttribute(String name) throws IllegalArgumentException {
throw new IllegalArgumentException(name);
@@ -44,7 +44,7 @@
if (name == null) {
throw new NullPointerException();
}
-
+
if (NAMESPACES.equals(name)) {
return isNamespaceAware();
} else if (VALIDATION.equals(name)) {
@@ -61,13 +61,13 @@
throw new ParserConfigurationException(
"No validating DocumentBuilder implementation available");
}
-
+
/**
* TODO If Android is going to support a different DocumentBuilder
* implementations, this should be wired here. If we wanted to
* allow different implementations, these could be distinguished by
* a special feature (like http://www.org.apache.harmony.com/xml/expat)
- * or by throwing the full SPI monty at it.
+ * or by throwing the full SPI monty at it.
*/
DocumentBuilderImpl builder = new DocumentBuilderImpl();
builder.setCoalescing(isCoalescing());
@@ -76,10 +76,10 @@
builder.setNamespaceAware(isNamespaceAware());
// TODO What about expandEntityReferences?
-
+
return builder;
}
-
+
@Override
public void setAttribute(String name, Object value)
throws IllegalArgumentException {
diff --git a/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderImpl.java b/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderImpl.java
index 31384a0..267099f 100644
--- a/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/parsers/DocumentBuilderImpl.java
@@ -98,7 +98,7 @@
if (source == null) {
throw new IllegalArgumentException();
}
-
+
String namespaceURI = null;
String qualifiedName = null;
DocumentType doctype = null;
@@ -143,7 +143,7 @@
if(ex.getDetail() instanceof RuntimeException) {
throw (RuntimeException)ex.getDetail();
}
-
+
LocatorImpl locator = new LocatorImpl();
locator.setPublicId(source.getPublicId());
@@ -171,13 +171,13 @@
* approach to parsing does accept some illegal documents (more than one
* root element, for example). The assumption is that the DOM implementation
* throws the proper exceptions in these cases.
- *
+ *
* @param parser The XML pull parser we're reading from.
* @param document The document we're building.
* @param node The node we're currently on (initially the document itself).
* @param endToken The token that will end this recursive call. Either
* XmlPullParser.END_DOCUMENT or XmlPullParser.END_TAG.
- *
+ *
* @throws XmlPullParserException If a parsing error occurs.
* @throws IOException If a general IO error occurs.
*/
@@ -219,10 +219,10 @@
String name = tokenizer.nextToken();
String pubid = null;
String sysid = null;
-
+
if (tokenizer.hasMoreTokens()) {
String text = tokenizer.nextToken();
-
+
if ("SYSTEM".equals(text)) {
if (tokenizer.hasMoreTokens()) {
sysid = tokenizer.nextToken();
@@ -236,18 +236,18 @@
}
}
}
-
+
if (pubid != null && pubid.length() >= 2 && pubid.startsWith("\"") && pubid.endsWith("\"")) {
pubid = pubid.substring(1, pubid.length() - 1);
}
-
+
if (sysid != null && sysid.length() >= 2 && sysid.startsWith("\"") && sysid.endsWith("\"")) {
sysid = sysid.substring(1, sysid.length() - 1);
}
document.appendChild(new DocumentTypeImpl(document, name, pubid, sysid));
}
-
+
} else if (token == XmlPullParser.COMMENT) {
/*
* Found a comment. We simply take the token text, but we only
@@ -308,7 +308,7 @@
if ("".equals(namespace)) {
namespace = null;
}
-
+
// Create element node and wire it correctly
Element element = document.createElementNS(namespace, name);
element.setPrefix(prefix);
@@ -324,21 +324,21 @@
if ("".equals(attrNamespace)) {
attrNamespace = null;
}
-
+
// Create attribute node and wire it correctly
Attr attr = document.createAttributeNS(attrNamespace, attrName);
attr.setPrefix(attrPrefix);
attr.setValue(attrValue);
element.setAttributeNodeNS(attr);
}
-
+
// Recursive descent
token = parser.nextToken();
parse(parser, document, element, XmlPullParser.END_TAG);
// Expect the element's end tag here
parser.require(XmlPullParser.END_TAG, namespace, name);
-
+
} else {
// Collect info for element node
String name = parser.getName();
@@ -374,7 +374,7 @@
/**
* @param token the XML pull parser token type, such as XmlPullParser.CDSECT
* or XmlPullParser.ENTITY_REF.
- */
+ */
private void appendText(DocumentImpl document, Node parent, int token, String text) {
// Ignore empty runs.
if (text.length() == 0) {
@@ -407,7 +407,7 @@
/**
* Controls whether this DocumentBuilder ignores comments.
- *
+ *
* @param value Turns comment ignorance on or off.
*/
public void setIgnoreComments(boolean value) {
@@ -420,7 +420,7 @@
/**
* Controls whether this DocumentBuilder ignores element content whitespace.
- *
+ *
* @param value Turns element whitespace content ignorance on or off.
*/
public void setIgnoreElementContentWhitespace(boolean value) {
@@ -429,7 +429,7 @@
/**
* Controls whether this DocumentBuilder is namespace-aware.
- *
+ *
* @param value Turns namespace awareness on or off.
*/
public void setNamespaceAware(boolean value) {
@@ -438,10 +438,10 @@
/**
* Resolves predefined XML character or entity references.
- *
+ *
* @param entity The reference to resolve, not including
* the ampersand or the semicolon.
- *
+ *
* @return The proper replacement, or null, if the entity is unknown.
*/
private String resolveStandardEntity(String entity) {
diff --git a/luni/src/main/java/org/apache/harmony/xml/parsers/SAXParserFactoryImpl.java b/luni/src/main/java/org/apache/harmony/xml/parsers/SAXParserFactoryImpl.java
index 6846216..3317f39 100644
--- a/luni/src/main/java/org/apache/harmony/xml/parsers/SAXParserFactoryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xml/parsers/SAXParserFactoryImpl.java
@@ -34,10 +34,10 @@
private static final String NAMESPACES
= "http://xml.org/sax/features/namespaces";
-
+
private static final String VALIDATION
= "http://xml.org/sax/features/validation";
-
+
private Map<String, Boolean> features = new HashMap<String, Boolean>();
@Override
@@ -45,11 +45,11 @@
if (name == null) {
throw new NullPointerException();
}
-
+
if (!name.startsWith("http://xml.org/sax/features/")) {
throw new SAXNotRecognizedException(name);
}
-
+
return Boolean.TRUE.equals(features.get(name));
}
@@ -77,7 +77,7 @@
throw new ParserConfigurationException(
"No validating SAXParser implementation available");
}
-
+
try {
return new SAXParserImpl(features);
} catch (Exception ex) {
@@ -90,11 +90,11 @@
if (name == null) {
throw new NullPointerException();
}
-
+
if (!name.startsWith("http://xml.org/sax/features/")) {
throw new SAXNotRecognizedException(name);
}
-
+
if (value) {
features.put(name, Boolean.TRUE);
} else {
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AlertException.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AlertException.java
index f607364..fdc1cd9 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AlertException.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/AlertException.java
@@ -33,7 +33,7 @@
/**
* Constructs the instance.
- *
+ *
* @param description The alert description code from {@link AlertProtocol}
* @param reason The SSLException to be thrown to application side after alert processing
* (sending the record with alert, shutdown work, etc).
@@ -47,7 +47,7 @@
/**
* Returns the reason of alert. This reason should be rethrown after alert processing.
- *
+ *
* @return the reason of alert.
*/
protected SSLException getReason() {
@@ -56,7 +56,7 @@
/**
* Returns alert's description code.
- *
+ *
* @return alert description code from {@link AlertProtocol}
* @see AlertProtocol for more information about possible reason codes.
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Appendable.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Appendable.java
index 070f42a..098b60c 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Appendable.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Appendable.java
@@ -25,7 +25,7 @@
/**
* Provides the additional data to be read.
- *
+ *
* @param src the source data to be appended.
*/
public void append(byte[] src);
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateMessage.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateMessage.java
index 8065860..a8a5ac8 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateMessage.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateMessage.java
@@ -34,7 +34,7 @@
* Represents server/client certificate message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS
* 1.0 spec., 7.4.2. Server certificate; 7.4.6. Client certificate</a>
- *
+ *
*/
public class CertificateMessage extends Message {
@@ -50,7 +50,7 @@
/**
* Creates inbound message
- *
+ *
* @param in
* @param length
* @throws IOException
@@ -103,7 +103,7 @@
/**
* Creates outbound message
- *
+ *
* @param certs
*/
public CertificateMessage(X509Certificate[] certs) {
@@ -133,7 +133,7 @@
/**
* Sends message
- *
+ *
* @param out
*/
@Override
@@ -165,7 +165,7 @@
/**
* Returns message type
- *
+ *
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java
index 7246c4d..55459da 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateRequest.java
@@ -29,7 +29,7 @@
import javax.security.auth.x500.X500Principal;
/**
- *
+ *
* Represents certificate request message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.4.
* Certificate request</a>
@@ -37,7 +37,7 @@
public class CertificateRequest extends Message {
/**
- * Client certificate types as defined in
+ * Client certificate types as defined in
* TLS 1.0 spec., 7.4.4. Certificate request
*/
public static final byte RSA_SIGN = 1;
@@ -64,7 +64,7 @@
/**
* Creates outbound message
- *
+ *
* @param certificate_types
* @param accepted - array of certificate authority certificates
*/
@@ -76,7 +76,7 @@
"CertificateRequest: array of certificate authority certificates is null");
}
this.certificate_types = certificate_types;
-
+
int totalPrincipalsLength = 0;
certificate_authorities = new X500Principal[accepted.length];
encoded_principals = new byte[accepted.length][];
@@ -91,7 +91,7 @@
/**
* Creates inbound message
- *
+ *
* @param in
* @param length
* @throws IOException
@@ -106,7 +106,7 @@
int totalPrincipalsLength = 0;
int principalLength = 0;
Vector<X500Principal> principals = new Vector<X500Principal>();
- while (totalPrincipalsLength < size) {
+ while (totalPrincipalsLength < size) {
principalLength = in.readUint16(); // encoded X500Principal size
principals.add(new X500Principal(in));
totalPrincipalsLength += 2;
@@ -126,7 +126,7 @@
/**
* Sends message
- *
+ *
* @param out
*/
@Override
@@ -149,7 +149,7 @@
/**
* Returns message type
- *
+ *
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateVerify.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateVerify.java
index 9b18ecb..0547838 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateVerify.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CertificateVerify.java
@@ -38,7 +38,7 @@
/**
* Creates outbound message
- *
+ *
* @param hash
*/
public CertificateVerify(byte[] hash) {
@@ -52,7 +52,7 @@
/**
* Creates inbound message
- *
+ *
* @param in
* @param length
* @throws IOException
@@ -74,7 +74,7 @@
/**
* Sends message
- *
+ *
* @param out
*/
@Override
@@ -87,7 +87,7 @@
/**
* Returns message type
- *
+ *
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
index f084195..559bfc4 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
@@ -23,17 +23,17 @@
import javax.crypto.Cipher;
/**
- * Represents Cipher Suite as defined in TLS 1.0 spec.,
+ * Represents Cipher Suite as defined in TLS 1.0 spec.,
* A.5. The CipherSuite;
* C. CipherSuite definitions.
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec.</a>
- *
+ *
*/
public class CipherSuite {
/**
* true if this cipher suite is supported
- */
+ */
boolean supported = true;
/**
@@ -45,7 +45,7 @@
* cipher
*/
final String cipherName;
-
+
/**
* Cipher information
*/
@@ -54,22 +54,22 @@
final int effectiveKeyBytes;
final int IVSize;
final private int blockSize;
-
+
// cipher suite code
private final byte[] cipherSuiteCode;
// cipher suite name
private final String name;
-
+
// true if cipher suite is exportable
private final boolean isExportable;
// Hash algorithm
final private String hashName;
-
+
// MAC algorithm
final private String hmacName;
-
+
// Hash size
final private int hashSize;
@@ -240,7 +240,7 @@
"3DES_EDE_CBC", "SHA", code_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA);
// array for quick access to cipher suite by code
- private static CipherSuite[] cuitesByCode = {
+ private static CipherSuite[] cuitesByCode = {
TLS_NULL_WITH_NULL_NULL,
TLS_RSA_WITH_NULL_MD5,
TLS_RSA_WITH_NULL_SHA,
@@ -271,14 +271,14 @@
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA
};
- // hash for quick access to cipher suite by name
+ // hash for quick access to cipher suite by name
private static Hashtable<String, CipherSuite> cuitesByName;
/**
* array of supported cipher suites.
- * Set of supported suites is defined at the moment provider's start
+ * Set of supported suites is defined at the moment provider's start
*/
-// TODO Dynamically supported suites: new providers may be dynamically
+// TODO Dynamically supported suites: new providers may be dynamically
// added/removed and the set of supported suites may be changed
static CipherSuite[] supportedCipherSuites;
@@ -291,7 +291,7 @@
* default cipher suites
*/
static CipherSuite[] defaultCipherSuites;
-
+
static {
int count = 0;
cuitesByName = new Hashtable<String, CipherSuite>();
@@ -312,7 +312,7 @@
}
}
- CipherSuite[] defaultPretendent = {
+ CipherSuite[] defaultPretendent = {
TLS_RSA_WITH_RC4_128_MD5,
TLS_RSA_WITH_RC4_128_SHA,
// TLS_RSA_WITH_AES_128_CBC_SHA,
@@ -325,7 +325,7 @@
TLS_RSA_EXPORT_WITH_RC4_40_MD5,
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
- TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
+ TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
};
count = 0;
for (int i = 0; i < defaultPretendent.length; i++) {
@@ -370,7 +370,7 @@
/**
* Returns CipherSuite based on V2CipherSpec code
* as described in TLS 1.0 spec., E. Backward Compatibility With SSL
- *
+ *
* @param b1
* @param b2
* @param b3
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
index 34252f0..cec1208 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHandshakeImpl.java
@@ -46,30 +46,30 @@
* Client side handshake protocol implementation.
* Handshake protocol operates on top of the Record Protocol.
* It is responsible for session negotiating.
- *
+ *
* The implementation processes inbound server handshake messages,
- * creates and sends respond messages. Outbound messages are supplied
+ * creates and sends respond messages. Outbound messages are supplied
* to Record Protocol. Detected errors are reported to the Alert protocol.
- *
+ *
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7. The
* TLS Handshake Protocol</a>
- *
+ *
*/
-public class ClientHandshakeImpl extends HandshakeProtocol {
-
+public class ClientHandshakeImpl extends HandshakeProtocol {
+
/**
* Creates Client Handshake Implementation
- *
+ *
* @param owner
*/
ClientHandshakeImpl(Object owner) {
super(owner);
}
-
+
/**
* Starts handshake
*
- */
+ */
@Override
public void start() {
if (session == null) { // initial handshake
@@ -85,7 +85,7 @@
}
if (session != null) {
isResuming = true;
- } else if (parameters.getEnableSessionCreation()){
+ } else if (parameters.getEnableSessionCreation()){
isResuming = false;
session = new SSLSessionImpl(parameters.getSecureRandom());
session.setPeer(engineOwner.getPeerHost(), engineOwner.getPeerPort());
@@ -97,13 +97,13 @@
}
startSession();
}
-
+
/**
* Starts renegotiation on a new session
*
*/
private void renegotiateNewSession() {
- if (parameters.getEnableSessionCreation()){
+ if (parameters.getEnableSessionCreation()){
isResuming = false;
session = new SSLSessionImpl(parameters.getSecureRandom());
session.setPeer(engineOwner.getPeerHost(), engineOwner.getPeerPort());
@@ -114,7 +114,7 @@
} else {
status = NOT_HANDSHAKING;
sendWarningAlert(AlertProtocol.NO_RENEGOTIATION);
- }
+ }
}
/*
@@ -190,7 +190,7 @@
//check protocol version
ProtocolVersion servProt = ProtocolVersion
.getByVersion(serverHello.server_version);
- String[] enabled = parameters.getEnabledProtocols();
+ String[] enabled = parameters.getEnabledProtocols();
find: {
for (int i = 0; i < enabled.length; i++) {
if (servProt.equals(ProtocolVersion
@@ -201,13 +201,13 @@
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
"Bad server hello protocol version");
}
-
+
// check compression method
if (serverHello.compression_method != 0) {
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
"Bad server hello compression method");
}
-
+
//check cipher_suite
// BEGIN android-changed
CipherSuite[] enabledSuites = parameters.getEnabledCipherSuitesMember();
@@ -221,7 +221,7 @@
}
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
"Bad server hello cipher suite");
- }
+ }
if (isResuming) {
if (serverHello.session_id.length == 0) {
@@ -232,7 +232,7 @@
isResuming = false;
} else if (!session.protocol.equals(servProt)) {
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
- "Bad server hello protocol version");
+ "Bad server hello protocol version");
} else if (!session.cipherSuite
.equals(serverHello.cipher_suite)) {
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
@@ -328,8 +328,8 @@
}
/**
- * Processes SSLv2 Hello message.
- * SSLv2 client hello message message is an unexpected message
+ * Processes SSLv2 Hello message.
+ * SSLv2 client hello message message is an unexpected message
* for client side of handshake protocol.
* @ see TLS 1.0 spec., E.1. Version 2 client hello
* @param bytes
@@ -448,7 +448,7 @@
} catch (NoSuchAlgorithmException e) {
kf = KeyFactory.getInstance("DiffieHellman");
}
-
+
try {
agreement = KeyAgreement.getInstance("DH");
} catch (NoSuchAlgorithmException ee) {
@@ -524,7 +524,7 @@
if (session.cipherSuite.keyExchange == CipherSuite.KeyExchange_RSA_EXPORT
|| session.cipherSuite.keyExchange == CipherSuite.KeyExchange_RSA
|| session.cipherSuite.keyExchange == CipherSuite.KeyExchange_DHE_RSA
- || session.cipherSuite.keyExchange == CipherSuite.KeyExchange_DHE_RSA_EXPORT) {
+ || session.cipherSuite.keyExchange == CipherSuite.KeyExchange_DHE_RSA_EXPORT) {
ds.setMD5(io_stream.getDigestMD5());
ds.setSHA(io_stream.getDigestSHA());
} else if (session.cipherSuite.keyExchange == CipherSuite.KeyExchange_DHE_DSS
@@ -540,7 +540,7 @@
sendChangeCipherSpec();
}
-
+
/*
* Verifies certificate path
*/
@@ -552,7 +552,7 @@
break;
case 2: // KeyExchange_RSA_EXPORT
if (serverKeyExchange != null ) {
- // ephemeral RSA key is used
+ // ephemeral RSA key is used
authType = "RSA_EXPORT";
} else {
authType = "RSA";
@@ -599,7 +599,7 @@
}
} else if (clientFinished == null) {
unexpectedMessage();
- }
+ }
changeCipherSpecReceived = true;
}
@@ -615,7 +615,7 @@
if (host == null || port == -1) {
return null; // starts new session
}
-
+
ClientSessionContext context = parameters.getClientSessionContext();
SSLSessionImpl session
= (SSLSessionImpl) context.getSession(host, port);
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHello.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHello.java
index 5764105..6942894 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHello.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientHello.java
@@ -25,7 +25,7 @@
* Represents Client Hello message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.1.2.
* Client hello</a>
- *
+ *
*/
public class ClientHello extends Message {
@@ -150,12 +150,12 @@
cipher_suites[i] = CipherSuite.getByCode(b0, b1, b2);
}
compression_methods = new byte[] { 0 }; // CompressionMethod.null
-
+
if (challenge_length < 32) {
Arrays.fill(random, 0, 32 - challenge_length, (byte)0);
- System.arraycopy(in.read(challenge_length), 0, random, 32 - challenge_length, challenge_length);
+ System.arraycopy(in.read(challenge_length), 0, random, 32 - challenge_length, challenge_length);
} else if (challenge_length == 32) {
- System.arraycopy(in.read(32), 0, random, 0, 32);
+ System.arraycopy(in.read(32), 0, random, 0, 32);
} else {
System.arraycopy(in.read(challenge_length), challenge_length - 32, random, 0, 32);
}
@@ -163,7 +163,7 @@
fatalAlert(AlertProtocol.DECODE_ERROR, "DECODE ERROR: incorrect V2ClientHello, extra data");
}
this.length = 38 + session_id.length + (cipher_suites.length << 1)
- + compression_methods.length;
+ + compression_methods.length;
}
/**
@@ -196,7 +196,7 @@
}
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientKeyExchange.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientKeyExchange.java
index af751c2..f016cc9 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientKeyExchange.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientKeyExchange.java
@@ -28,7 +28,7 @@
* Represents client key exchange message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.7.
* Client key exchange message</a>
- *
+ *
*/
public class ClientKeyExchange extends Message {
@@ -36,24 +36,24 @@
* Exchange keys
*/
final byte[] exchange_keys;
-
+
/**
* Equals true if TLS1.0 protocol is used
*/
boolean isTLS;
-
+
/**
* Equals true if key exchange algorithm is RSA
*/
final boolean isRSA;
-
+
/**
* Creates outbound message
* @param encrypted_pre_master_secret
* @param isTLS
*/
public ClientKeyExchange(byte[] encrypted_pre_master_secret, boolean isTLS) {
- this.exchange_keys = encrypted_pre_master_secret;
+ this.exchange_keys = encrypted_pre_master_secret;
length = this.exchange_keys.length;
if (isTLS) {
length += 2;
@@ -61,15 +61,15 @@
this.isTLS = isTLS;
isRSA = true;
}
-
+
/**
* Creates outbound message
- * @param dh_Yc
+ * @param dh_Yc
*/
public ClientKeyExchange(BigInteger dh_Yc) {
byte[] bb = dh_Yc.toByteArray();
if (bb[0] == 0) {
- exchange_keys = new byte[bb.length-1];
+ exchange_keys = new byte[bb.length-1];
System.arraycopy(bb, 1, exchange_keys, 0, exchange_keys.length);
} else {
exchange_keys = bb;
@@ -77,7 +77,7 @@
length = exchange_keys.length +2;
isRSA = false;
}
-
+
/**
* Creates empty message
*
@@ -87,7 +87,7 @@
length = 0;
isRSA = false;
}
-
+
/**
* Creates inbound message
* @param length
@@ -125,23 +125,23 @@
*/
@Override
public void send(HandshakeIODataStream out) {
- if (exchange_keys.length != 0) {
+ if (exchange_keys.length != 0) {
if (!isRSA || isTLS) {// DH or TLSv1 RSA
out.writeUint16(exchange_keys.length);
}
out.write(exchange_keys);
}
}
-
+
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
public int getType() {
return Handshake.CLIENT_KEY_EXCHANGE;
}
-
+
/**
* Returns true if the message is empty (in case of implicit DH Yc)
* @return
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
index b0d212f..dac22f0 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ClientSessionContext.java
@@ -102,7 +102,7 @@
do {
removeById(i.next());
i.remove();
- } while (--removals > 0);
+ } while (--removals > 0);
}
}
}
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
index 07bd340..da0a645 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateSSLv3.java
@@ -27,8 +27,8 @@
/**
* This class encapsulates the operating environment of the SSL v3
- * (http://wp.netscape.com/eng/ssl3) Record Protocol and provides
- * relating encryption/decryption functionality.
+ * (http://wp.netscape.com/eng/ssl3) Record Protocol and provides
+ * relating encryption/decryption functionality.
* The work functionality is based on the security
* parameters negotiated during the handshake.
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
index 949e655..cdbb508 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ConnectionStateTLS.java
@@ -32,8 +32,8 @@
/**
* This class encapsulates the operating environment of the TLS v1
- * (http://www.ietf.org/rfc/rfc2246.txt) Record Protocol and provides
- * relating encryption/decryption functionality.
+ * (http://www.ietf.org/rfc/rfc2246.txt) Record Protocol and provides
+ * relating encryption/decryption functionality.
* The work functionality is based on the security
* parameters negotiated during the handshake.
*/
@@ -42,29 +42,29 @@
// Pre-calculated prf label values:
// "key expansion".getBytes()
private static byte[] KEY_EXPANSION_LABEL = {
- (byte) 0x6B, (byte) 0x65, (byte) 0x79, (byte) 0x20, (byte) 0x65,
- (byte) 0x78, (byte) 0x70, (byte) 0x61, (byte) 0x6E, (byte) 0x73,
+ (byte) 0x6B, (byte) 0x65, (byte) 0x79, (byte) 0x20, (byte) 0x65,
+ (byte) 0x78, (byte) 0x70, (byte) 0x61, (byte) 0x6E, (byte) 0x73,
(byte) 0x69, (byte) 0x6F, (byte) 0x6E };
// "client write key".getBytes()
private static byte[] CLIENT_WRITE_KEY_LABEL = {
- (byte) 0x63, (byte) 0x6C, (byte) 0x69, (byte) 0x65, (byte) 0x6E,
- (byte) 0x74, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69,
- (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65,
+ (byte) 0x63, (byte) 0x6C, (byte) 0x69, (byte) 0x65, (byte) 0x6E,
+ (byte) 0x74, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69,
+ (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65,
(byte) 0x79 };
// "server write key".getBytes()
private static byte[] SERVER_WRITE_KEY_LABEL = {
- (byte) 0x73, (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x65,
- (byte) 0x72, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69,
- (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65,
+ (byte) 0x73, (byte) 0x65, (byte) 0x72, (byte) 0x76, (byte) 0x65,
+ (byte) 0x72, (byte) 0x20, (byte) 0x77, (byte) 0x72, (byte) 0x69,
+ (byte) 0x74, (byte) 0x65, (byte) 0x20, (byte) 0x6B, (byte) 0x65,
(byte) 0x79 };
// "IV block".getBytes()
private static byte[] IV_BLOCK_LABEL = {
- (byte) 0x49, (byte) 0x56, (byte) 0x20, (byte) 0x62, (byte) 0x6C,
+ (byte) 0x49, (byte) 0x56, (byte) 0x20, (byte) 0x62, (byte) 0x6C,
(byte) 0x6F, (byte) 0x63, (byte) 0x6B };
-
+
// MACs to create and check the message integrity info
private final Mac encMac;
private final Mac decMac;
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DHParameters.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DHParameters.java
index 441fc5f..4988d5e 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DHParameters.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DHParameters.java
@@ -90,14 +90,14 @@
(byte) 0x81, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
(byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF
};
-
+
private static byte[] prime;
-
+
static {
-//TODO set prime depand on some system or security property
+//TODO set prime depand on some system or security property
prime = prime512;
}
-
+
/**
* Returns prime bytes
* @return
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DelegatedTask.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DelegatedTask.java
index 3b2e103..fc9aadc 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DelegatedTask.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DelegatedTask.java
@@ -32,7 +32,7 @@
private final HandshakeProtocol handshaker;
private final PrivilegedExceptionAction<Void> action;
private final AccessControlContext context;
-
+
/**
* Creates DelegatedTask
* @param action
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java
index a0f18b4..3c77846 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/DigitalSignature.java
@@ -36,7 +36,7 @@
* This class represents Signature type, as described in TLS v 1.0 Protocol
* specification, 7.4.3. It allow to init, update and sign hash. Hash algorithm
* depends on SignatureAlgorithm.
- *
+ *
* select (SignatureAlgorithm)
* { case anonymous: struct { };
* case rsa:
@@ -49,10 +49,10 @@
* opaque sha_hash[20];
* };
* } Signature;
- *
+ *
* Digital signing description see in TLS spec., 4.7.
* (http://www.ietf.org/rfc/rfc2246.txt)
- *
+ *
*/
public class DigitalSignature {
@@ -60,10 +60,10 @@
private final MessageDigest sha;
private final Signature signature;
private final Cipher cipher;
-
+
private byte[] md5_hash;
private byte[] sha_hash;
-
+
/**
* Create Signature type
* @param keyExchange
@@ -71,7 +71,7 @@
public DigitalSignature(int keyExchange) {
try {
sha = MessageDigest.getInstance("SHA-1");
-
+
if (keyExchange == CipherSuite.KeyExchange_RSA_EXPORT ||
keyExchange == CipherSuite.KeyExchange_RSA ||
keyExchange == CipherSuite.KeyExchange_DHE_RSA ||
@@ -99,7 +99,7 @@
throw new AssertionError(e);
}
}
-
+
/**
* Initiate Signature type by private key
* @param key
@@ -116,7 +116,7 @@
new SSLException("init - invalid private key", e));
}
}
-
+
/**
* Initiate Signature type by certificate
* @param cert
@@ -133,7 +133,7 @@
new SSLException("init - invalid certificate", e));
}
}
-
+
/**
* Update Signature hash
* @param data
@@ -146,23 +146,23 @@
md5.update(data);
}
}
-
+
/**
* Sets MD5 hash
* @param data
*/
public void setMD5(byte[] data) {
- md5_hash = data;
+ md5_hash = data;
}
-
+
/**
* Sets SHA hash
* @param data
*/
public void setSHA(byte[] data) {
- sha_hash = data;
+ sha_hash = data;
}
-
+
/**
* Sign hash
* @return Signature bytes
@@ -172,7 +172,7 @@
if (md5 != null && md5_hash == null) {
md5_hash = new byte[16];
md5.digest(md5_hash, 0, md5_hash.length);
- }
+ }
if (md5_hash != null) {
if (signature != null) {
signature.update(md5_hash);
@@ -195,7 +195,7 @@
return signature.sign();
} else if (cipher != null) {
return cipher.doFinal();
- }
+ }
return new byte[0];
} catch (DigestException e){
return new byte[0];
@@ -209,8 +209,8 @@
}
/**
- * Verifies the signature data.
- * @param data - the signature bytes
+ * Verifies the signature data.
+ * @param data - the signature bytes
* @return true if verified
*/
public boolean verifySignature(byte[] data) {
@@ -221,7 +221,7 @@
return false;
}
}
-
+
if (cipher != null) {
final byte[] decrypt;
try {
@@ -231,7 +231,7 @@
} catch (BadPaddingException e) {
return false;
}
-
+
final byte[] md5_sha;
if (md5_hash != null && sha_hash != null) {
md5_sha = new byte[md5_hash.length + sha_hash.length];
@@ -242,7 +242,7 @@
} else {
md5_sha = sha_hash;
}
-
+
return Arrays.equals(decrypt, md5_sha);
} else if (data == null || data.length == 0) {
return true;
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/FileClientSessionCache.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/FileClientSessionCache.java
index d438779..cd7345f 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/FileClientSessionCache.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/FileClientSessionCache.java
@@ -286,7 +286,7 @@
newOrder.put(cacheFile.name, cacheFile);
}
newOrder.putAll(accessOrder);
-
+
this.accessOrder = newOrder;
}
}
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java
index 6b555c6..9e5e021 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java
@@ -22,17 +22,17 @@
import java.io.IOException;
/**
- *
+ *
* Represents Finished message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.9.
* Finished</a>
- *
+ *
*/
public class Finished extends Message {
-
+
// verify data
private byte[] data;
-
+
/**
* Creates outbound message
* @param bytes
@@ -41,14 +41,14 @@
data = bytes;
length = data.length;
}
-
+
/**
* Creates inbound message
* @param in
* @param length
* @throws IOException
*/
- public Finished(HandshakeIODataStream in, int length)
+ public Finished(HandshakeIODataStream in, int length)
throws IOException {
if (length == 12 || length == 36) {
data = in.read(length);
@@ -62,16 +62,16 @@
public void send(HandshakeIODataStream out) {
out.write(data);
}
-
+
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
public int getType() {
return Handshake.FINISHED;
}
-
+
/**
* Returns verify data
* @return
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Handshake.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Handshake.java
index 64e73dd..b61a96c 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Handshake.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Handshake.java
@@ -18,70 +18,70 @@
package org.apache.harmony.xnet.provider.jsse;
/**
- *
+ *
* This class incapsulates the constants determining the types of handshake
* messages as defined in TLS 1.0 spec., 7.4. Handshake protocol.
* (http://www.ietf.org/rfc/rfc2246.txt)
- *
+ *
*/
public class Handshake {
/**
- *
+ *
* hello_request handshake type
*/
public static final byte HELLO_REQUEST = 0;
/**
- *
+ *
* client_hello handshake type
*/
public static final byte CLIENT_HELLO = 1;
/**
- *
+ *
* server_hello handshake type
*/
public static final byte SERVER_HELLO = 2;
/**
- *
+ *
* certificate handshake type
*/
public static final byte CERTIFICATE = 11;
/**
- *
+ *
* server_key_exchange handshake type
*/
public static final byte SERVER_KEY_EXCHANGE = 12;
/**
- *
+ *
* certificate_request handshake type
*/
public static final byte CERTIFICATE_REQUEST = 13;
/**
- *
+ *
* server_hello_done handshake type
*/
public static final byte SERVER_HELLO_DONE = 14;
/**
- *
+ *
* certificate_verify handshake type
*/
public static final byte CERTIFICATE_VERIFY = 15;
/**
- *
+ *
* client_key_exchange handshake type
*/
public static final byte CLIENT_KEY_EXCHANGE = 16;
/**
- *
+ *
* finished handshake type
*/
public static final byte FINISHED = 20;
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeIODataStream.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
index 74cc27d..e45a52a 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeIODataStream.java
@@ -126,7 +126,7 @@
* to delete one message from the internal buffer.
*/
protected void removeFromMarkedPosition() {
- System.arraycopy(buffer, read_pos,
+ System.arraycopy(buffer, read_pos,
buffer, marked_pos, read_pos_end - read_pos);
read_pos_end -= (read_pos - marked_pos);
read_pos = marked_pos;
@@ -179,7 +179,7 @@
* The attempts to overflow the buffer by means of this methods
* seem to be futile because of:
* 1. The SSL protocol specifies the maximum size of the record
- * and record protocol does not pass huge messages.
+ * and record protocol does not pass huge messages.
* (see TLS v1 specification http://www.ietf.org/rfc/rfc2246.txt ,
* p 6.2)
* 2. After each call of this method, handshake protocol should
@@ -223,7 +223,7 @@
System.arraycopy(buffer, 0, new_buff, 0, buffer.length);
buffer = new_buff;
}
-
+
protected void clearBuffer() {
read_pos = 0;
marked_pos = 0;
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
index 6579398..94b18ce 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HandshakeProtocol.java
@@ -37,25 +37,25 @@
* Base class for ClientHandshakeImpl and ServerHandshakeImpl classes.
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.
* Handshake protocol</a>
- *
+ *
*/
public abstract class HandshakeProtocol {
/**
- * Handshake status NEED_UNWRAP - HandshakeProtocol needs to receive data
+ * Handshake status NEED_UNWRAP - HandshakeProtocol needs to receive data
*/
public final static int NEED_UNWRAP = 1;
-
+
/**
* Handshake status NOT_HANDSHAKING - is not currently handshaking
*/
public final static int NOT_HANDSHAKING = 2;
-
+
/**
- * Handshake status FINISHED - HandshakeProtocol has just finished
+ * Handshake status FINISHED - HandshakeProtocol has just finished
*/
public final static int FINISHED = 3;
-
+
/**
* Handshake status NEED_TASK - HandshakeProtocol needs the results of delegated task
*/
@@ -63,7 +63,7 @@
/**
* Current handshake status
- */
+ */
protected int status = NOT_HANDSHAKING;
/**
@@ -80,12 +80,12 @@
* SSLParameters suplied by SSLSocket or SSLEngine
*/
protected SSLParameters parameters;
-
+
/**
* Delegated tasks for this handshake implementation
*/
protected Vector<DelegatedTask> delegatedTasks = new Vector<DelegatedTask>();
-
+
/**
* Indicates non-blocking handshake
*/
@@ -93,12 +93,12 @@
/**
* Pending session
- */
+ */
protected SSLSessionImpl session;
/**
* Sended and received handshake messages
- */
+ */
protected ClientHello clientHello;
protected ServerHello serverHello;
protected CertificateMessage serverCert;
@@ -110,7 +110,7 @@
protected CertificateVerify certificateVerify;
protected Finished clientFinished;
protected Finished serverFinished;
-
+
/**
* Indicates that change cipher spec message has been received
*/
@@ -125,7 +125,7 @@
* Premaster secret
*/
protected byte[] preMasterSecret;
-
+
/**
* Exception occured in delegated task
*/
@@ -135,7 +135,7 @@
private byte[] verify_data = new byte[12];
// Encoding of "master secret" string: "master secret".getBytes()
- private byte[] master_secret_bytes =
+ private byte[] master_secret_bytes =
{109, 97, 115, 116, 101, 114, 32, 115, 101, 99, 114, 101, 116 };
// indicates whether protocol needs to send change cipher spec message
@@ -146,16 +146,16 @@
/**
* SSLEngine owning this HandshakeProtocol
- */
+ */
public SSLEngineImpl engineOwner;
-
+
/**
* SSLSocket owning this HandshakeProtocol
*/
// BEGIN android-removed
// public SSLSocketImpl socketOwner;
// END android-removed
-
+
/**
* Creates HandshakeProtocol instance
* @param owner
@@ -182,7 +182,7 @@
public void setRecordProtocol(SSLRecordProtocol recordProtocol) {
this.recordProtocol = recordProtocol;
}
-
+
/**
* Start session negotiation
* @param session
@@ -190,8 +190,8 @@
public abstract void start();
/**
- * Stops the current session renegotiation process.
- * Such functionality is needed when it is session renegotiation
+ * Stops the current session renegotiation process.
+ * Such functionality is needed when it is session renegotiation
* process and no_renegotiation alert message is received
* from another peer.
* @param session
@@ -206,7 +206,7 @@
* @return
*/
public SSLEngineResult.HandshakeStatus getStatus() {
- if (io_stream.hasData() || needSendCCSpec ||
+ if (io_stream.hasData() || needSendCCSpec ||
needSendHelloRequest || delegatedTaskErr != null) {
return SSLEngineResult.HandshakeStatus.NEED_WRAP;
}
@@ -284,9 +284,9 @@
return recordProtocol.getChangeCipherSpecMesage(getSession());
} else if (needSendHelloRequest) {
needSendHelloRequest = false;
- return recordProtocol.wrap(ContentType.HANDSHAKE,
- // hello request message
- // (see TLS v 1 specification:
+ return recordProtocol.wrap(ContentType.HANDSHAKE,
+ // hello request message
+ // (see TLS v 1 specification:
// http://www.ietf.org/rfc/rfc2246.txt)
new byte[] {0, 0, 0, 0}, 0, 4);
} else {
@@ -296,7 +296,7 @@
/**
* Sends fatal alert, breaks execution
- *
+ *
* @param description
*/
protected void sendWarningAlert(byte description) {
@@ -305,7 +305,7 @@
/**
* Sends fatal alert, breaks execution
- *
+ *
* @param description
* @param reason
*/
@@ -315,7 +315,7 @@
/**
* Sends fatal alert, breaks execution
- *
+ *
* @param description
* @param reason
* @param cause
@@ -326,7 +326,7 @@
/**
* Sends fatal alert, breaks execution
- *
+ *
* @param description
* @param cause
*/
@@ -358,7 +358,7 @@
System.arraycopy(sha_digest, 0, digest, md5_digest.length,
sha_digest.length);
try {
- PRF.computePRF(buf, session.master_secret,
+ PRF.computePRF(buf, session.master_secret,
label.getBytes(), digest);
} catch (GeneralSecurityException e) {
fatalAlert(AlertProtocol.INTERNAL_ERROR, "PRF error", e);
@@ -416,7 +416,7 @@
/**
* Verifies finished data
- *
+ *
* @param data
* @param isServer
*/
@@ -428,7 +428,7 @@
/**
* Sends fatal alert "UNEXPECTED MESSAGE"
- *
+ *
*/
protected void unexpectedMessage() {
fatalAlert(AlertProtocol.UNEXPECTED_MESSAGE, "UNEXPECTED MESSAGE");
@@ -436,7 +436,7 @@
/**
* Writes message to HandshakeIODataStream
- *
+ *
* @param message
*/
public void send(Message message) {
@@ -447,7 +447,7 @@
/**
* Computers master secret
- *
+ *
*/
public void computerMasterSecret() {
byte[] seed = new byte[64];
@@ -464,12 +464,12 @@
} else { // SSL3.0
PRF.computePRF_SSLv3(session.master_secret, preMasterSecret, seed);
}
-
+
//delete preMasterSecret from memory
Arrays.fill(preMasterSecret, (byte)0);
- preMasterSecret = null;
+ preMasterSecret = null;
}
-
+
/**
* Returns a delegated task.
* @return Delegated task or null
@@ -480,9 +480,9 @@
}
return delegatedTasks.remove(0);
}
-
+
/**
- *
+ *
* Clears previously sended and received handshake messages
*/
protected void clearMessages() {
@@ -499,7 +499,7 @@
clientFinished = null;
serverFinished = null;
}
-
+
/**
* Returns RSA key length
* @param pk
@@ -520,7 +520,7 @@
}
return mod.bitLength();
}
-
+
/**
* Shutdownes the protocol. It will be impossiblke to use the instance
* after the calling of this method.
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HelloRequest.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HelloRequest.java
index 40d4a71..f6ceca8 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HelloRequest.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/HelloRequest.java
@@ -24,34 +24,34 @@
import java.io.IOException;
/**
- *
+ *
* Represents Hello Request message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.1.1.
* Hello request</a>
- *
+ *
*/
public class HelloRequest extends Message {
-
+
/**
* Creates outbound message
*
*/
public HelloRequest() {
}
-
+
/**
* Creates inbound message
* @param in
* @param length
* @throws IOException
*/
- public HelloRequest(HandshakeIODataStream in, int length)
+ public HelloRequest(HandshakeIODataStream in, int length)
throws IOException {
if (length != 0) {
fatalAlert(AlertProtocol.DECODE_ERROR, "DECODE ERROR: incorrect HelloRequest");
}
}
-
+
/**
* Sends message
* @param out
@@ -63,10 +63,10 @@
@Override
public int length() {
return 0;
- }
-
+ }
+
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
index 083a342..6d50756 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
@@ -23,16 +23,16 @@
/**
* JSSE Provider implementation.
- *
+ *
* This implementation is based on TLS v 1.0 and SSL v3 protocol specifications.
- *
+ *
* <ul>
* <li><a href="http://www.ietf.org/rfc/rfc2246.txt">TLS v 1.0 Protocol
* specification</a></li>
* <li><a href="http://wp.netscape.com/eng/ssl3">SSL v3 Protocol
* specification</a></li>
* </ul>
- *
+ *
* Provider implementation supports the following cipher suites:
* TLS_NULL_WITH_NULL_NULL
* TLS_RSA_WITH_NULL_MD5
@@ -62,11 +62,11 @@
* TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA
* TLS_DH_anon_WITH_DES_CBC_SHA
* TLS_DH_anon_WITH_3DES_EDE_CBC_SHA
- *
- * The real set of available cipher suites depends on set of available
+ *
+ * The real set of available cipher suites depends on set of available
* crypto algorithms. These algorithms must be provided by some crypto
* provider.
- *
+ *
* The following cipher algorithms are used by different cipher suites:
* IDEA/CBC/NoPadding
* RC2/CBC/NoPadding
@@ -74,33 +74,33 @@
* DES/CBC/NoPadding
* DES/CBC/NoPadding
* DESede/CBC/NoPadding
- *
- * Also the current JSSE provider implementation uses the following
+ *
+ * Also the current JSSE provider implementation uses the following
* crypto algorithms:
- *
+ *
* Algorithms that MUST be provided by crypto provider:
* Mac HmacMD5
* Mac HmacSHA1
* MessageDigest MD5
* MessageDigest SHA-1
* CertificateFactory X509
- *
+ *
* The cipher suites with RSA key exchange may also require:
* Cipher RSA
* KeyPairGenerator RSA
* KeyFactory RSA
- *
+ *
* The cipher suites with DH key exchange may also require:
* Signature NONEwithDSA
* KeyPairGenerator DiffieHellman or DH
* KeyFactory DiffieHellman or DH
* KeyAgreement DiffieHellman or DH
* KeyPairGenerator DiffieHellman or DH
- *
+ *
* Trust manager implementation requires:
* CertPathValidator PKIX
* CertificateFactory X509
- *
+ *
*/
public final class JSSEProvider extends Provider {
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java
index f63170f..1f3f0fa 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerImpl.java
@@ -36,14 +36,14 @@
/**
* KeyManager implementation.
- *
+ *
* This implementation uses hashed key store information. It works faster than retrieving all of the
* data from the key store. Any key store changes, that happen after key manager was created, have
* no effect. The implementation does not use peer information (host, port) that may be obtained
* from socket or engine.
- *
+ *
* @see javax.net.ssl.KeyManager
- *
+ *
*/
public class KeyManagerImpl extends X509ExtendedKeyManager {
@@ -52,7 +52,7 @@
/**
* Creates Key manager
- *
+ *
* @param keyStore
* @param pwd
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
index c06aa7e..08c0822 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
@@ -96,7 +96,7 @@
}
private static String[] names;
-
+
static {
try {
names = AccessController
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Message.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Message.java
index f1b2515..431582b 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Message.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/Message.java
@@ -23,22 +23,22 @@
import javax.net.ssl.SSLHandshakeException;
/**
- *
+ *
* Base class for handshake messages
*/
public abstract class Message {
-
+
/*
* Message length
*/
protected int length;
-
+
/**
- * Returns message type
+ * Returns message type
* @return
*/
abstract int getType();
-
+
/**
* Returns message length
* @return
@@ -46,13 +46,13 @@
public int length() {
return length;
}
-
+
/**
* Sends message
* @param out
*/
abstract void send(HandshakeIODataStream out);
-
+
/**
* Sends fatal alert
* @param description
@@ -61,7 +61,7 @@
protected void fatalAlert(byte description, String reason) {
throw new AlertException(description, new SSLHandshakeException(reason));
}
-
+
/**
* Sends fatal alert
* @param description
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
index 919d9e1..90dd369 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigest.java
@@ -43,11 +43,11 @@
/**
* Creates a new OpenSSLMessageDigest instance for the given algorithm
* name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
- *
+ *
* @return The new OpenSSLMessageDigest instance.
- *
+ *
* @throws RuntimeException In case of problems.
*/
public static OpenSSLMessageDigest getInstance(String algorithm) {
@@ -57,7 +57,7 @@
/**
* Creates a new OpenSSLMessageDigest instance for the given algorithm
* name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
*/
private OpenSSLMessageDigest(String algorithm) {
@@ -77,7 +77,7 @@
throw new RuntimeException(ex.getMessage() + " (" + algorithm + ")");
}
}
-
+
public int doFinal(byte[] out, int outOff) {
int i = NativeCrypto.EVP_DigestFinal(ctx, out, outOff);
reset();
@@ -114,5 +114,5 @@
super.finalize();
NativeCrypto.EVP_free(ctx);
}
-
+
}
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
index 4ba3a74..6bf9233 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLMessageDigestJDK.java
@@ -21,11 +21,11 @@
/**
* Creates a new OpenSSLMessageDigestJDK instance for the given algorithm
* name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
- *
+ *
* @return The new OpenSSLMessageDigestJDK instance.
- *
+ *
* @throws RuntimeException In case of problems.
*/
public static OpenSSLMessageDigestJDK getInstance(String algorithm) throws NoSuchAlgorithmException{
@@ -35,7 +35,7 @@
/**
* Creates a new OpenSSLMessageDigest instance for the given algorithm
* name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
*/
private OpenSSLMessageDigestJDK(String algorithm) throws NoSuchAlgorithmException {
@@ -55,7 +55,7 @@
throw new NoSuchAlgorithmException(ex.getMessage() + " (" + algorithm + ")");
}
}
-
+
@Override
protected byte[] engineDigest() {
byte[] result = new byte[NativeCrypto.EVP_DigestSize(ctx)];
@@ -90,25 +90,25 @@
super.finalize();
NativeCrypto.EVP_free(ctx);
}
-
+
static public class MD5 extends OpenSSLMessageDigestJDK {
public MD5() throws NoSuchAlgorithmException {
super("MD5");
}
}
-
+
static public class SHA1 extends OpenSSLMessageDigestJDK {
public SHA1() throws NoSuchAlgorithmException {
super("SHA-1");
}
}
-
+
static public class SHA224 extends OpenSSLMessageDigestJDK {
public SHA224() throws NoSuchAlgorithmException {
super("SHA-224");
}
}
-
+
static public class SHA256 extends OpenSSLMessageDigestJDK {
public SHA256() throws NoSuchAlgorithmException {
super("SHA-256");
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java
index 3db6301..c651213 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/OpenSSLSignature.java
@@ -46,12 +46,12 @@
* Holds a pointer to the native RSA key.
*/
private int rsa;
-
+
/**
- * Holds the OpenSSL name of the algorithm (lower case, no dashes).
+ * Holds the OpenSSL name of the algorithm (lower case, no dashes).
*/
private String evpAlgorithm;
-
+
/**
* Holds a dummy buffer for writing single bytes to the digest.
*/
@@ -59,11 +59,11 @@
/**
* Creates a new OpenSSLSignature instance for the given algorithm name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
- *
+ *
* @return The new OpenSSLSignature instance.
- *
+ *
* @throws RuntimeException In case of problems.
*/
public static OpenSSLSignature getInstance(String algorithm) throws NoSuchAlgorithmException {
@@ -73,13 +73,13 @@
/**
* Creates a new OpenSSLSignature instance for the given algorithm name.
- *
+ *
* @param algorithm The name of the algorithm, e.g. "SHA1".
*/
private OpenSSLSignature(String algorithm) throws NoSuchAlgorithmException {
super(algorithm);
-
- int i = algorithm.indexOf("with");
+
+ int i = algorithm.indexOf("with");
if (i == -1) {
throw new NoSuchAlgorithmException(algorithm);
}
@@ -108,7 +108,7 @@
ctx = NativeCrypto.EVP_new();
}
-
+
@Override
protected void engineUpdate(byte input) {
singleByte[0] = input;
@@ -137,12 +137,12 @@
@Override
protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException {
//log("OpenSSLSignature", "engineInitVerify() invoked with " + publicKey.getClass().getCanonicalName());
-
+
if (publicKey instanceof DSAPublicKey) {
try {
DSAPublicKey dsaPublicKey = (DSAPublicKey)publicKey;
DSAParams dsaParams = dsaPublicKey.getParams();
- dsa = NativeCrypto.EVP_PKEY_new_DSA(dsaParams.getP().toByteArray(),
+ dsa = NativeCrypto.EVP_PKEY_new_DSA(dsaParams.getP().toByteArray(),
dsaParams.getQ().toByteArray(), dsaParams.getG().toByteArray(),
dsaPublicKey.getY().toByteArray(), null);
@@ -161,7 +161,7 @@
} else {
throw new InvalidKeyException("Need DSA or RSA public key");
}
-
+
try {
NativeCrypto.EVP_VerifyInit(ctx, evpAlgorithm);
} catch (Exception ex) {
@@ -181,25 +181,25 @@
@Override
protected boolean engineVerify(byte[] sigBytes) throws SignatureException {
int handle = (rsa != 0) ? rsa : dsa;
-
+
if (handle == 0) {
// This can't actually happen, but you never know...
throw new SignatureException("Need DSA or RSA public key");
}
-
+
try {
int result = NativeCrypto.EVP_VerifyFinal(ctx, sigBytes, 0, sigBytes.length, handle);
return result == 1;
} catch (Exception ex) {
throw new SignatureException(ex);
}
-
+
}
@Override
protected void finalize() throws Throwable {
super.finalize();
-
+
if (dsa != 0) {
NativeCrypto.EVP_PKEY_free(dsa);
}
@@ -207,7 +207,7 @@
if (rsa != 0) {
NativeCrypto.EVP_PKEY_free(rsa);
}
-
+
if (ctx != 0) {
NativeCrypto.EVP_free(ctx);
}
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/PRF.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/PRF.java
index c2f91a3..9165e9b 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/PRF.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/PRF.java
@@ -30,7 +30,7 @@
/**
* This class provides functionality for computation
- * of PRF values for TLS (http://www.ietf.org/rfc/rfc2246.txt)
+ * of PRF values for TLS (http://www.ietf.org/rfc/rfc2246.txt)
* and SSL v3 (http://wp.netscape.com/eng/ssl3) protocols.
*/
public class PRF {
@@ -42,7 +42,7 @@
protected static MessageDigest sha;
private static int md5_mac_length;
private static int sha_mac_length;
-
+
static private void init() {
try {
md5_mac = Mac.getInstance("HmacMD5");
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
index def27f9..99eb9b4 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
@@ -19,7 +19,7 @@
import java.util.Hashtable;
/**
- *
+ *
* Represents Protocol Version
*/
public class ProtocolVersion {
@@ -32,9 +32,9 @@
private static Hashtable<String, ProtocolVersion> protocolsByName = new Hashtable<String, ProtocolVersion>(4);
/**
- *
+ *
* Returns true if protocol version is supported
- *
+ *
* @param version
*/
public static boolean isSupported(byte[] version) {
@@ -46,7 +46,7 @@
/**
* Returns ProtocolVersion
- *
+ *
* @param version
* @return
*/
@@ -64,7 +64,7 @@
/**
* Returns true if provider supports protocol version
- *
+ *
* @param name
* @return
*/
@@ -74,7 +74,7 @@
/**
* Returns ProtocolVersion
- *
+ *
* @param name
* @return
*/
@@ -84,7 +84,7 @@
/**
* Highest protocol version supported by provider implementation
- *
+ *
* @param protocols
* @return
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLBufferedInput.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLBufferedInput.java
index 31bb681..1d71f6b 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLBufferedInput.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLBufferedInput.java
@@ -63,12 +63,12 @@
}
/**
- * Reads the following byte value. If there are no bytes in the source
+ * Reads the following byte value. If there are no bytes in the source
* buffer, method throws java.nio.BufferUnderflowException.
*/
@Override
public int read() throws IOException {
- // TODO: implement optimized read(int)
+ // TODO: implement optimized read(int)
// and read(byte[], int, int) methods
bytik = in.get() & 0x00FF;
consumed ++;
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java
index 8b3c858..81dc1a5 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLContextImpl.java
@@ -73,7 +73,7 @@
clientSessionContext, serverSessionContext);
}
- /**
+ /**
* @deprecated call setPersistentCache directly on the result of
* engineGetClientSessionContext() or
* engineGetServerSessionContext
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineAppData.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineAppData.java
index 9a2cb5e..2f0a362 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineAppData.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineAppData.java
@@ -39,7 +39,7 @@
protected SSLEngineAppData() {}
/**
- * Stores received data. The source data is not cloned,
+ * Stores received data. The source data is not cloned,
* just the array reference is remembered into the buffer field.
*/
public void append(byte[] src) {
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineImpl.java
index c28a311..4b2dd8d 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLEngineImpl.java
@@ -517,7 +517,7 @@
case AlertProtocol.NO_RENEGOTIATION:
alertProtocol.setProcessed();
if (session == null) {
- // message received during the initial
+ // message received during the initial
// handshake
throw new AlertException(
AlertProtocol.HANDSHAKE_FAILURE,
@@ -536,8 +536,8 @@
break;
}
return new SSLEngineResult(getEngineStatus(), getHandshakeStatus(),
- recProtIS.consumed(),
- // place the app. data (if any) into the dest. buffers
+ recProtIS.consumed(),
+ // place the app. data (if any) into the dest. buffers
// and get the number of produced bytes:
appData.placeTo(dsts, offset, length));
} catch (BufferUnderflowException e) {
@@ -700,7 +700,7 @@
dst.put(remaining_wrapped_data);
produced = remaining_wrapped_data.length;
remaining_wrapped_data = null;
- return new SSLEngineResult(getEngineStatus(),
+ return new SSLEngineResult(getEngineStatus(),
handshakeStatus, dataStream.consumed(), produced);
}
} else {
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java
index 9312184..581ac1a 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLParameters.java
@@ -83,7 +83,7 @@
// protocols available for SSL connection
private String[] enabledProtocols = ProtocolVersion.supportedProtocols;
-
+
// if the peer with this parameters tuned to work in client mode
private boolean client_mode = true;
// if the peer with this parameters tuned to require client authentication
@@ -149,7 +149,7 @@
defaultKeyManager = keyManager;
}
}
-
+
// initialize trust manager
initialize_default = false;
if ((tms == null) || (tms.length == 0)) {
@@ -188,7 +188,7 @@
} catch (KeyStoreException e) {
throw new KeyManagementException(e);
} catch (UnrecoverableKeyException e) {
- throw new KeyManagementException(e);
+ throw new KeyManagementException(e);
// BEGIN android-added
} catch (CertificateEncodingException e) {
throw new KeyManagementException(e);
@@ -211,7 +211,7 @@
// We simply use the SecureRandom passed in by the caller. If it's
// null, we don't replace it by a new instance. The native code below
// then directly accesses /dev/urandom. Not the most elegant solution,
- // but faster than going through the SecureRandom object.
+ // but faster than going through the SecureRandom object.
secureRandom = sr;
// END android-added
}
@@ -225,7 +225,7 @@
}
return (SSLParameters) defaultParameters.clone();
}
-
+
/**
* @return server session context
*/
@@ -284,7 +284,7 @@
return secureRandom;
}
// END android-added
-
+
/**
* @return the names of enabled cipher suites
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLRecordProtocol.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
index 423a817..5c47ed4 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLRecordProtocol.java
@@ -47,13 +47,13 @@
* constrains on the data length, and information about correspondance
* of plain and encrypted data lengths.
* For more information on TLS v1 see http://www.ietf.org/rfc/rfc2246.txt,
- * on SSL v3 see http://wp.netscape.com/eng/ssl3,
+ * on SSL v3 see http://wp.netscape.com/eng/ssl3,
* on SSL v2 see http://wp.netscape.com/eng/security/SSL_2.html.
*/
public class SSLRecordProtocol {
/**
- * Maximum length of allowed plain data fragment
+ * Maximum length of allowed plain data fragment
* as specified by TLS specification.
*/
protected static int MAX_DATA_LENGTH = 16384; // 2^14
@@ -69,7 +69,7 @@
*/
protected static int MAX_CIPHERED_DATA_LENGTH
= MAX_COMPRESSED_DATA_LENGTH + 1024;
- /**
+ /**
* Maximum length of ssl record. It is counted as:
* type(1) + version(2) + length(2) + MAX_CIPHERED_DATA_LENGTH
*/
@@ -88,7 +88,7 @@
// application data object to which application data will be transmitted
private org.apache.harmony.xnet.provider.jsse.Appendable appData;
// connection state holding object
- private ConnectionState
+ private ConnectionState
activeReadState, activeWriteState, pendingConnectionState;
// logger
@@ -160,8 +160,8 @@
/**
* Returns the upper bound of length of data containing in the record with
* specified length.
- * If the provided record_size is greater or equal to
- * MAX_CIPHERED_DATA_LENGTH the returned value will be
+ * If the provided record_size is greater or equal to
+ * MAX_CIPHERED_DATA_LENGTH the returned value will be
* MAX_DATA_LENGTH
* counted as for data with
* MAX_CIPHERED_DATA_LENGTH length.
@@ -271,8 +271,8 @@
/**
* Returns the change cipher spec message to be sent to another peer.
- * The pending connection state will be built on the base of provided
- * session object
+ * The pending connection state will be built on the base of provided
+ * session object
* The calling of this method triggers pending write connection state to
* be active.
* @return ssl record containing the "change cipher spec" message.
@@ -318,10 +318,10 @@
* } TLSCiphertext;
*
* (as specified by RFC 2246, TLS v1 Protocol specification)
- *
+ *
* In addition this method can recognize SSLv2 hello message which
* are often used to establish the SSL/TLS session.
- *
+ *
* @throws IOException if some io errors have been occured
* @throws EndOfSourceException if underlying input stream
* has ran out of data.
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java
index 922de2b..5fec6dd 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionImpl.java
@@ -36,9 +36,9 @@
import javax.net.ssl.SSLSessionContext;
/**
- *
+ *
* SSLSession implementation
- *
+ *
* @see javax.net.ssl.SSLSession
*/
public class SSLSessionImpl implements SSLSession, Cloneable {
@@ -166,7 +166,7 @@
/**
* Creates SSLSession implementation
- *
+ *
* @param cipher_suite
* @param sr
*/
@@ -194,7 +194,7 @@
/**
* Creates SSLSession implementation
- *
+ *
* @param sr
*/
public SSLSessionImpl(SecureRandom sr) {
@@ -355,7 +355,7 @@
/**
* Sets the address of the peer
- *
+ *
* @param peerHost
* @param peerPort
*/
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLv3Constants.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLv3Constants.java
index 07aaca8..43dc178 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLv3Constants.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLv3Constants.java
@@ -18,8 +18,8 @@
package org.apache.harmony.xnet.provider.jsse;
/**
- *
- * Contains SSL 3.0 constants
+ *
+ * Contains SSL 3.0 constants
* @see <a href="http://wp.netscape.com/eng/ssl3">SSL 3.0 Spec.</a>
*/
public class SSLv3Constants {
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
index b76c42f..a525fbb 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHandshakeImpl.java
@@ -50,14 +50,14 @@
* Server side handshake protocol implementation.
* Handshake protocol operates on top of the Record Protocol.
* It responsible for negotiating a session.
- *
+ *
* The implementation processes inbound client handshake messages,
- * creates and sends respond messages. Outbound messages are supplied
+ * creates and sends respond messages. Outbound messages are supplied
* to Record Protocol. Detected errors are reported to the Alert protocol.
- *
+ *
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.
* Handshake protocol.</a>
- *
+ *
*/
public class ServerHandshakeImpl extends HandshakeProtocol {
@@ -66,7 +66,7 @@
/**
* Creates Server Handshake Implementation
- *
+ *
* @param owner
*/
public ServerHandshakeImpl(Object owner) {
@@ -87,7 +87,7 @@
// current negotiation has not completed
return; // ignore
}
-
+
// renegotiation
sendHelloRequest();
status = NEED_UNWRAP;
@@ -177,7 +177,7 @@
certificateVerify = new CertificateVerify(io_stream, length);
DigitalSignature ds = new DigitalSignature(session.cipherSuite.keyExchange);
- ds.init(serverCert.certs[0]);
+ ds.init(serverCert.certs[0]);
byte[] md5_hash = null;
byte[] sha_hash = null;
@@ -242,7 +242,7 @@
// TODO check that client cert. DH params
// matched server cert. DH params
- // client cert. contains fixed DH parameters
+ // client cert. contains fixed DH parameters
preMasterSecret = ((DHPublicKey) clientCert.certs[0]
.getPublicKey()).getY().toByteArray();
} else {
@@ -342,9 +342,9 @@
}
/**
- *
- * Processes Client Hello message.
- * Server responds to client hello message with server hello
+ *
+ * Processes Client Hello message.
+ * Server responds to client hello message with server hello
* and (if necessary) server certificate, server key exchange,
* certificate request, and server hello done messages.
*/
@@ -361,12 +361,12 @@
fatalAlert(AlertProtocol.HANDSHAKE_FAILURE,
"HANDSHAKE FAILURE. Incorrect client hello message");
}
-
+
if (!ProtocolVersion.isSupported(clientHello.client_version)) {
- fatalAlert(AlertProtocol.PROTOCOL_VERSION,
+ fatalAlert(AlertProtocol.PROTOCOL_VERSION,
"PROTOCOL VERSION. Unsupported client version "
+ clientHello.client_version[0]
- + clientHello.client_version[1]);
+ + clientHello.client_version[1]);
}
isResuming = false;
@@ -385,7 +385,7 @@
}
reuseCurrent = true;
}
-
+
// find session in cash
sessionToResume = findSessionToResume(clientHello.session_id);
if (sessionToResume == null || !sessionToResume.isValid()) {
@@ -435,9 +435,9 @@
recordProtocol.setVersion(clientHello.client_version);
session.protocol = ProtocolVersion.getByVersion(clientHello.client_version);
session.clientRandom = clientHello.random;
-
+
// create server hello message
- serverHello = new ServerHello(parameters.getSecureRandom(),
+ serverHello = new ServerHello(parameters.getSecureRandom(),
clientHello.client_version,
session.getId(), cipher_suite, (byte) 0); //CompressionMethod.null
session.serverRandom = serverHello.random;
@@ -446,7 +446,7 @@
sendChangeCipherSpec();
return;
}
-
+
// create and send server certificate message if needed
if (!cipher_suite.isAnonymous()) { // need to send server certificate
X509Certificate[] certs = null;
@@ -515,7 +515,7 @@
try {
if (cipher_suite.keyExchange == CipherSuite.KeyExchange_RSA_EXPORT) {
- PublicKey pk = serverCert.certs[0].getPublicKey();
+ PublicKey pk = serverCert.certs[0].getPublicKey();
if (getRSAKeyLength(pk) > 512) {
// key is longer than 512 bits
kpg = KeyPairGenerator.getInstance("RSA");
@@ -561,11 +561,11 @@
DHPublicKeySpec.class);
}
if (!cipher_suite.isAnonymous()) { // calculate signed_params
-
+
// init by private key which correspond to
// server certificate
ds.init(privKey);
-
+
// use emphemeral key for key exchange
privKey = kp.getPrivate();
ds.update(clientHello.getRandom());
@@ -573,7 +573,7 @@
byte[] tmp;
byte[] tmpLength = new byte[2];
-//FIXME 1_byte==0x00
+//FIXME 1_byte==0x00
if (cipher_suite.keyExchange == CipherSuite.KeyExchange_RSA_EXPORT) {
tmp = ServerKeyExchange.toUnsignedByteArray(rsakey.getModulus());
tmpLength[0] = (byte) ((tmp.length & 0xFF00) >>> 8);
@@ -642,7 +642,7 @@
send(serverHelloDone);
status = NEED_UNWRAP;
}
-
+
/**
* Creates and sends finished message
*/
@@ -663,7 +663,7 @@
if (isTLS) {
computerReferenceVerifyDataTLS("client finished");
} else {
- computerReferenceVerifyDataSSLv3(SSLv3Constants.client);
+ computerReferenceVerifyDataSSLv3(SSLv3Constants.client);
}
status = NEED_UNWRAP;
} else {
@@ -676,7 +676,7 @@
private SSLSessionImpl findSessionToResume(byte[] session_id) {
return (SSLSessionImpl)parameters.getServerSessionContext().getSession(session_id);
}
-
+
// find appropriate cipher_suite in the client suites
private CipherSuite selectSuite(CipherSuite[] client_suites) {
for (int i = 0; i < client_suites.length; i++) {
@@ -698,7 +698,7 @@
* Processes inbound ChangeCipherSpec message
*/
@Override
- public void receiveChangeCipherSpec() {
+ public void receiveChangeCipherSpec() {
if (isResuming) {
if (serverFinished == null) {
unexpectedMessage();
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHello.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHello.java
index 1cd9624..276516d 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHello.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHello.java
@@ -23,7 +23,7 @@
import java.security.SecureRandom;
/**
- *
+ *
* Represents server hello message.
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.1.3.
* Server hello.</a>
@@ -85,7 +85,7 @@
* @throws IOException
*/
public ServerHello(HandshakeIODataStream in, int length) throws IOException {
-
+
server_version[0] = (byte) in.read();
server_version[1] = (byte) in.read();
in.read(random, 0, 32);
@@ -127,7 +127,7 @@
}
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHelloDone.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHelloDone.java
index 73b6a81..19d9268 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHelloDone.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerHelloDone.java
@@ -22,11 +22,11 @@
import java.io.IOException;
/**
- *
+ *
* Represents server hello done message
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.5.
* Server hello done</a>
- *
+ *
*/
public class ServerHelloDone extends Message {
@@ -34,9 +34,9 @@
* Creates outbound message
*
*/
- public ServerHelloDone() {
+ public ServerHelloDone() {
}
-
+
/**
* Creates inbound message
* @param in
@@ -57,7 +57,7 @@
@Override
public void send(HandshakeIODataStream out) {
}
-
+
/**
* Returns message length
* @return
@@ -66,9 +66,9 @@
public int length() {
return 0;
}
-
+
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerKeyExchange.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerKeyExchange.java
index af056a3..b2b0351 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerKeyExchange.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ServerKeyExchange.java
@@ -26,11 +26,11 @@
import java.security.spec.RSAPublicKeySpec;
/**
- *
+ *
* Represents server key exchange message.
* @see <a href="http://www.ietf.org/rfc/rfc2246.txt">TLS 1.0 spec., 7.4.3.
* Server key exchange message.</a>
- *
+ *
*/
public class ServerKeyExchange extends Message {
@@ -66,7 +66,7 @@
this.hash = hash;
bytes1 = toUnsignedByteArray(this.par1);
-
+
bytes2 = toUnsignedByteArray(this.par2);
length = 4 + bytes1.length + bytes2.length;
@@ -80,7 +80,7 @@
bytes3 = toUnsignedByteArray(this.par3);
length += 2 + bytes3.length;
}
-
+
/**
* Remove first byte if 0. Needed because BigInteger.toByteArray() sometimes
* returns a zero prefix.
@@ -162,9 +162,9 @@
}
/**
- * Returns RSAPublicKey generated using ServerRSAParams
+ * Returns RSAPublicKey generated using ServerRSAParams
* (rsa_modulus and rsa_exponent).
- *
+ *
* @return
*/
public RSAPublicKey getRSAPublicKey() {
@@ -182,7 +182,7 @@
}
/**
- * Returns message type
+ * Returns message type
* @return
*/
@Override
diff --git a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
index c473864..1cbbcff 100644
--- a/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
+++ b/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
@@ -33,9 +33,9 @@
import javax.net.ssl.TrustManagerFactorySpi;
/**
- *
+ *
* TrustManagerFactory service provider interface implementation.
- *
+ *
* @see javax.net.ssl.TrustManagerFactorySpi
*/
public class TrustManagerFactoryImpl extends TrustManagerFactorySpi {
diff --git a/luni/src/main/java/org/w3c/dom/Attr.java b/luni/src/main/java/org/w3c/dom/Attr.java
index bd7267b..9440451 100644
--- a/luni/src/main/java/org/w3c/dom/Attr.java
+++ b/luni/src/main/java/org/w3c/dom/Attr.java
@@ -13,79 +13,79 @@
package org.w3c.dom;
/**
- * The <code>Attr</code> interface represents an attribute in an
- * <code>Element</code> object. Typically the allowable values for the
+ * The <code>Attr</code> interface represents an attribute in an
+ * <code>Element</code> object. Typically the allowable values for the
* attribute are defined in a schema associated with the document.
- * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
- * since they are not actually child nodes of the element they describe, the
- * DOM does not consider them part of the document tree. Thus, the
- * <code>Node</code> attributes <code>parentNode</code>,
- * <code>previousSibling</code>, and <code>nextSibling</code> have a
- * <code>null</code> value for <code>Attr</code> objects. The DOM takes the
- * view that attributes are properties of elements rather than having a
- * separate identity from the elements they are associated with; this should
- * make it more efficient to implement such features as default attributes
- * associated with all elements of a given type. Furthermore,
- * <code>Attr</code> nodes may not be immediate children of a
- * <code>DocumentFragment</code>. However, they can be associated with
- * <code>Element</code> nodes contained within a
- * <code>DocumentFragment</code>. In short, users and implementors of the
- * DOM need to be aware that <code>Attr</code> nodes have some things in
- * common with other objects inheriting the <code>Node</code> interface, but
+ * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
+ * since they are not actually child nodes of the element they describe, the
+ * DOM does not consider them part of the document tree. Thus, the
+ * <code>Node</code> attributes <code>parentNode</code>,
+ * <code>previousSibling</code>, and <code>nextSibling</code> have a
+ * <code>null</code> value for <code>Attr</code> objects. The DOM takes the
+ * view that attributes are properties of elements rather than having a
+ * separate identity from the elements they are associated with; this should
+ * make it more efficient to implement such features as default attributes
+ * associated with all elements of a given type. Furthermore,
+ * <code>Attr</code> nodes may not be immediate children of a
+ * <code>DocumentFragment</code>. However, they can be associated with
+ * <code>Element</code> nodes contained within a
+ * <code>DocumentFragment</code>. In short, users and implementors of the
+ * DOM need to be aware that <code>Attr</code> nodes have some things in
+ * common with other objects inheriting the <code>Node</code> interface, but
* they also are quite distinct.
- * <p>The attribute's effective value is determined as follows: if this
- * attribute has been explicitly assigned any value, that value is the
- * attribute's effective value; otherwise, if there is a declaration for
- * this attribute, and that declaration includes a default value, then that
- * default value is the attribute's effective value; otherwise, the
- * attribute does not exist on this element in the structure model until it
- * has been explicitly added. Note that the <code>Node.nodeValue</code>
- * attribute on the <code>Attr</code> instance can also be used to retrieve
+ * <p>The attribute's effective value is determined as follows: if this
+ * attribute has been explicitly assigned any value, that value is the
+ * attribute's effective value; otherwise, if there is a declaration for
+ * this attribute, and that declaration includes a default value, then that
+ * default value is the attribute's effective value; otherwise, the
+ * attribute does not exist on this element in the structure model until it
+ * has been explicitly added. Note that the <code>Node.nodeValue</code>
+ * attribute on the <code>Attr</code> instance can also be used to retrieve
* the string version of the attribute's value(s).
- * <p> If the attribute was not explicitly given a value in the instance
- * document but has a default value provided by the schema associated with
- * the document, an attribute node will be created with
- * <code>specified</code> set to <code>false</code>. Removing attribute
- * nodes for which a default value is defined in the schema generates a new
- * attribute node with the default value and <code>specified</code> set to
- * <code>false</code>. If validation occurred while invoking
- * <code>Document.normalizeDocument()</code>, attribute nodes with
- * <code>specified</code> equals to <code>false</code> are recomputed
- * according to the default attribute values provided by the schema. If no
- * default value is associate with this attribute in the schema, the
- * attribute node is discarded.
- * <p>In XML, where the value of an attribute can contain entity references,
- * the child nodes of the <code>Attr</code> node may be either
- * <code>Text</code> or <code>EntityReference</code> nodes (when these are
- * in use; see the description of <code>EntityReference</code> for
- * discussion).
- * <p>The DOM Core represents all attribute values as simple strings, even if
- * the DTD or schema associated with the document declares them of some
- * specific type such as tokenized.
- * <p>The way attribute value normalization is performed by the DOM
- * implementation depends on how much the implementation knows about the
- * schema in use. Typically, the <code>value</code> and
- * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
- * returns the normalized value given by the parser. It is also the case
- * after <code>Document.normalizeDocument()</code> is called (assuming the
- * right options have been set). But this may not be the case after
- * mutation, independently of whether the mutation is performed by setting
- * the string value directly or by changing the <code>Attr</code> child
- * nodes. In particular, this is true when <a href='http://www.w3.org/TR/2004/REC-xml-20040204#dt-charref'>character
- * references</a> are involved, given that they are not represented in the DOM and they
- * impact attribute value normalization. On the other hand, if the
- * implementation knows about the schema in use when the attribute value is
- * changed, and it is of a different type than CDATA, it may normalize it
- * again at that time. This is especially true of specialized DOM
- * implementations, such as SVG DOM implementations, which store attribute
+ * <p> If the attribute was not explicitly given a value in the instance
+ * document but has a default value provided by the schema associated with
+ * the document, an attribute node will be created with
+ * <code>specified</code> set to <code>false</code>. Removing attribute
+ * nodes for which a default value is defined in the schema generates a new
+ * attribute node with the default value and <code>specified</code> set to
+ * <code>false</code>. If validation occurred while invoking
+ * <code>Document.normalizeDocument()</code>, attribute nodes with
+ * <code>specified</code> equals to <code>false</code> are recomputed
+ * according to the default attribute values provided by the schema. If no
+ * default value is associate with this attribute in the schema, the
+ * attribute node is discarded.
+ * <p>In XML, where the value of an attribute can contain entity references,
+ * the child nodes of the <code>Attr</code> node may be either
+ * <code>Text</code> or <code>EntityReference</code> nodes (when these are
+ * in use; see the description of <code>EntityReference</code> for
+ * discussion).
+ * <p>The DOM Core represents all attribute values as simple strings, even if
+ * the DTD or schema associated with the document declares them of some
+ * specific type such as tokenized.
+ * <p>The way attribute value normalization is performed by the DOM
+ * implementation depends on how much the implementation knows about the
+ * schema in use. Typically, the <code>value</code> and
+ * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
+ * returns the normalized value given by the parser. It is also the case
+ * after <code>Document.normalizeDocument()</code> is called (assuming the
+ * right options have been set). But this may not be the case after
+ * mutation, independently of whether the mutation is performed by setting
+ * the string value directly or by changing the <code>Attr</code> child
+ * nodes. In particular, this is true when <a href='http://www.w3.org/TR/2004/REC-xml-20040204#dt-charref'>character
+ * references</a> are involved, given that they are not represented in the DOM and they
+ * impact attribute value normalization. On the other hand, if the
+ * implementation knows about the schema in use when the attribute value is
+ * changed, and it is of a different type than CDATA, it may normalize it
+ * again at that time. This is especially true of specialized DOM
+ * implementations, such as SVG DOM implementations, which store attribute
* values in an internal form different from a string.
- * <p>The following table gives some examples of the relations between the
- * attribute value in the original document (parsed attribute), the value as
- * exposed in the DOM, and the serialization of the value:
+ * <p>The following table gives some examples of the relations between the
+ * attribute value in the original document (parsed attribute), the value as
+ * exposed in the DOM, and the serialization of the value:
* <table border='1' cellpadding='3'>
* <tr>
* <th>Examples</th>
- * <th>Parsed
+ * <th>Parsed
* attribute value</th>
* <th>Initial <code>Attr.value</code></th>
* <th>Serialized attribute value</th>
@@ -104,7 +104,7 @@
* </td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>Built-in
+ * <td valign='top' rowspan='1' colspan='1'>Built-in
* character entity</td>
* <td valign='top' rowspan='1' colspan='1'>
* <pre>"y&lt;6"</pre>
@@ -132,7 +132,7 @@
* <tr>
* <td valign='top' rowspan='1' colspan='1'>Normalized newline between</td>
* <td valign='top' rowspan='1' colspan='1'>
- * <pre>"x=5
+ * <pre>"x=5
* y=6"</pre>
* </td>
* <td valign='top' rowspan='1' colspan='1'>
@@ -156,51 +156,51 @@
*/
public interface Attr extends Node {
/**
- * Returns the name of this attribute. If <code>Node.localName</code> is
+ * Returns the name of this attribute. If <code>Node.localName</code> is
* different from <code>null</code>, this attribute is a qualified name.
*/
public String getName();
/**
- * <code>True</code> if this attribute was explicitly given a value in
- * the instance document, <code>false</code> otherwise. If the
- * application changed the value of this attribute node (even if it ends
- * up having the same value as the default value) then it is set to
- * <code>true</code>. The implementation may handle attributes with
- * default values from other schemas similarly but applications should
- * use <code>Document.normalizeDocument()</code> to guarantee this
- * information is up-to-date.
+ * <code>True</code> if this attribute was explicitly given a value in
+ * the instance document, <code>false</code> otherwise. If the
+ * application changed the value of this attribute node (even if it ends
+ * up having the same value as the default value) then it is set to
+ * <code>true</code>. The implementation may handle attributes with
+ * default values from other schemas similarly but applications should
+ * use <code>Document.normalizeDocument()</code> to guarantee this
+ * information is up-to-date.
*/
public boolean getSpecified();
/**
- * On retrieval, the value of the attribute is returned as a string.
- * Character and general entity references are replaced with their
+ * On retrieval, the value of the attribute is returned as a string.
+ * Character and general entity references are replaced with their
* values. See also the method <code>getAttribute</code> on the
* <code>Element</code> interface.
- * <br>On setting, this creates a <code>Text</code> node with the unparsed
- * contents of the string, i.e. any characters that an XML processor
- * would recognize as markup are instead treated as literal text. See
+ * <br>On setting, this creates a <code>Text</code> node with the unparsed
+ * contents of the string, i.e. any characters that an XML processor
+ * would recognize as markup are instead treated as literal text. See
* also the method <code>Element.setAttribute()</code>.
- * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
- * implementations, may do normalization automatically, even after
- * mutation; in such case, the value on retrieval may differ from the
- * value on setting.
+ * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
+ * implementations, may do normalization automatically, even after
+ * mutation; in such case, the value on retrieval may differ from the
+ * value on setting.
*/
public String getValue();
/**
- * On retrieval, the value of the attribute is returned as a string.
- * Character and general entity references are replaced with their
- * values. See also the method <code>getAttribute</code> on the
+ * On retrieval, the value of the attribute is returned as a string.
+ * Character and general entity references are replaced with their
+ * values. See also the method <code>getAttribute</code> on the
* <code>Element</code> interface.
- * <br>On setting, this creates a <code>Text</code> node with the unparsed
- * contents of the string, i.e. any characters that an XML processor
- * would recognize as markup are instead treated as literal text. See
+ * <br>On setting, this creates a <code>Text</code> node with the unparsed
+ * contents of the string, i.e. any characters that an XML processor
+ * would recognize as markup are instead treated as literal text. See
* also the method <code>Element.setAttribute()</code>.
- * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
- * implementations, may do normalization automatically, even after
- * mutation; in such case, the value on retrieval may differ from the
- * value on setting.
+ * <br> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2003/REC-SVG11-20030114/'>SVG 1.1</a>]
+ * implementations, may do normalization automatically, even after
+ * mutation; in such case, the value on retrieval may differ from the
+ * value on setting.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
@@ -208,66 +208,66 @@
throws DOMException;
/**
- * The <code>Element</code> node this attribute is attached to or
+ * The <code>Element</code> node this attribute is attached to or
* <code>null</code> if this attribute is not in use.
* @since DOM Level 2
*/
public Element getOwnerElement();
/**
- * The type information associated with this attribute. While the type
- * information contained in this attribute is guarantee to be correct
- * after loading the document or invoking
+ * The type information associated with this attribute. While the type
+ * information contained in this attribute is guarantee to be correct
+ * after loading the document or invoking
* <code>Document.normalizeDocument()</code>, <code>schemaTypeInfo</code>
- * may not be reliable if the node was moved.
+ * may not be reliable if the node was moved.
* @since DOM Level 3
*/
public TypeInfo getSchemaTypeInfo();
/**
- * Returns whether this attribute is known to be of type ID (i.e. to
- * contain an identifier for its owner element) or not. When it is and
- * its value is unique, the <code>ownerElement</code> of this attribute
+ * Returns whether this attribute is known to be of type ID (i.e. to
+ * contain an identifier for its owner element) or not. When it is and
+ * its value is unique, the <code>ownerElement</code> of this attribute
* can be retrieved using the method <code>Document.getElementById</code>
- * . The implementation could use several ways to determine if an
- * attribute node is known to contain an identifier:
+ * . The implementation could use several ways to determine if an
+ * attribute node is known to contain an identifier:
* <ul>
- * <li> If validation
+ * <li> If validation
* occurred using an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * while loading the document or while invoking
- * <code>Document.normalizeDocument()</code>, the post-schema-validation
- * infoset contributions (PSVI contributions) values are used to
- * determine if this attribute is a schema-determined ID attribute using
+ * while loading the document or while invoking
+ * <code>Document.normalizeDocument()</code>, the post-schema-validation
+ * infoset contributions (PSVI contributions) values are used to
+ * determine if this attribute is a schema-determined ID attribute using
* the <a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#term-sdi'>
* schema-determined ID</a> definition in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * .
+ * .
* </li>
- * <li> If validation occurred using a DTD while loading the document or
- * while invoking <code>Document.normalizeDocument()</code>, the infoset <b>[type definition]</b> value is used to determine if this attribute is a DTD-determined ID
+ * <li> If validation occurred using a DTD while loading the document or
+ * while invoking <code>Document.normalizeDocument()</code>, the infoset <b>[type definition]</b> value is used to determine if this attribute is a DTD-determined ID
* attribute using the <a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/#term-ddi'>
* DTD-determined ID</a> definition in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * .
+ * .
* </li>
- * <li> from the use of the methods <code>Element.setIdAttribute()</code>,
- * <code>Element.setIdAttributeNS()</code>, or
- * <code>Element.setIdAttributeNode()</code>, i.e. it is an
- * user-determined ID attribute;
+ * <li> from the use of the methods <code>Element.setIdAttribute()</code>,
+ * <code>Element.setIdAttributeNS()</code>, or
+ * <code>Element.setIdAttributeNode()</code>, i.e. it is an
+ * user-determined ID attribute;
* <p ><b>Note:</b> XPointer framework (see section 3.2 in [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * ) consider the DOM user-determined ID attribute as being part of the
- * XPointer externally-determined ID definition.
+ * ) consider the DOM user-determined ID attribute as being part of the
+ * XPointer externally-determined ID definition.
* </li>
- * <li> using mechanisms that
- * are outside the scope of this specification, it is then an
- * externally-determined ID attribute. This includes using schema
- * languages different from XML schema and DTD.
+ * <li> using mechanisms that
+ * are outside the scope of this specification, it is then an
+ * externally-determined ID attribute. This includes using schema
+ * languages different from XML schema and DTD.
* </li>
* </ul>
- * <br> If validation occurred while invoking
- * <code>Document.normalizeDocument()</code>, all user-determined ID
- * attributes are reset and all attribute nodes ID information are then
- * reevaluated in accordance to the schema used. As a consequence, if
- * the <code>Attr.schemaTypeInfo</code> attribute contains an ID type,
- * <code>isId</code> will always return true.
+ * <br> If validation occurred while invoking
+ * <code>Document.normalizeDocument()</code>, all user-determined ID
+ * attributes are reset and all attribute nodes ID information are then
+ * reevaluated in accordance to the schema used. As a consequence, if
+ * the <code>Attr.schemaTypeInfo</code> attribute contains an ID type,
+ * <code>isId</code> will always return true.
* @since DOM Level 3
*/
public boolean isId();
diff --git a/luni/src/main/java/org/w3c/dom/CDATASection.java b/luni/src/main/java/org/w3c/dom/CDATASection.java
index 9267227..ce4b346 100644
--- a/luni/src/main/java/org/w3c/dom/CDATASection.java
+++ b/luni/src/main/java/org/w3c/dom/CDATASection.java
@@ -13,40 +13,40 @@
package org.w3c.dom;
/**
- * CDATA sections are used to escape blocks of text containing characters that
- * would otherwise be regarded as markup. The only delimiter that is
- * recognized in a CDATA section is the "]]>" string that ends the CDATA
- * section. CDATA sections cannot be nested. Their primary purpose is for
- * including material such as XML fragments, without needing to escape all
+ * CDATA sections are used to escape blocks of text containing characters that
+ * would otherwise be regarded as markup. The only delimiter that is
+ * recognized in a CDATA section is the "]]>" string that ends the CDATA
+ * section. CDATA sections cannot be nested. Their primary purpose is for
+ * including material such as XML fragments, without needing to escape all
* the delimiters.
- * <p>The <code>CharacterData.data</code> attribute holds the text that is
- * contained by the CDATA section. Note that this <em>may</em> contain characters that need to be escaped outside of CDATA sections and
- * that, depending on the character encoding ("charset") chosen for
- * serialization, it may be impossible to write out some characters as part
+ * <p>The <code>CharacterData.data</code> attribute holds the text that is
+ * contained by the CDATA section. Note that this <em>may</em> contain characters that need to be escaped outside of CDATA sections and
+ * that, depending on the character encoding ("charset") chosen for
+ * serialization, it may be impossible to write out some characters as part
* of a CDATA section.
- * <p>The <code>CDATASection</code> interface inherits from the
- * <code>CharacterData</code> interface through the <code>Text</code>
- * interface. Adjacent <code>CDATASection</code> nodes are not merged by use
+ * <p>The <code>CDATASection</code> interface inherits from the
+ * <code>CharacterData</code> interface through the <code>Text</code>
+ * interface. Adjacent <code>CDATASection</code> nodes are not merged by use
* of the <code>normalize</code> method of the <code>Node</code> interface.
- * <p> No lexical check is done on the content of a CDATA section and it is
- * therefore possible to have the character sequence <code>"]]>"</code>
- * in the content, which is illegal in a CDATA section per section 2.7 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
- * presence of this character sequence must generate a fatal error during
- * serialization or the cdata section must be splitted before the
- * serialization (see also the parameter <code>"split-cdata-sections"</code>
- * in the <code>DOMConfiguration</code> interface).
- * <p ><b>Note:</b> Because no markup is recognized within a
- * <code>CDATASection</code>, character numeric references cannot be used as
- * an escape mechanism when serializing. Therefore, action needs to be taken
- * when serializing a <code>CDATASection</code> with a character encoding
- * where some of the contained characters cannot be represented. Failure to
+ * <p> No lexical check is done on the content of a CDATA section and it is
+ * therefore possible to have the character sequence <code>"]]>"</code>
+ * in the content, which is illegal in a CDATA section per section 2.7 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
+ * presence of this character sequence must generate a fatal error during
+ * serialization or the cdata section must be splitted before the
+ * serialization (see also the parameter <code>"split-cdata-sections"</code>
+ * in the <code>DOMConfiguration</code> interface).
+ * <p ><b>Note:</b> Because no markup is recognized within a
+ * <code>CDATASection</code>, character numeric references cannot be used as
+ * an escape mechanism when serializing. Therefore, action needs to be taken
+ * when serializing a <code>CDATASection</code> with a character encoding
+ * where some of the contained characters cannot be represented. Failure to
* do so would not produce well-formed XML.
- * <p ><b>Note:</b> One potential solution in the serialization process is to
- * end the CDATA section before the character, output the character using a
- * character reference or entity reference, and open a new CDATA section for
- * any further characters in the text node. Note, however, that some code
- * conversion libraries at the time of writing do not return an error or
- * exception when a character is missing from the encoding, making the task
+ * <p ><b>Note:</b> One potential solution in the serialization process is to
+ * end the CDATA section before the character, output the character using a
+ * character reference or entity reference, and open a new CDATA section for
+ * any further characters in the text node. Note, however, that some code
+ * conversion libraries at the time of writing do not return an error or
+ * exception when a character is missing from the encoding, making the task
* of ensuring that data is not corrupted on serialization more difficult.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
diff --git a/luni/src/main/java/org/w3c/dom/CharacterData.java b/luni/src/main/java/org/w3c/dom/CharacterData.java
index a12dced..37aa8df 100644
--- a/luni/src/main/java/org/w3c/dom/CharacterData.java
+++ b/luni/src/main/java/org/w3c/dom/CharacterData.java
@@ -13,42 +13,42 @@
package org.w3c.dom;
/**
- * The <code>CharacterData</code> interface extends Node with a set of
- * attributes and methods for accessing character data in the DOM. For
- * clarity this set is defined here rather than on each object that uses
- * these attributes and methods. No DOM objects correspond directly to
- * <code>CharacterData</code>, though <code>Text</code> and others do
- * inherit the interface from it. All <code>offsets</code> in this interface
+ * The <code>CharacterData</code> interface extends Node with a set of
+ * attributes and methods for accessing character data in the DOM. For
+ * clarity this set is defined here rather than on each object that uses
+ * these attributes and methods. No DOM objects correspond directly to
+ * <code>CharacterData</code>, though <code>Text</code> and others do
+ * inherit the interface from it. All <code>offsets</code> in this interface
* start from <code>0</code>.
- * <p>As explained in the <code>DOMString</code> interface, text strings in
- * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In
- * the following, the term 16-bit units is used whenever necessary to
+ * <p>As explained in the <code>DOMString</code> interface, text strings in
+ * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In
+ * the following, the term 16-bit units is used whenever necessary to
* indicate that indexing on CharacterData is done in 16-bit units.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface CharacterData extends Node {
/**
- * The character data of the node that implements this interface. The DOM
- * implementation may not put arbitrary limits on the amount of data
- * that may be stored in a <code>CharacterData</code> node. However,
- * implementation limits may mean that the entirety of a node's data may
- * not fit into a single <code>DOMString</code>. In such cases, the user
- * may call <code>substringData</code> to retrieve the data in
+ * The character data of the node that implements this interface. The DOM
+ * implementation may not put arbitrary limits on the amount of data
+ * that may be stored in a <code>CharacterData</code> node. However,
+ * implementation limits may mean that the entirety of a node's data may
+ * not fit into a single <code>DOMString</code>. In such cases, the user
+ * may call <code>substringData</code> to retrieve the data in
* appropriately sized pieces.
* @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
+ * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
+ * fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public String getData()
throws DOMException;
/**
- * The character data of the node that implements this interface. The DOM
- * implementation may not put arbitrary limits on the amount of data
- * that may be stored in a <code>CharacterData</code> node. However,
- * implementation limits may mean that the entirety of a node's data may
- * not fit into a single <code>DOMString</code>. In such cases, the user
- * may call <code>substringData</code> to retrieve the data in
+ * The character data of the node that implements this interface. The DOM
+ * implementation may not put arbitrary limits on the amount of data
+ * that may be stored in a <code>CharacterData</code> node. However,
+ * implementation limits may mean that the entirety of a node's data may
+ * not fit into a single <code>DOMString</code>. In such cases, the user
+ * may call <code>substringData</code> to retrieve the data in
* appropriately sized pieces.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
@@ -57,8 +57,8 @@
throws DOMException;
/**
- * The number of 16-bit units that are available through <code>data</code>
- * and the <code>substringData</code> method below. This may have the
+ * The number of 16-bit units that are available through <code>data</code>
+ * and the <code>substringData</code> method below. This may have the
* value zero, i.e., <code>CharacterData</code> nodes may be empty.
*/
public int getLength();
@@ -67,24 +67,24 @@
* Extracts a range of data from the node.
* @param offset Start offset of substring to extract.
* @param count The number of 16-bit units to extract.
- * @return The specified substring. If the sum of <code>offset</code> and
- * <code>count</code> exceeds the <code>length</code>, then all 16-bit
+ * @return The specified substring. If the sum of <code>offset</code> and
+ * <code>count</code> exceeds the <code>length</code>, then all 16-bit
* units to the end of the data are returned.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * negative or greater than the number of 16-bit units in
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
- * <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does
+ * <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does
* not fit into a <code>DOMString</code>.
*/
- public String substringData(int offset,
+ public String substringData(int offset,
int count)
throws DOMException;
/**
- * Append the string to the end of the character data of the node. Upon
- * success, <code>data</code> provides access to the concatenation of
+ * Append the string to the end of the character data of the node. Upon
+ * success, <code>data</code> provides access to the concatenation of
* <code>data</code> and the <code>DOMString</code> specified.
* @param arg The <code>DOMString</code> to append.
* @exception DOMException
@@ -98,55 +98,55 @@
* @param offset The character offset at which to insert.
* @param arg The <code>DOMString</code> to insert.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * negative or greater than the number of 16-bit units in
* <code>data</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
- public void insertData(int offset,
+ public void insertData(int offset,
String arg)
throws DOMException;
/**
- * Remove a range of 16-bit units from the node. Upon success,
+ * Remove a range of 16-bit units from the node. Upon success,
* <code>data</code> and <code>length</code> reflect the change.
* @param offset The offset from which to start removing.
- * @param count The number of 16-bit units to delete. If the sum of
- * <code>offset</code> and <code>count</code> exceeds
- * <code>length</code> then all 16-bit units from <code>offset</code>
+ * @param count The number of 16-bit units to delete. If the sum of
+ * <code>offset</code> and <code>count</code> exceeds
+ * <code>length</code> then all 16-bit units from <code>offset</code>
* to the end of the data are deleted.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * negative or greater than the number of 16-bit units in
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
- public void deleteData(int offset,
+ public void deleteData(int offset,
int count)
throws DOMException;
/**
- * Replace the characters starting at the specified 16-bit unit offset
+ * Replace the characters starting at the specified 16-bit unit offset
* with the specified string.
* @param offset The offset from which to start replacing.
- * @param count The number of 16-bit units to replace. If the sum of
- * <code>offset</code> and <code>count</code> exceeds
- * <code>length</code>, then all 16-bit units to the end of the data
+ * @param count The number of 16-bit units to replace. If the sum of
+ * <code>offset</code> and <code>count</code> exceeds
+ * <code>length</code>, then all 16-bit units to the end of the data
* are replaced; (i.e., the effect is the same as a <code>remove</code>
* method call with the same range, followed by an <code>append</code>
* method invocation).
- * @param arg The <code>DOMString</code> with which the range must be
+ * @param arg The <code>DOMString</code> with which the range must be
* replaced.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
- * negative or greater than the number of 16-bit units in
- * <code>data</code>, or if the specified <code>count</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * negative or greater than the number of 16-bit units in
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
- public void replaceData(int offset,
- int count,
+ public void replaceData(int offset,
+ int count,
String arg)
throws DOMException;
diff --git a/luni/src/main/java/org/w3c/dom/Comment.java b/luni/src/main/java/org/w3c/dom/Comment.java
index b04ed4d..40b7527 100644
--- a/luni/src/main/java/org/w3c/dom/Comment.java
+++ b/luni/src/main/java/org/w3c/dom/Comment.java
@@ -13,17 +13,17 @@
package org.w3c.dom;
/**
- * This interface inherits from <code>CharacterData</code> and represents the
+ * This interface inherits from <code>CharacterData</code> and represents the
* content of a comment, i.e., all the characters between the starting '
- * <code><!--</code>' and ending '<code>--></code>'. Note that this is
- * the definition of a comment in XML, and, in practice, HTML, although some
- * HTML tools may implement the full SGML comment structure.
- * <p> No lexical check is done on the content of a comment and it is
- * therefore possible to have the character sequence <code>"--"</code>
- * (double-hyphen) in the content, which is illegal in a comment per section
- * 2.5 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
- * presence of this character sequence must generate a fatal error during
- * serialization.
+ * <code><!--</code>' and ending '<code>--></code>'. Note that this is
+ * the definition of a comment in XML, and, in practice, HTML, although some
+ * HTML tools may implement the full SGML comment structure.
+ * <p> No lexical check is done on the content of a comment and it is
+ * therefore possible to have the character sequence <code>"--"</code>
+ * (double-hyphen) in the content, which is illegal in a comment per section
+ * 2.5 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
+ * presence of this character sequence must generate a fatal error during
+ * serialization.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Comment extends CharacterData {
diff --git a/luni/src/main/java/org/w3c/dom/DOMConfiguration.java b/luni/src/main/java/org/w3c/dom/DOMConfiguration.java
index 7cce160..d052578 100644
--- a/luni/src/main/java/org/w3c/dom/DOMConfiguration.java
+++ b/luni/src/main/java/org/w3c/dom/DOMConfiguration.java
@@ -13,47 +13,47 @@
package org.w3c.dom;
/**
- * The <code>DOMConfiguration</code> interface represents the configuration
- * of a document and maintains a table of recognized parameters. Using the
- * configuration, it is possible to change
- * <code>Document.normalizeDocument()</code> behavior, such as replacing the
- * <code>CDATASection</code> nodes with <code>Text</code> nodes or
- * specifying the type of the schema that must be used when the validation
- * of the <code>Document</code> is requested. <code>DOMConfiguration</code>
+ * The <code>DOMConfiguration</code> interface represents the configuration
+ * of a document and maintains a table of recognized parameters. Using the
+ * configuration, it is possible to change
+ * <code>Document.normalizeDocument()</code> behavior, such as replacing the
+ * <code>CDATASection</code> nodes with <code>Text</code> nodes or
+ * specifying the type of the schema that must be used when the validation
+ * of the <code>Document</code> is requested. <code>DOMConfiguration</code>
* objects are also used in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>DOM Level 3 Load and Save</a>]
- * in the <code>DOMParser</code> and <code>DOMSerializer</code> interfaces.
- * <p> The parameter names used by the <code>DOMConfiguration</code> object
- * are defined throughout the DOM Level 3 specifications. Names are
- * case-insensitive. To avoid possible conflicts, as a convention, names
- * referring to parameters defined outside the DOM specification should be
- * made unique. Because parameters are exposed as properties in the , names
- * are recommended to follow the section 5.16 Identifiers of [Unicode] with the addition of the character '-' (HYPHEN-MINUS) but it is not
- * enforced by the DOM implementation. DOM Level 3 Core Implementations are
- * required to recognize all parameters defined in this specification. Some
- * parameter values may also be required to be supported by the
- * implementation. Refer to the definition of the parameter to know if a
- * value must be supported or not.
- * <p ><b>Note:</b> Parameters are similar to features and properties used in
- * SAX2 [<a href='http://www.saxproject.org/'>SAX</a>].
- * <p> The following list of parameters defined in the DOM:
+ * in the <code>DOMParser</code> and <code>DOMSerializer</code> interfaces.
+ * <p> The parameter names used by the <code>DOMConfiguration</code> object
+ * are defined throughout the DOM Level 3 specifications. Names are
+ * case-insensitive. To avoid possible conflicts, as a convention, names
+ * referring to parameters defined outside the DOM specification should be
+ * made unique. Because parameters are exposed as properties in the , names
+ * are recommended to follow the section 5.16 Identifiers of [Unicode] with the addition of the character '-' (HYPHEN-MINUS) but it is not
+ * enforced by the DOM implementation. DOM Level 3 Core Implementations are
+ * required to recognize all parameters defined in this specification. Some
+ * parameter values may also be required to be supported by the
+ * implementation. Refer to the definition of the parameter to know if a
+ * value must be supported or not.
+ * <p ><b>Note:</b> Parameters are similar to features and properties used in
+ * SAX2 [<a href='http://www.saxproject.org/'>SAX</a>].
+ * <p> The following list of parameters defined in the DOM:
* <dl>
* <dt>
* <code>"canonical-form"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] Canonicalize the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>],
- * such as removing the <code>DocumentType</code> node (if any) from the
- * tree, or removing superfluous namespace declarations from each element.
- * Note that this is limited to what can be represented in the DOM; in
- * particular, there is no way to specify the order of the attributes in the
- * DOM. In addition, Setting this parameter to <code>true</code> will also
- * set the state of the parameters listed below. Later changes to the state
- * of one of those parameters will revert "canonical-form" back to
+ * <dd>[<em>optional</em>] Canonicalize the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>],
+ * such as removing the <code>DocumentType</code> node (if any) from the
+ * tree, or removing superfluous namespace declarations from each element.
+ * Note that this is limited to what can be represented in the DOM; in
+ * particular, there is no way to specify the order of the attributes in the
+ * DOM. In addition, Setting this parameter to <code>true</code> will also
+ * set the state of the parameters listed below. Later changes to the state
+ * of one of those parameters will revert "canonical-form" back to
* <code>false</code>. Parameters set to <code>false</code>: "entities", "
- * normalize-characters", "cdata-sections". Parameters set to
- * <code>true</code>: "namespaces", "namespace-declarations", "well-formed",
- * "element-content-whitespace". Other parameters are not changed unless
+ * normalize-characters", "cdata-sections". Parameters set to
+ * <code>true</code>: "namespaces", "namespace-declarations", "well-formed",
+ * "element-content-whitespace". Other parameters are not changed unless
* explicitly specified in the description of the parameters.</dd>
* <dt>
* <code>false</code></dt>
@@ -66,8 +66,8 @@
* <code>true</code></dt>
* <dd>[<em>required</em>] (<em>default</em>)Keep <code>CDATASection</code> nodes in the document.</dd>
* <dt><code>false</code></dt>
- * <dd>[<em>required</em>]Transform <code>CDATASection</code> nodes in the document into
- * <code>Text</code> nodes. The new <code>Text</code> node is then combined
+ * <dd>[<em>required</em>]Transform <code>CDATASection</code> nodes in the document into
+ * <code>Text</code> nodes. The new <code>Text</code> node is then combined
* with any adjacent <code>Text</code> node.</dd>
* </dl></dd>
* <dt>
@@ -75,10 +75,10 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] Check if the characters in the document are <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
- * normalized</a>, as defined in appendix B of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. When a
- * sequence of characters is encountered that fails normalization checking,
- * an error with the <code>DOMError.type</code> equals to
+ * <dd>[<em>optional</em>] Check if the characters in the document are <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
+ * normalized</a>, as defined in appendix B of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. When a
+ * sequence of characters is encountered that fails normalization checking,
+ * an error with the <code>DOMError.type</code> equals to
* "check-character-normalization-failure" is issued. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>)Do not check if characters are normalized.</dd>
@@ -97,14 +97,14 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] Expose schema normalized values in the tree, such as <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-nv'>XML
- * Schema normalized values</a> in the case of XML Schema. Since this parameter requires to have schema
- * information, the "validate" parameter will also be set to
- * <code>true</code>. Having this parameter activated when "validate" is
- * <code>false</code> has no effect and no schema-normalization will happen.
- * <p ><b>Note:</b> Since the document contains the result of the XML 1.0
- * processing, this parameter does not apply to attribute value
- * normalization as defined in section 3.3.3 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] and is only
+ * <dd>[<em>optional</em>] Expose schema normalized values in the tree, such as <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-nv'>XML
+ * Schema normalized values</a> in the case of XML Schema. Since this parameter requires to have schema
+ * information, the "validate" parameter will also be set to
+ * <code>true</code>. Having this parameter activated when "validate" is
+ * <code>false</code> has no effect and no schema-normalization will happen.
+ * <p ><b>Note:</b> Since the document contains the result of the XML 1.0
+ * processing, this parameter does not apply to attribute value
+ * normalization as defined in section 3.3.3 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] and is only
* meant for schema languages other than Document Type Definition (DTD). </dd>
* <dt>
* <code>false</code></dt>
@@ -117,10 +117,10 @@
* <dt><code>true</code></dt>
* <dd>[<em>required</em>] (<em>default</em>)Keep all whitespaces in the document.</dd>
* <dt><code>false</code></dt>
- * <dd>[<em>optional</em>] Discard all <code>Text</code> nodes that contain whitespaces in element
+ * <dd>[<em>optional</em>] Discard all <code>Text</code> nodes that contain whitespaces in element
* content, as described in <a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204#infoitem.character'>
- * [element content whitespace]</a>. The implementation is expected to use the attribute
- * <code>Text.isElementContentWhitespace</code> to determine if a
+ * [element content whitespace]</a>. The implementation is expected to use the attribute
+ * <code>Text.isElementContentWhitespace</code> to determine if a
* <code>Text</code> node should be discarded or not.</dd>
* </dl></dd>
* <dt><code>"entities"</code></dt>
@@ -131,23 +131,23 @@
* <dd>[<em>required</em>] (<em>default</em>)Keep <code>EntityReference</code> nodes in the document.</dd>
* <dt>
* <code>false</code></dt>
- * <dd>[<em>required</em>] Remove all <code>EntityReference</code> nodes from the document,
- * putting the entity expansions directly in their place. <code>Text</code>
+ * <dd>[<em>required</em>] Remove all <code>EntityReference</code> nodes from the document,
+ * putting the entity expansions directly in their place. <code>Text</code>
* nodes are normalized, as defined in <code>Node.normalize</code>. Only <a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.rse'>
* unexpanded entity references</a> are kept in the document. </dd>
* </dl>
* <p ><b>Note:</b> This parameter does not affect <code>Entity</code> nodes. </dd>
* <dt>
* <code>"error-handler"</code></dt>
- * <dd>[<em>required</em>] Contains a <code>DOMErrorHandler</code> object. If an error is
- * encountered in the document, the implementation will call back the
- * <code>DOMErrorHandler</code> registered using this parameter. The
- * implementation may provide a default <code>DOMErrorHandler</code> object.
- * When called, <code>DOMError.relatedData</code> will contain the closest
- * node to where the error occurred. If the implementation is unable to
- * determine the node where the error occurs,
- * <code>DOMError.relatedData</code> will contain the <code>Document</code>
- * node. Mutations to the document from within an error handler will result
+ * <dd>[<em>required</em>] Contains a <code>DOMErrorHandler</code> object. If an error is
+ * encountered in the document, the implementation will call back the
+ * <code>DOMErrorHandler</code> registered using this parameter. The
+ * implementation may provide a default <code>DOMErrorHandler</code> object.
+ * When called, <code>DOMError.relatedData</code> will contain the closest
+ * node to where the error occurred. If the implementation is unable to
+ * determine the node where the error occurs,
+ * <code>DOMError.relatedData</code> will contain the <code>Document</code>
+ * node. Mutations to the document from within an error handler will result
* in implementation dependent behavior. </dd>
* <dt><code>"infoset"</code></dt>
* <dd>
@@ -159,13 +159,13 @@
* validate-if-schema", "entities", "datatype-normalization", "cdata-sections
* ".This forces the following parameters to <code>true</code>: "
* namespace-declarations", "well-formed", "element-content-whitespace", "
- * comments", "namespaces".Other parameters are not changed unless
- * explicitly specified in the description of the parameters. Note that
- * querying this parameter with <code>getParameter</code> returns
- * <code>true</code> only if the individual parameters specified above are
+ * comments", "namespaces".Other parameters are not changed unless
+ * explicitly specified in the description of the parameters. Note that
+ * querying this parameter with <code>getParameter</code> returns
+ * <code>true</code> only if the individual parameters specified above are
* appropriately set.</dd>
* <dt><code>false</code></dt>
- * <dd>Setting <code>infoset</code> to
+ * <dd>Setting <code>infoset</code> to
* <code>false</code> has no effect.</dd>
* </dl></dd>
* <dt><code>"namespaces"</code></dt>
@@ -179,119 +179,119 @@
* </dl></dd>
* <dt>
* <code>"namespace-declarations"</code></dt>
- * <dd> This parameter has no effect if the
- * parameter "namespaces" is set to <code>false</code>.
+ * <dd> This parameter has no effect if the
+ * parameter "namespaces" is set to <code>false</code>.
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) Include namespace declaration attributes, specified or defaulted from
- * the schema, in the document. See also the sections "Declaring Namespaces"
+ * <dd>[<em>required</em>] (<em>default</em>) Include namespace declaration attributes, specified or defaulted from
+ * the schema, in the document. See also the sections "Declaring Namespaces"
* in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
* and [<a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/'>XML Namespaces 1.1</a>]
* .</dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>]Discard all namespace declaration attributes. The namespace prefixes (
- * <code>Node.prefix</code>) are retained even if this parameter is set to
+ * <code>Node.prefix</code>) are retained even if this parameter is set to
* <code>false</code>.</dd>
* </dl></dd>
* <dt><code>"normalize-characters"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>Fully
+ * <dd>[<em>optional</em>] <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>Fully
* normalized</a> the characters in the document as defined in appendix B of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. </dd>
* <dt>
* <code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>)Do not perform character normalization.</dd>
* </dl></dd>
* <dt><code>"schema-location"</code></dt>
- * <dd>[<em>optional</em>] Represent a <code>DOMString</code> object containing a list of URIs,
- * separated by whitespaces (characters matching the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-S'>nonterminal
- * production S</a> defined in section 2.3 [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), that
- * represents the schemas against which validation should occur, i.e. the
- * current schema. The types of schemas referenced in this list must match
- * the type specified with <code>schema-type</code>, otherwise the behavior
- * of an implementation is undefined. The schemas specified using this
- * property take precedence to the schema information specified in the
- * document itself. For namespace aware schema, if a schema specified using
- * this property and a schema specified in the document instance (i.e. using
- * the <code>schemaLocation</code> attribute) in a schema document (i.e.
- * using schema <code>import</code> mechanisms) share the same
- * <code>targetNamespace</code>, the schema specified by the user using this
- * property will be used. If two schemas specified using this property share
- * the same <code>targetNamespace</code> or have no namespace, the behavior
- * is implementation dependent. If no location has been provided, this
- * parameter is <code>null</code>.
- * <p ><b>Note:</b> The <code>"schema-location"</code> parameter is ignored
- * unless the "schema-type" parameter value is set. It is strongly
- * recommended that <code>Document.documentURI</code> will be set so that an
+ * <dd>[<em>optional</em>] Represent a <code>DOMString</code> object containing a list of URIs,
+ * separated by whitespaces (characters matching the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-S'>nonterminal
+ * production S</a> defined in section 2.3 [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), that
+ * represents the schemas against which validation should occur, i.e. the
+ * current schema. The types of schemas referenced in this list must match
+ * the type specified with <code>schema-type</code>, otherwise the behavior
+ * of an implementation is undefined. The schemas specified using this
+ * property take precedence to the schema information specified in the
+ * document itself. For namespace aware schema, if a schema specified using
+ * this property and a schema specified in the document instance (i.e. using
+ * the <code>schemaLocation</code> attribute) in a schema document (i.e.
+ * using schema <code>import</code> mechanisms) share the same
+ * <code>targetNamespace</code>, the schema specified by the user using this
+ * property will be used. If two schemas specified using this property share
+ * the same <code>targetNamespace</code> or have no namespace, the behavior
+ * is implementation dependent. If no location has been provided, this
+ * parameter is <code>null</code>.
+ * <p ><b>Note:</b> The <code>"schema-location"</code> parameter is ignored
+ * unless the "schema-type" parameter value is set. It is strongly
+ * recommended that <code>Document.documentURI</code> will be set so that an
* implementation can successfully resolve any external entities referenced. </dd>
* <dt>
* <code>"schema-type"</code></dt>
- * <dd>[<em>optional</em>] Represent a <code>DOMString</code> object containing an absolute URI
- * and representing the type of the schema language used to validate a
- * document against. Note that no lexical checking is done on the absolute
- * URI. If this parameter is not set, a default value may be provided by
- * the implementation, based on the schema languages supported and on the
- * schema language used at load time. If no value is provided, this
- * parameter is <code>null</code>.
+ * <dd>[<em>optional</em>] Represent a <code>DOMString</code> object containing an absolute URI
+ * and representing the type of the schema language used to validate a
+ * document against. Note that no lexical checking is done on the absolute
+ * URI. If this parameter is not set, a default value may be provided by
+ * the implementation, based on the schema languages supported and on the
+ * schema language used at load time. If no value is provided, this
+ * parameter is <code>null</code>.
* <p ><b>Note:</b> For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * , applications must use the value
- * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
- * applications must use the value
- * <code>"http://www.w3.org/TR/REC-xml"</code>. Other schema languages are
- * outside the scope of the W3C and therefore should recommend an absolute
+ * , applications must use the value
+ * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
+ * applications must use the value
+ * <code>"http://www.w3.org/TR/REC-xml"</code>. Other schema languages are
+ * outside the scope of the W3C and therefore should recommend an absolute
* URI in order to use this method. </dd>
* <dt><code>"split-cdata-sections"</code></dt>
* <dd>
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>)Split CDATA sections containing the CDATA section termination marker
- * ']]>'. When a CDATA section is split a warning is issued with a
- * <code>DOMError.type</code> equals to
- * <code>"cdata-sections-splitted"</code> and
- * <code>DOMError.relatedData</code> equals to the first
+ * <dd>[<em>required</em>] (<em>default</em>)Split CDATA sections containing the CDATA section termination marker
+ * ']]>'. When a CDATA section is split a warning is issued with a
+ * <code>DOMError.type</code> equals to
+ * <code>"cdata-sections-splitted"</code> and
+ * <code>DOMError.relatedData</code> equals to the first
* <code>CDATASection</code> node in document order resulting from the split.</dd>
* <dt>
* <code>false</code></dt>
- * <dd>[<em>required</em>]Signal an error if a <code>CDATASection</code> contains an
+ * <dd>[<em>required</em>]Signal an error if a <code>CDATASection</code> contains an
* unrepresentable character.</dd>
* </dl></dd>
* <dt><code>"validate"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] Require the validation against a schema (i.e. XML schema, DTD, any
- * other type or representation of schema) of the document as it is being
- * normalized as defined by [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. If
- * validation errors are found, or no schema was found, the error handler is
- * notified. Schema-normalized values will not be exposed according to the
- * schema in used unless the parameter "datatype-normalization" is
- * <code>true</code>. This parameter will reevaluate:
+ * <dd>[<em>optional</em>] Require the validation against a schema (i.e. XML schema, DTD, any
+ * other type or representation of schema) of the document as it is being
+ * normalized as defined by [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. If
+ * validation errors are found, or no schema was found, the error handler is
+ * notified. Schema-normalized values will not be exposed according to the
+ * schema in used unless the parameter "datatype-normalization" is
+ * <code>true</code>. This parameter will reevaluate:
* <ul>
- * <li> Attribute nodes with
- * <code>Attr.specified</code> equals to <code>false</code>, as specified in
- * the description of the <code>Attr</code> interface;
+ * <li> Attribute nodes with
+ * <code>Attr.specified</code> equals to <code>false</code>, as specified in
+ * the description of the <code>Attr</code> interface;
* </li>
- * <li> The value of the
- * attribute <code>Text.isElementContentWhitespace</code> for all
- * <code>Text</code> nodes;
+ * <li> The value of the
+ * attribute <code>Text.isElementContentWhitespace</code> for all
+ * <code>Text</code> nodes;
* </li>
- * <li> The value of the attribute
- * <code>Attr.isId</code> for all <code>Attr</code> nodes;
+ * <li> The value of the attribute
+ * <code>Attr.isId</code> for all <code>Attr</code> nodes;
* </li>
- * <li> The attributes
- * <code>Element.schemaTypeInfo</code> and <code>Attr.schemaTypeInfo</code>.
+ * <li> The attributes
+ * <code>Element.schemaTypeInfo</code> and <code>Attr.schemaTypeInfo</code>.
* </li>
* </ul>
- * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually
- * exclusive, setting one of them to <code>true</code> will set the other
- * one to <code>false</code>. Applications should also consider setting the
- * parameter "well-formed" to <code>true</code>, which is the default for
+ * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually
+ * exclusive, setting one of them to <code>true</code> will set the other
+ * one to <code>false</code>. Applications should also consider setting the
+ * parameter "well-formed" to <code>true</code>, which is the default for
* that option, when validating the document. </dd>
* <dt><code>false</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) Do not accomplish schema processing, including the internal subset
- * processing. Default attribute values information are kept. Note that
+ * <dd>[<em>required</em>] (<em>default</em>) Do not accomplish schema processing, including the internal subset
+ * processing. Default attribute values information are kept. Note that
* validation might still happen if "validate-if-schema" is <code>true</code>
* . </dd>
* </dl></dd>
@@ -299,17 +299,17 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>]Enable validation only if a declaration for the document element can be
- * found in a schema (independently of where it is found, i.e. XML schema,
- * DTD, or any other type or representation of schema). If validation is
- * enabled, this parameter has the same behavior as the parameter "validate"
- * set to <code>true</code>.
- * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually
- * exclusive, setting one of them to <code>true</code> will set the other
+ * <dd>[<em>optional</em>]Enable validation only if a declaration for the document element can be
+ * found in a schema (independently of where it is found, i.e. XML schema,
+ * DTD, or any other type or representation of schema). If validation is
+ * enabled, this parameter has the same behavior as the parameter "validate"
+ * set to <code>true</code>.
+ * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually
+ * exclusive, setting one of them to <code>true</code> will set the other
* one to <code>false</code>. </dd>
* <dt><code>false</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) No schema processing should be performed if the document has a schema,
- * including internal subset processing. Default attribute values
+ * <dd>[<em>required</em>] (<em>default</em>) No schema processing should be performed if the document has a schema,
+ * including internal subset processing. Default attribute values
* information are kept. Note that validation must still happen if "validate
* " is <code>true</code>. </dd>
* </dl></dd>
@@ -317,27 +317,27 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) Check if all nodes are XML well formed according to the XML version in
- * use in <code>Document.xmlVersion</code>:
+ * <dd>[<em>required</em>] (<em>default</em>) Check if all nodes are XML well formed according to the XML version in
+ * use in <code>Document.xmlVersion</code>:
* <ul>
- * <li> check if the attribute
- * <code>Node.nodeName</code> contains invalid characters according to its
- * node type and generate a <code>DOMError</code> of type
- * <code>"wf-invalid-character-in-node-name"</code>, with a
- * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
+ * <li> check if the attribute
+ * <code>Node.nodeName</code> contains invalid characters according to its
+ * node type and generate a <code>DOMError</code> of type
+ * <code>"wf-invalid-character-in-node-name"</code>, with a
+ * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
* </li>
- * <li> check if
- * the text content inside <code>Attr</code>, <code>Element</code>,
- * <code>Comment</code>, <code>Text</code>, <code>CDATASection</code> nodes
- * for invalid characters and generate a <code>DOMError</code> of type
- * <code>"wf-invalid-character"</code>, with a
- * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
+ * <li> check if
+ * the text content inside <code>Attr</code>, <code>Element</code>,
+ * <code>Comment</code>, <code>Text</code>, <code>CDATASection</code> nodes
+ * for invalid characters and generate a <code>DOMError</code> of type
+ * <code>"wf-invalid-character"</code>, with a
+ * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
* </li>
- * <li> check if
- * the data inside <code>ProcessingInstruction</code> nodes for invalid
- * characters and generate a <code>DOMError</code> of type
- * <code>"wf-invalid-character"</code>, with a
- * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
+ * <li> check if
+ * the data inside <code>ProcessingInstruction</code> nodes for invalid
+ * characters and generate a <code>DOMError</code> of type
+ * <code>"wf-invalid-character"</code>, with a
+ * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary;
* </li>
* </ul></dd>
* <dt>
@@ -345,14 +345,14 @@
* <dd>[<em>optional</em>] Do not check for XML well-formedness. </dd>
* </dl></dd>
* </dl>
- * <p> The resolution of the system identifiers associated with entities is
- * done using <code>Document.documentURI</code>. However, when the feature
+ * <p> The resolution of the system identifiers associated with entities is
+ * done using <code>Document.documentURI</code>. However, when the feature
* "LS" defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>DOM Level 3 Load and Save</a>]
- * is supported by the DOM implementation, the parameter
- * "resource-resolver" can also be used on <code>DOMConfiguration</code>
- * objects attached to <code>Document</code> nodes. If this parameter is
- * set, <code>Document.normalizeDocument()</code> will invoke the resource
- * resolver instead of using <code>Document.documentURI</code>.
+ * is supported by the DOM implementation, the parameter
+ * "resource-resolver" can also be used on <code>DOMConfiguration</code>
+ * objects attached to <code>Document</code> nodes. If this parameter is
+ * set, <code>Document.normalizeDocument()</code> will invoke the resource
+ * resolver instead of using <code>Document.documentURI</code>.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
@@ -360,31 +360,31 @@
/**
* Set the value of a parameter.
* @param name The name of the parameter to set.
- * @param value The new value or <code>null</code> if the user wishes to
- * unset the parameter. While the type of the value parameter is
- * defined as <code>DOMUserData</code>, the object type must match the
- * type defined by the definition of the parameter. For example, if
- * the parameter is "error-handler", the value must be of type
- * <code>DOMErrorHandler</code>.
+ * @param value The new value or <code>null</code> if the user wishes to
+ * unset the parameter. While the type of the value parameter is
+ * defined as <code>DOMUserData</code>, the object type must match the
+ * type defined by the definition of the parameter. For example, if
+ * the parameter is "error-handler", the value must be of type
+ * <code>DOMErrorHandler</code>.
* @exception DOMException
- * NOT_FOUND_ERR: Raised when the parameter name is not recognized.
- * <br> NOT_SUPPORTED_ERR: Raised when the parameter name is recognized
- * but the requested value cannot be set.
- * <br> TYPE_MISMATCH_ERR: Raised if the value type for this parameter
- * name is incompatible with the expected value type.
+ * NOT_FOUND_ERR: Raised when the parameter name is not recognized.
+ * <br> NOT_SUPPORTED_ERR: Raised when the parameter name is recognized
+ * but the requested value cannot be set.
+ * <br> TYPE_MISMATCH_ERR: Raised if the value type for this parameter
+ * name is incompatible with the expected value type.
*/
- public void setParameter(String name,
+ public void setParameter(String name,
Object value)
throws DOMException;
/**
- * Return the value of a parameter if known.
- * @param name The name of the parameter.
- * @return The current object associated with the specified parameter or
- * <code>null</code> if no object has been associated or if the
- * parameter is not supported.
+ * Return the value of a parameter if known.
+ * @param name The name of the parameter.
+ * @return The current object associated with the specified parameter or
+ * <code>null</code> if no object has been associated or if the
+ * parameter is not supported.
* @exception DOMException
- * NOT_FOUND_ERR: Raised when the parameter name is not recognized.
+ * NOT_FOUND_ERR: Raised when the parameter name is not recognized.
*/
public Object getParameter(String name)
throws DOMException;
@@ -392,21 +392,21 @@
/**
* Check if setting a parameter to a specific value is supported.
* @param name The name of the parameter to check.
- * @param value An object. if <code>null</code>, the returned value is
- * <code>true</code>.
- * @return <code>true</code> if the parameter could be successfully set
- * to the specified value, or <code>false</code> if the parameter is
- * not recognized or the requested value is not supported. This does
- * not change the current value of the parameter itself.
+ * @param value An object. if <code>null</code>, the returned value is
+ * <code>true</code>.
+ * @return <code>true</code> if the parameter could be successfully set
+ * to the specified value, or <code>false</code> if the parameter is
+ * not recognized or the requested value is not supported. This does
+ * not change the current value of the parameter itself.
*/
- public boolean canSetParameter(String name,
+ public boolean canSetParameter(String name,
Object value);
/**
- * The list of the parameters supported by this
- * <code>DOMConfiguration</code> object and for which at least one value
- * can be set by the application. Note that this list can also contain
- * parameter names defined outside this specification.
+ * The list of the parameters supported by this
+ * <code>DOMConfiguration</code> object and for which at least one value
+ * can be set by the application. Note that this list can also contain
+ * parameter names defined outside this specification.
*/
public DOMStringList getParameterNames();
diff --git a/luni/src/main/java/org/w3c/dom/DOMError.java b/luni/src/main/java/org/w3c/dom/DOMError.java
index 37ed7d10..2634df3 100644
--- a/luni/src/main/java/org/w3c/dom/DOMError.java
+++ b/luni/src/main/java/org/w3c/dom/DOMError.java
@@ -20,31 +20,31 @@
public interface DOMError {
// ErrorSeverity
/**
- * The severity of the error described by the <code>DOMError</code> is
- * warning. A <code>SEVERITY_WARNING</code> will not cause the
- * processing to stop, unless <code>DOMErrorHandler.handleError()</code>
+ * The severity of the error described by the <code>DOMError</code> is
+ * warning. A <code>SEVERITY_WARNING</code> will not cause the
+ * processing to stop, unless <code>DOMErrorHandler.handleError()</code>
* returns <code>false</code>.
*/
public static final short SEVERITY_WARNING = 1;
/**
- * The severity of the error described by the <code>DOMError</code> is
- * error. A <code>SEVERITY_ERROR</code> may not cause the processing to
- * stop if the error can be recovered, unless
+ * The severity of the error described by the <code>DOMError</code> is
+ * error. A <code>SEVERITY_ERROR</code> may not cause the processing to
+ * stop if the error can be recovered, unless
* <code>DOMErrorHandler.handleError()</code> returns <code>false</code>.
*/
public static final short SEVERITY_ERROR = 2;
/**
- * The severity of the error described by the <code>DOMError</code> is
- * fatal error. A <code>SEVERITY_FATAL_ERROR</code> will cause the
- * normal processing to stop. The return value of
- * <code>DOMErrorHandler.handleError()</code> is ignored unless the
- * implementation chooses to continue, in which case the behavior
+ * The severity of the error described by the <code>DOMError</code> is
+ * fatal error. A <code>SEVERITY_FATAL_ERROR</code> will cause the
+ * normal processing to stop. The return value of
+ * <code>DOMErrorHandler.handleError()</code> is ignored unless the
+ * implementation chooses to continue, in which case the behavior
* becomes undefined.
*/
public static final short SEVERITY_FATAL_ERROR = 3;
/**
- * The severity of the error, either <code>SEVERITY_WARNING</code>,
+ * The severity of the error, either <code>SEVERITY_WARNING</code>,
* <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
*/
public short getSeverity();
@@ -55,17 +55,17 @@
public String getMessage();
/**
- * A <code>DOMString</code> indicating which related data is expected in
- * <code>relatedData</code>. Users should refer to the specification of
- * the error in order to find its <code>DOMString</code> type and
- * <code>relatedData</code> definitions if any.
- * <p ><b>Note:</b> As an example,
- * <code>Document.normalizeDocument()</code> does generate warnings when
- * the "split-cdata-sections" parameter is in use. Therefore, the method
- * generates a <code>SEVERITY_WARNING</code> with <code>type</code>
- * <code>"cdata-sections-splitted"</code> and the first
- * <code>CDATASection</code> node in document order resulting from the
- * split is returned by the <code>relatedData</code> attribute.
+ * A <code>DOMString</code> indicating which related data is expected in
+ * <code>relatedData</code>. Users should refer to the specification of
+ * the error in order to find its <code>DOMString</code> type and
+ * <code>relatedData</code> definitions if any.
+ * <p ><b>Note:</b> As an example,
+ * <code>Document.normalizeDocument()</code> does generate warnings when
+ * the "split-cdata-sections" parameter is in use. Therefore, the method
+ * generates a <code>SEVERITY_WARNING</code> with <code>type</code>
+ * <code>"cdata-sections-splitted"</code> and the first
+ * <code>CDATASection</code> node in document order resulting from the
+ * split is returned by the <code>relatedData</code> attribute.
*/
public String getType();
@@ -75,7 +75,7 @@
public Object getRelatedException();
/**
- * The related <code>DOMError.type</code> dependent data if any.
+ * The related <code>DOMError.type</code> dependent data if any.
*/
public Object getRelatedData();
diff --git a/luni/src/main/java/org/w3c/dom/DOMErrorHandler.java b/luni/src/main/java/org/w3c/dom/DOMErrorHandler.java
index 3d4ad2a..7dcc901 100644
--- a/luni/src/main/java/org/w3c/dom/DOMErrorHandler.java
+++ b/luni/src/main/java/org/w3c/dom/DOMErrorHandler.java
@@ -13,32 +13,32 @@
package org.w3c.dom;
/**
- * <code>DOMErrorHandler</code> is a callback interface that the DOM
- * implementation can call when reporting errors that happens while
- * processing XML data, or when doing some other processing (e.g. validating
- * a document). A <code>DOMErrorHandler</code> object can be attached to a
- * <code>Document</code> using the "error-handler" on the
- * <code>DOMConfiguration</code> interface. If more than one error needs to
- * be reported during an operation, the sequence and numbers of the errors
- * passed to the error handler are implementation dependent.
- * <p> The application that is using the DOM implementation is expected to
- * implement this interface.
+ * <code>DOMErrorHandler</code> is a callback interface that the DOM
+ * implementation can call when reporting errors that happens while
+ * processing XML data, or when doing some other processing (e.g. validating
+ * a document). A <code>DOMErrorHandler</code> object can be attached to a
+ * <code>Document</code> using the "error-handler" on the
+ * <code>DOMConfiguration</code> interface. If more than one error needs to
+ * be reported during an operation, the sequence and numbers of the errors
+ * passed to the error handler are implementation dependent.
+ * <p> The application that is using the DOM implementation is expected to
+ * implement this interface.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMErrorHandler {
/**
* This method is called on the error handler when an error occurs.
- * <br> If an exception is thrown from this method, it is considered to be
- * equivalent of returning <code>true</code>.
- * @param error The error object that describes the error. This object
- * may be reused by the DOM implementation across multiple calls to
- * the <code>handleError</code> method.
- * @return If the <code>handleError</code> method returns
- * <code>false</code>, the DOM implementation should stop the current
- * processing when possible. If the method returns <code>true</code>,
- * the processing may continue depending on
- * <code>DOMError.severity</code>.
+ * <br> If an exception is thrown from this method, it is considered to be
+ * equivalent of returning <code>true</code>.
+ * @param error The error object that describes the error. This object
+ * may be reused by the DOM implementation across multiple calls to
+ * the <code>handleError</code> method.
+ * @return If the <code>handleError</code> method returns
+ * <code>false</code>, the DOM implementation should stop the current
+ * processing when possible. If the method returns <code>true</code>,
+ * the processing may continue depending on
+ * <code>DOMError.severity</code>.
*/
public boolean handleError(DOMError error);
diff --git a/luni/src/main/java/org/w3c/dom/DOMException.java b/luni/src/main/java/org/w3c/dom/DOMException.java
index 0b2578f..23c70c4 100644
--- a/luni/src/main/java/org/w3c/dom/DOMException.java
+++ b/luni/src/main/java/org/w3c/dom/DOMException.java
@@ -13,20 +13,20 @@
package org.w3c.dom;
/**
- * DOM operations only raise exceptions in "exceptional" circumstances, i.e.,
- * when an operation is impossible to perform (either for logical reasons,
- * because data is lost, or because the implementation has become unstable).
- * In general, DOM methods return specific error values in ordinary
- * processing situations, such as out-of-bound errors when using
+ * DOM operations only raise exceptions in "exceptional" circumstances, i.e.,
+ * when an operation is impossible to perform (either for logical reasons,
+ * because data is lost, or because the implementation has become unstable).
+ * In general, DOM methods return specific error values in ordinary
+ * processing situations, such as out-of-bound errors when using
* <code>NodeList</code>.
- * <p>Implementations should raise other exceptions under other circumstances.
- * For example, implementations should raise an implementation-dependent
+ * <p>Implementations should raise other exceptions under other circumstances.
+ * For example, implementations should raise an implementation-dependent
* exception if a <code>null</code> argument is passed when <code>null</code>
* was not expected.
- * <p>Some languages and object systems do not support the concept of
- * exceptions. For such systems, error conditions may be indicated using
- * native error reporting mechanisms. For some bindings, for example,
- * methods may return error codes similar to those listed in the
+ * <p>Some languages and object systems do not support the concept of
+ * exceptions. For such systems, error conditions may be indicated using
+ * native error reporting mechanisms. For some bindings, for example,
+ * methods may return error codes similar to those listed in the
* corresponding method descriptions.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
@@ -42,7 +42,7 @@
*/
public static final short INDEX_SIZE_ERR = 1;
/**
- * If the specified range of text does not fit into a
+ * If the specified range of text does not fit into a
* <code>DOMString</code>.
*/
public static final short DOMSTRING_SIZE_ERR = 2;
@@ -51,7 +51,7 @@
*/
public static final short HIERARCHY_REQUEST_ERR = 3;
/**
- * If a <code>Node</code> is used in a different document than the one
+ * If a <code>Node</code> is used in a different document than the one
* that created it (that doesn't support it).
*/
public static final short WRONG_DOCUMENT_ERR = 4;
@@ -60,32 +60,32 @@
*/
public static final short INVALID_CHARACTER_ERR = 5;
/**
- * If data is specified for a <code>Node</code> which does not support
+ * If data is specified for a <code>Node</code> which does not support
* data.
*/
public static final short NO_DATA_ALLOWED_ERR = 6;
/**
- * If an attempt is made to modify an object where modifications are not
+ * If an attempt is made to modify an object where modifications are not
* allowed.
*/
public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
/**
- * If an attempt is made to reference a <code>Node</code> in a context
+ * If an attempt is made to reference a <code>Node</code> in a context
* where it does not exist.
*/
public static final short NOT_FOUND_ERR = 8;
/**
- * If the implementation does not support the requested type of object or
+ * If the implementation does not support the requested type of object or
* operation.
*/
public static final short NOT_SUPPORTED_ERR = 9;
/**
- * If an attempt is made to add an attribute that is already in use
+ * If an attempt is made to add an attribute that is already in use
* elsewhere.
*/
public static final short INUSE_ATTRIBUTE_ERR = 10;
/**
- * If an attempt is made to use an object that is not, or is no longer,
+ * If an attempt is made to use an object that is not, or is no longer,
* usable.
* @since DOM Level 2
*/
@@ -101,29 +101,29 @@
*/
public static final short INVALID_MODIFICATION_ERR = 13;
/**
- * If an attempt is made to create or change an object in a way which is
+ * If an attempt is made to create or change an object in a way which is
* incorrect with regard to namespaces.
* @since DOM Level 2
*/
public static final short NAMESPACE_ERR = 14;
/**
- * If a parameter or an operation is not supported by the underlying
+ * If a parameter or an operation is not supported by the underlying
* object.
* @since DOM Level 2
*/
public static final short INVALID_ACCESS_ERR = 15;
/**
- * If a call to a method such as <code>insertBefore</code> or
- * <code>removeChild</code> would make the <code>Node</code> invalid
- * with respect to "partial validity", this exception would be raised
+ * If a call to a method such as <code>insertBefore</code> or
+ * <code>removeChild</code> would make the <code>Node</code> invalid
+ * with respect to "partial validity", this exception would be raised
* and the operation would not be done. This code is used in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Val-20040127/'>DOM Level 3 Validation</a>]
* . Refer to this specification for further information.
* @since DOM Level 3
*/
public static final short VALIDATION_ERR = 16;
/**
- * If the type of an object is incompatible with the expected type of the
- * parameter associated to the object.
+ * If the type of an object is incompatible with the expected type of the
+ * parameter associated to the object.
* @since DOM Level 3
*/
public static final short TYPE_MISMATCH_ERR = 17;
diff --git a/luni/src/main/java/org/w3c/dom/DOMImplementation.java b/luni/src/main/java/org/w3c/dom/DOMImplementation.java
index 5bb71e2..9b07574 100644
--- a/luni/src/main/java/org/w3c/dom/DOMImplementation.java
+++ b/luni/src/main/java/org/w3c/dom/DOMImplementation.java
@@ -13,124 +13,124 @@
package org.w3c.dom;
/**
- * The <code>DOMImplementation</code> interface provides a number of methods
- * for performing operations that are independent of any particular instance
+ * The <code>DOMImplementation</code> interface provides a number of methods
+ * for performing operations that are independent of any particular instance
* of the document object model.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DOMImplementation {
/**
- * Test if the DOM implementation implements a specific feature and
+ * Test if the DOM implementation implements a specific feature and
* version, as specified in .
- * @param feature The name of the feature to test.
- * @param version This is the version number of the feature to test.
- * @return <code>true</code> if the feature is implemented in the
+ * @param feature The name of the feature to test.
+ * @param version This is the version number of the feature to test.
+ * @return <code>true</code> if the feature is implemented in the
* specified version, <code>false</code> otherwise.
*/
- public boolean hasFeature(String feature,
+ public boolean hasFeature(String feature,
String version);
/**
- * Creates an empty <code>DocumentType</code> node. Entity declarations
- * and notations are not made available. Entity reference expansions and
+ * Creates an empty <code>DocumentType</code> node. Entity declarations
+ * and notations are not made available. Entity reference expansions and
* default attribute additions do not occur..
- * @param qualifiedName The qualified name of the document type to be
+ * @param qualifiedName The qualified name of the document type to be
* created.
* @param publicId The external subset public identifier.
* @param systemId The external subset system identifier.
- * @return A new <code>DocumentType</code> node with
+ * @return A new <code>DocumentType</code> node with
* <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
* an XML name according to [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature "XML" and the language exposed through the
- * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public DocumentType createDocumentType(String qualifiedName,
- String publicId,
+ public DocumentType createDocumentType(String qualifiedName,
+ String publicId,
String systemId)
throws DOMException;
/**
- * Creates a DOM Document object of the specified type with its document
+ * Creates a DOM Document object of the specified type with its document
* element.
- * <br>Note that based on the <code>DocumentType</code> given to create
- * the document, the implementation may instantiate specialized
- * <code>Document</code> objects that support additional features than
+ * <br>Note that based on the <code>DocumentType</code> given to create
+ * the document, the implementation may instantiate specialized
+ * <code>Document</code> objects that support additional features than
* the "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * . On the other hand, setting the <code>DocumentType</code> after the
- * document was created makes this very unlikely to happen.
- * Alternatively, specialized <code>Document</code> creation methods,
+ * . On the other hand, setting the <code>DocumentType</code> after the
+ * document was created makes this very unlikely to happen.
+ * Alternatively, specialized <code>Document</code> creation methods,
* such as <code>createHTMLDocument</code> [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * , can be used to obtain specific types of <code>Document</code>
+ * , can be used to obtain specific types of <code>Document</code>
* objects.
- * @param namespaceURI The namespace URI of the document element to
+ * @param namespaceURI The namespace URI of the document element to
* create or <code>null</code>.
- * @param qualifiedName The qualified name of the document element to be
+ * @param qualifiedName The qualified name of the document element to be
* created or <code>null</code>.
* @param doctype The type of document to be created or <code>null</code>.
- * When <code>doctype</code> is not <code>null</code>, its
- * <code>Node.ownerDocument</code> attribute is set to the document
+ * When <code>doctype</code> is not <code>null</code>, its
+ * <code>Node.ownerDocument</code> attribute is set to the document
* being created.
- * @return A new <code>Document</code> object with its document element.
- * If the <code>NamespaceURI</code>, <code>qualifiedName</code>, and
- * <code>doctype</code> are <code>null</code>, the returned
+ * @return A new <code>Document</code> object with its document element.
+ * If the <code>NamespaceURI</code>, <code>qualifiedName</code>, and
+ * <code>doctype</code> are <code>null</code>, the returned
* <code>Document</code> is empty with no document element.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
* an XML name according to [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed, if the <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code>, or if the
- * <code>qualifiedName</code> is <code>null</code> and the
- * <code>namespaceURI</code> is different from <code>null</code>, or
- * if the <code>qualifiedName</code> has a prefix that is "xml" and
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * malformed, if the <code>qualifiedName</code> has a prefix and the
+ * <code>namespaceURI</code> is <code>null</code>, or if the
+ * <code>qualifiedName</code> is <code>null</code> and the
+ * <code>namespaceURI</code> is different from <code>null</code>, or
+ * if the <code>qualifiedName</code> has a prefix that is "xml" and
* the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
* http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , or if the DOM implementation does not support the
- * <code>"XML"</code> feature but a non-null namespace URI was
+ * , or if the DOM implementation does not support the
+ * <code>"XML"</code> feature but a non-null namespace URI was
* provided, since namespaces were defined by XML.
- * <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
- * been used with a different document or was created from a different
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
+ * been used with a different document or was created from a different
* implementation.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature "XML" and the language exposed through the
- * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public Document createDocument(String namespaceURI,
- String qualifiedName,
+ public Document createDocument(String namespaceURI,
+ String qualifiedName,
DocumentType doctype)
throws DOMException;
/**
- * This method returns a specialized object which implements the
- * specialized APIs of the specified feature and version, as specified
- * in . The specialized object may also be obtained by using
- * binding-specific casting methods but is not necessarily expected to,
- * as discussed in . This method also allow the implementation to
- * provide specialized objects which do not support the
- * <code>DOMImplementation</code> interface.
- * @param feature The name of the feature requested. Note that any plus
- * sign "+" prepended to the name of the feature will be ignored since
- * it is not significant in the context of this method.
- * @param version This is the version number of the feature to test.
- * @return Returns an object which implements the specialized APIs of
- * the specified feature and version, if any, or <code>null</code> if
- * there is no object which implements interfaces associated with that
- * feature. If the <code>DOMObject</code> returned by this method
- * implements the <code>DOMImplementation</code> interface, it must
- * delegate to the primary core <code>DOMImplementation</code> and not
- * return results inconsistent with the primary core
- * <code>DOMImplementation</code> such as <code>hasFeature</code>,
- * <code>getFeature</code>, etc.
+ * This method returns a specialized object which implements the
+ * specialized APIs of the specified feature and version, as specified
+ * in . The specialized object may also be obtained by using
+ * binding-specific casting methods but is not necessarily expected to,
+ * as discussed in . This method also allow the implementation to
+ * provide specialized objects which do not support the
+ * <code>DOMImplementation</code> interface.
+ * @param feature The name of the feature requested. Note that any plus
+ * sign "+" prepended to the name of the feature will be ignored since
+ * it is not significant in the context of this method.
+ * @param version This is the version number of the feature to test.
+ * @return Returns an object which implements the specialized APIs of
+ * the specified feature and version, if any, or <code>null</code> if
+ * there is no object which implements interfaces associated with that
+ * feature. If the <code>DOMObject</code> returned by this method
+ * implements the <code>DOMImplementation</code> interface, it must
+ * delegate to the primary core <code>DOMImplementation</code> and not
+ * return results inconsistent with the primary core
+ * <code>DOMImplementation</code> such as <code>hasFeature</code>,
+ * <code>getFeature</code>, etc.
* @since DOM Level 3
*/
- public Object getFeature(String feature,
+ public Object getFeature(String feature,
String version);
}
diff --git a/luni/src/main/java/org/w3c/dom/DOMImplementationList.java b/luni/src/main/java/org/w3c/dom/DOMImplementationList.java
index 18349fd..877de6e 100644
--- a/luni/src/main/java/org/w3c/dom/DOMImplementationList.java
+++ b/luni/src/main/java/org/w3c/dom/DOMImplementationList.java
@@ -13,30 +13,30 @@
package org.w3c.dom;
/**
- * The <code>DOMImplementationList</code> interface provides the abstraction
- * of an ordered collection of DOM implementations, without defining or
- * constraining how this collection is implemented. The items in the
- * <code>DOMImplementationList</code> are accessible via an integral index,
- * starting from 0.
+ * The <code>DOMImplementationList</code> interface provides the abstraction
+ * of an ordered collection of DOM implementations, without defining or
+ * constraining how this collection is implemented. The items in the
+ * <code>DOMImplementationList</code> are accessible via an integral index,
+ * starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMImplementationList {
/**
- * Returns the <code>index</code>th item in the collection. If
- * <code>index</code> is greater than or equal to the number of
- * <code>DOMImplementation</code>s in the list, this returns
- * <code>null</code>.
+ * Returns the <code>index</code>th item in the collection. If
+ * <code>index</code> is greater than or equal to the number of
+ * <code>DOMImplementation</code>s in the list, this returns
+ * <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
- * th position in the <code>DOMImplementationList</code>, or
- * <code>null</code> if that is not a valid index.
+ * th position in the <code>DOMImplementationList</code>, or
+ * <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index);
/**
- * The number of <code>DOMImplementation</code>s in the list. The range
- * of valid child node indices is 0 to <code>length-1</code> inclusive.
+ * The number of <code>DOMImplementation</code>s in the list. The range
+ * of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
diff --git a/luni/src/main/java/org/w3c/dom/DOMImplementationSource.java b/luni/src/main/java/org/w3c/dom/DOMImplementationSource.java
index 3c32c18..1c5c0b2 100644
--- a/luni/src/main/java/org/w3c/dom/DOMImplementationSource.java
+++ b/luni/src/main/java/org/w3c/dom/DOMImplementationSource.java
@@ -13,44 +13,44 @@
package org.w3c.dom;
/**
- * This interface permits a DOM implementer to supply one or more
- * implementations, based upon requested features and versions, as specified
- * in . Each implemented <code>DOMImplementationSource</code> object is
- * listed in the binding-specific list of available sources so that its
+ * This interface permits a DOM implementer to supply one or more
+ * implementations, based upon requested features and versions, as specified
+ * in . Each implemented <code>DOMImplementationSource</code> object is
+ * listed in the binding-specific list of available sources so that its
* <code>DOMImplementation</code> objects are made available.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMImplementationSource {
/**
- * A method to request the first DOM implementation that supports the
- * specified features.
- * @param features A string that specifies which features and versions
- * are required. This is a space separated list in which each feature
- * is specified by its name optionally followed by a space and a
- * version number. This method returns the first item of the list
- * returned by <code>getDOMImplementationList</code>. As an example,
- * the string <code>"XML 3.0 Traversal +Events 2.0"</code> will
- * request a DOM implementation that supports the module "XML" for its
- * 3.0 version, a module that support of the "Traversal" module for
- * any version, and the module "Events" for its 2.0 version. The
- * module "Events" must be accessible using the method
- * <code>Node.getFeature()</code> and
- * <code>DOMImplementation.getFeature()</code>.
- * @return The first DOM implementation that support the desired
+ * A method to request the first DOM implementation that supports the
+ * specified features.
+ * @param features A string that specifies which features and versions
+ * are required. This is a space separated list in which each feature
+ * is specified by its name optionally followed by a space and a
+ * version number. This method returns the first item of the list
+ * returned by <code>getDOMImplementationList</code>. As an example,
+ * the string <code>"XML 3.0 Traversal +Events 2.0"</code> will
+ * request a DOM implementation that supports the module "XML" for its
+ * 3.0 version, a module that support of the "Traversal" module for
+ * any version, and the module "Events" for its 2.0 version. The
+ * module "Events" must be accessible using the method
+ * <code>Node.getFeature()</code> and
+ * <code>DOMImplementation.getFeature()</code>.
+ * @return The first DOM implementation that support the desired
* features, or <code>null</code> if this source has none.
*/
public DOMImplementation getDOMImplementation(String features);
/**
- * A method to request a list of DOM implementations that support the
+ * A method to request a list of DOM implementations that support the
* specified features and versions, as specified in .
- * @param features A string that specifies which features and versions
- * are required. This is a space separated list in which each feature
- * is specified by its name optionally followed by a space and a
- * version number. This is something like: "XML 3.0 Traversal +Events
+ * @param features A string that specifies which features and versions
+ * are required. This is a space separated list in which each feature
+ * is specified by its name optionally followed by a space and a
+ * version number. This is something like: "XML 3.0 Traversal +Events
* 2.0"
- * @return A list of DOM implementations that support the desired
+ * @return A list of DOM implementations that support the desired
* features.
*/
public DOMImplementationList getDOMImplementationList(String features);
diff --git a/luni/src/main/java/org/w3c/dom/DOMLocator.java b/luni/src/main/java/org/w3c/dom/DOMLocator.java
index fcaaa23..50cd7d2 100644
--- a/luni/src/main/java/org/w3c/dom/DOMLocator.java
+++ b/luni/src/main/java/org/w3c/dom/DOMLocator.java
@@ -13,44 +13,44 @@
package org.w3c.dom;
/**
- * <code>DOMLocator</code> is an interface that describes a location (e.g.
+ * <code>DOMLocator</code> is an interface that describes a location (e.g.
* where an error occurred).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMLocator {
/**
- * The line number this locator is pointing to, or <code>-1</code> if
+ * The line number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getLineNumber();
/**
- * The column number this locator is pointing to, or <code>-1</code> if
+ * The column number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getColumnNumber();
/**
- * The byte offset into the input source this locator is pointing to or
+ * The byte offset into the input source this locator is pointing to or
* <code>-1</code> if there is no byte offset available.
*/
public int getByteOffset();
/**
- * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or
+ * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or
* <code>-1</code> if there is no UTF-16 offset available.
*/
public int getUtf16Offset();
/**
- * The node this locator is pointing to, or <code>null</code> if no node
+ * The node this locator is pointing to, or <code>null</code> if no node
* is available.
*/
public Node getRelatedNode();
/**
- * The URI this locator is pointing to, or <code>null</code> if no URI is
+ * The URI this locator is pointing to, or <code>null</code> if no URI is
* available.
*/
public String getUri();
diff --git a/luni/src/main/java/org/w3c/dom/DOMStringList.java b/luni/src/main/java/org/w3c/dom/DOMStringList.java
index e6c348a..53a4096 100644
--- a/luni/src/main/java/org/w3c/dom/DOMStringList.java
+++ b/luni/src/main/java/org/w3c/dom/DOMStringList.java
@@ -13,37 +13,37 @@
package org.w3c.dom;
/**
- * The <code>DOMStringList</code> interface provides the abstraction of an
- * ordered collection of <code>DOMString</code> values, without defining or
- * constraining how this collection is implemented. The items in the
- * <code>DOMStringList</code> are accessible via an integral index, starting
- * from 0.
+ * The <code>DOMStringList</code> interface provides the abstraction of an
+ * ordered collection of <code>DOMString</code> values, without defining or
+ * constraining how this collection is implemented. The items in the
+ * <code>DOMStringList</code> are accessible via an integral index, starting
+ * from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMStringList {
/**
- * Returns the <code>index</code>th item in the collection. If
- * <code>index</code> is greater than or equal to the number of
- * <code>DOMString</code>s in the list, this returns <code>null</code>.
+ * Returns the <code>index</code>th item in the collection. If
+ * <code>index</code> is greater than or equal to the number of
+ * <code>DOMString</code>s in the list, this returns <code>null</code>.
* @param index Index into the collection.
- * @return The <code>DOMString</code> at the <code>index</code>th
- * position in the <code>DOMStringList</code>, or <code>null</code> if
- * that is not a valid index.
+ * @return The <code>DOMString</code> at the <code>index</code>th
+ * position in the <code>DOMStringList</code>, or <code>null</code> if
+ * that is not a valid index.
*/
public String item(int index);
/**
- * The number of <code>DOMString</code>s in the list. The range of valid
+ * The number of <code>DOMString</code>s in the list. The range of valid
* child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
/**
- * Test if a string is part of this <code>DOMStringList</code>.
- * @param str The string to look for.
- * @return <code>true</code> if the string has been found,
- * <code>false</code> otherwise.
+ * Test if a string is part of this <code>DOMStringList</code>.
+ * @param str The string to look for.
+ * @return <code>true</code> if the string has been found,
+ * <code>false</code> otherwise.
*/
public boolean contains(String str);
diff --git a/luni/src/main/java/org/w3c/dom/Document.java b/luni/src/main/java/org/w3c/dom/Document.java
index 43ebd4e..3193fa2 100644
--- a/luni/src/main/java/org/w3c/dom/Document.java
+++ b/luni/src/main/java/org/w3c/dom/Document.java
@@ -13,73 +13,73 @@
package org.w3c.dom;
/**
- * The <code>Document</code> interface represents the entire HTML or XML
- * document. Conceptually, it is the root of the document tree, and provides
+ * The <code>Document</code> interface represents the entire HTML or XML
+ * document. Conceptually, it is the root of the document tree, and provides
* the primary access to the document's data.
- * <p>Since elements, text nodes, comments, processing instructions, etc.
- * cannot exist outside the context of a <code>Document</code>, the
- * <code>Document</code> interface also contains the factory methods needed
- * to create these objects. The <code>Node</code> objects created have a
- * <code>ownerDocument</code> attribute which associates them with the
+ * <p>Since elements, text nodes, comments, processing instructions, etc.
+ * cannot exist outside the context of a <code>Document</code>, the
+ * <code>Document</code> interface also contains the factory methods needed
+ * to create these objects. The <code>Node</code> objects created have a
+ * <code>ownerDocument</code> attribute which associates them with the
* <code>Document</code> within whose context they were created.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Document extends Node {
/**
- * The Document Type Declaration (see <code>DocumentType</code>)
- * associated with this document. For XML documents without a document
- * type declaration this returns <code>null</code>. For HTML documents,
- * a <code>DocumentType</code> object may be returned, independently of
- * the presence or absence of document type declaration in the HTML
+ * The Document Type Declaration (see <code>DocumentType</code>)
+ * associated with this document. For XML documents without a document
+ * type declaration this returns <code>null</code>. For HTML documents,
+ * a <code>DocumentType</code> object may be returned, independently of
+ * the presence or absence of document type declaration in the HTML
* document.
- * <br>This provides direct access to the <code>DocumentType</code> node,
- * child node of this <code>Document</code>. This node can be set at
- * document creation time and later changed through the use of child
- * nodes manipulation methods, such as <code>Node.insertBefore</code>,
- * or <code>Node.replaceChild</code>. Note, however, that while some
- * implementations may instantiate different types of
- * <code>Document</code> objects supporting additional features than the
+ * <br>This provides direct access to the <code>DocumentType</code> node,
+ * child node of this <code>Document</code>. This node can be set at
+ * document creation time and later changed through the use of child
+ * nodes manipulation methods, such as <code>Node.insertBefore</code>,
+ * or <code>Node.replaceChild</code>. Note, however, that while some
+ * implementations may instantiate different types of
+ * <code>Document</code> objects supporting additional features than the
* "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * , based on the <code>DocumentType</code> specified at creation time,
- * changing it afterwards is very unlikely to result in a change of the
+ * , based on the <code>DocumentType</code> specified at creation time,
+ * changing it afterwards is very unlikely to result in a change of the
* features supported.
* @version DOM Level 3
*/
public DocumentType getDoctype();
/**
- * The <code>DOMImplementation</code> object that handles this document. A
+ * The <code>DOMImplementation</code> object that handles this document. A
* DOM application may use objects from multiple implementations.
*/
public DOMImplementation getImplementation();
/**
- * This is a convenience attribute that allows direct access to the child
+ * This is a convenience attribute that allows direct access to the child
* node that is the document element of the document.
*/
public Element getDocumentElement();
/**
- * Creates an element of the type specified. Note that the instance
- * returned implements the <code>Element</code> interface, so attributes
+ * Creates an element of the type specified. Note that the instance
+ * returned implements the <code>Element</code> interface, so attributes
* can be specified directly on the returned object.
- * <br>In addition, if there are known attributes with default values,
- * <code>Attr</code> nodes representing them are automatically created
+ * <br>In addition, if there are known attributes with default values,
+ * <code>Attr</code> nodes representing them are automatically created
* and attached to the element.
- * <br>To create an element with a qualified name and namespace URI, use
+ * <br>To create an element with a qualified name and namespace URI, use
* the <code>createElementNS</code> method.
- * @param tagName The name of the element type to instantiate. For XML,
- * this is case-sensitive, otherwise it depends on the
- * case-sensitivity of the markup language in use. In that case, the
- * name is mapped to the canonical form of that markup by the DOM
+ * @param tagName The name of the element type to instantiate. For XML,
+ * this is case-sensitive, otherwise it depends on the
+ * case-sensitivity of the markup language in use. In that case, the
+ * name is mapped to the canonical form of that markup by the DOM
* implementation.
- * @return A new <code>Element</code> object with the
- * <code>nodeName</code> attribute set to <code>tagName</code>, and
- * <code>localName</code>, <code>prefix</code>, and
+ * @return A new <code>Element</code> object with the
+ * <code>nodeName</code> attribute set to <code>tagName</code>, and
+ * <code>localName</code>, <code>prefix</code>, and
* <code>namespaceURI</code> set to <code>null</code>.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
- * name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
+ * name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
*/
public Element createElement(String tagName)
@@ -106,7 +106,7 @@
public Comment createComment(String data);
/**
- * Creates a <code>CDATASection</code> node whose value is the specified
+ * Creates a <code>CDATASection</code> node whose value is the specified
* string.
* @param data The data for the <code>CDATASection</code> contents.
* @return The new <code>CDATASection</code> object.
@@ -117,68 +117,68 @@
throws DOMException;
/**
- * Creates a <code>ProcessingInstruction</code> node given the specified
+ * Creates a <code>ProcessingInstruction</code> node given the specified
* name and data strings.
- * @param target The target part of the processing instruction.Unlike
- * <code>Document.createElementNS</code> or
- * <code>Document.createAttributeNS</code>, no namespace well-formed
- * checking is done on the target name. Applications should invoke
+ * @param target The target part of the processing instruction.Unlike
+ * <code>Document.createElementNS</code> or
+ * <code>Document.createAttributeNS</code>, no namespace well-formed
+ * checking is done on the target name. Applications should invoke
* <code>Document.normalizeDocument()</code> with the parameter "
- * namespaces" set to <code>true</code> in order to ensure that the
- * target name is namespace well-formed.
+ * namespaces" set to <code>true</code> in order to ensure that the
+ * target name is namespace well-formed.
* @param data The data for the node.
* @return The new <code>ProcessingInstruction</code> object.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified target is not an XML
- * name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified target is not an XML
+ * name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
* <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
- public ProcessingInstruction createProcessingInstruction(String target,
+ public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws DOMException;
/**
- * Creates an <code>Attr</code> of the given name. Note that the
- * <code>Attr</code> instance can then be set on an <code>Element</code>
- * using the <code>setAttributeNode</code> method.
- * <br>To create an attribute with a qualified name and namespace URI, use
+ * Creates an <code>Attr</code> of the given name. Note that the
+ * <code>Attr</code> instance can then be set on an <code>Element</code>
+ * using the <code>setAttributeNode</code> method.
+ * <br>To create an attribute with a qualified name and namespace URI, use
* the <code>createAttributeNS</code> method.
* @param name The name of the attribute.
- * @return A new <code>Attr</code> object with the <code>nodeName</code>
- * attribute set to <code>name</code>, and <code>localName</code>,
- * <code>prefix</code>, and <code>namespaceURI</code> set to
+ * @return A new <code>Attr</code> object with the <code>nodeName</code>
+ * attribute set to <code>name</code>, and <code>localName</code>,
+ * <code>prefix</code>, and <code>namespaceURI</code> set to
* <code>null</code>. The value of the attribute is the empty string.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
- * name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
+ * name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
*/
public Attr createAttribute(String name)
throws DOMException;
/**
- * Creates an <code>EntityReference</code> object. In addition, if the
- * referenced entity is known, the child list of the
- * <code>EntityReference</code> node is made the same as that of the
+ * Creates an <code>EntityReference</code> object. In addition, if the
+ * referenced entity is known, the child list of the
+ * <code>EntityReference</code> node is made the same as that of the
* corresponding <code>Entity</code> node.
- * <p ><b>Note:</b> If any descendant of the <code>Entity</code> node has
- * an unbound namespace prefix, the corresponding descendant of the
- * created <code>EntityReference</code> node is also unbound; (its
- * <code>namespaceURI</code> is <code>null</code>). The DOM Level 2 and
- * 3 do not support any mechanism to resolve namespace prefixes in this
+ * <p ><b>Note:</b> If any descendant of the <code>Entity</code> node has
+ * an unbound namespace prefix, the corresponding descendant of the
+ * created <code>EntityReference</code> node is also unbound; (its
+ * <code>namespaceURI</code> is <code>null</code>). The DOM Level 2 and
+ * 3 do not support any mechanism to resolve namespace prefixes in this
* case.
- * @param name The name of the entity to reference.Unlike
- * <code>Document.createElementNS</code> or
- * <code>Document.createAttributeNS</code>, no namespace well-formed
- * checking is done on the entity name. Applications should invoke
+ * @param name The name of the entity to reference.Unlike
+ * <code>Document.createElementNS</code> or
+ * <code>Document.createAttributeNS</code>, no namespace well-formed
+ * checking is done on the entity name. Applications should invoke
* <code>Document.normalizeDocument()</code> with the parameter "
- * namespaces" set to <code>true</code> in order to ensure that the
- * entity name is namespace well-formed.
+ * namespaces" set to <code>true</code> in order to ensure that the
+ * entity name is namespace well-formed.
* @return The new <code>EntityReference</code> object.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
- * name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
+ * name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
* <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
@@ -186,142 +186,142 @@
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all the <code>Elements</code> in
- * document order with a given tag name and are contained in the
+ * Returns a <code>NodeList</code> of all the <code>Elements</code> in
+ * document order with a given tag name and are contained in the
* document.
- * @param tagname The name of the tag to match on. The special value "*"
- * matches all tags. For XML, the <code>tagname</code> parameter is
- * case-sensitive, otherwise it depends on the case-sensitivity of the
- * markup language in use.
- * @return A new <code>NodeList</code> object containing all the matched
+ * @param tagname The name of the tag to match on. The special value "*"
+ * matches all tags. For XML, the <code>tagname</code> parameter is
+ * case-sensitive, otherwise it depends on the case-sensitivity of the
+ * markup language in use.
+ * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
*/
public NodeList getElementsByTagName(String tagname);
/**
- * Imports a node from another document to this document, without altering
- * or removing the source node from the original document; this method
- * creates a new copy of the source node. The returned node has no
+ * Imports a node from another document to this document, without altering
+ * or removing the source node from the original document; this method
+ * creates a new copy of the source node. The returned node has no
* parent; (<code>parentNode</code> is <code>null</code>).
- * <br>For all nodes, importing a node creates a node object owned by the
- * importing document, with attribute values identical to the source
- * node's <code>nodeName</code> and <code>nodeType</code>, plus the
- * attributes related to namespaces (<code>prefix</code>,
- * <code>localName</code>, and <code>namespaceURI</code>). As in the
- * <code>cloneNode</code> operation, the source node is not altered.
- * User data associated to the imported node is not carried over.
- * However, if any <code>UserDataHandlers</code> has been specified
- * along with the associated data these handlers will be called with the
+ * <br>For all nodes, importing a node creates a node object owned by the
+ * importing document, with attribute values identical to the source
+ * node's <code>nodeName</code> and <code>nodeType</code>, plus the
+ * attributes related to namespaces (<code>prefix</code>,
+ * <code>localName</code>, and <code>namespaceURI</code>). As in the
+ * <code>cloneNode</code> operation, the source node is not altered.
+ * User data associated to the imported node is not carried over.
+ * However, if any <code>UserDataHandlers</code> has been specified
+ * along with the associated data these handlers will be called with the
* appropriate parameters before this method returns.
- * <br>Additional information is copied as appropriate to the
- * <code>nodeType</code>, attempting to mirror the behavior expected if
- * a fragment of XML or HTML source was copied from one document to
- * another, recognizing that the two documents may have different DTDs
- * in the XML case. The following list describes the specifics for each
- * type of node.
+ * <br>Additional information is copied as appropriate to the
+ * <code>nodeType</code>, attempting to mirror the behavior expected if
+ * a fragment of XML or HTML source was copied from one document to
+ * another, recognizing that the two documents may have different DTDs
+ * in the XML case. The following list describes the specifics for each
+ * type of node.
* <dl>
* <dt>ATTRIBUTE_NODE</dt>
- * <dd>The <code>ownerElement</code> attribute
- * is set to <code>null</code> and the <code>specified</code> flag is
- * set to <code>true</code> on the generated <code>Attr</code>. The
- * descendants of the source <code>Attr</code> are recursively imported
+ * <dd>The <code>ownerElement</code> attribute
+ * is set to <code>null</code> and the <code>specified</code> flag is
+ * set to <code>true</code> on the generated <code>Attr</code>. The
+ * descendants of the source <code>Attr</code> are recursively imported
* and the resulting nodes reassembled to form the corresponding subtree.
- * Note that the <code>deep</code> parameter has no effect on
- * <code>Attr</code> nodes; they always carry their children with them
+ * Note that the <code>deep</code> parameter has no effect on
+ * <code>Attr</code> nodes; they always carry their children with them
* when imported.</dd>
* <dt>DOCUMENT_FRAGMENT_NODE</dt>
- * <dd>If the <code>deep</code> option
- * was set to <code>true</code>, the descendants of the source
- * <code>DocumentFragment</code> are recursively imported and the
- * resulting nodes reassembled under the imported
- * <code>DocumentFragment</code> to form the corresponding subtree.
- * Otherwise, this simply generates an empty
+ * <dd>If the <code>deep</code> option
+ * was set to <code>true</code>, the descendants of the source
+ * <code>DocumentFragment</code> are recursively imported and the
+ * resulting nodes reassembled under the imported
+ * <code>DocumentFragment</code> to form the corresponding subtree.
+ * Otherwise, this simply generates an empty
* <code>DocumentFragment</code>.</dd>
* <dt>DOCUMENT_NODE</dt>
- * <dd><code>Document</code>
+ * <dd><code>Document</code>
* nodes cannot be imported.</dd>
* <dt>DOCUMENT_TYPE_NODE</dt>
- * <dd><code>DocumentType</code>
+ * <dd><code>DocumentType</code>
* nodes cannot be imported.</dd>
* <dt>ELEMENT_NODE</dt>
- * <dd><em>Specified</em> attribute nodes of the source element are imported, and the generated
- * <code>Attr</code> nodes are attached to the generated
- * <code>Element</code>. Default attributes are <em>not</em> copied, though if the document being imported into defines default
- * attributes for this element name, those are assigned. If the
- * <code>importNode</code> <code>deep</code> parameter was set to
- * <code>true</code>, the descendants of the source element are
- * recursively imported and the resulting nodes reassembled to form the
+ * <dd><em>Specified</em> attribute nodes of the source element are imported, and the generated
+ * <code>Attr</code> nodes are attached to the generated
+ * <code>Element</code>. Default attributes are <em>not</em> copied, though if the document being imported into defines default
+ * attributes for this element name, those are assigned. If the
+ * <code>importNode</code> <code>deep</code> parameter was set to
+ * <code>true</code>, the descendants of the source element are
+ * recursively imported and the resulting nodes reassembled to form the
* corresponding subtree.</dd>
* <dt>ENTITY_NODE</dt>
- * <dd><code>Entity</code> nodes can be
- * imported, however in the current release of the DOM the
- * <code>DocumentType</code> is readonly. Ability to add these imported
- * nodes to a <code>DocumentType</code> will be considered for addition
- * to a future release of the DOM.On import, the <code>publicId</code>,
- * <code>systemId</code>, and <code>notationName</code> attributes are
- * copied. If a <code>deep</code> import is requested, the descendants
- * of the the source <code>Entity</code> are recursively imported and
+ * <dd><code>Entity</code> nodes can be
+ * imported, however in the current release of the DOM the
+ * <code>DocumentType</code> is readonly. Ability to add these imported
+ * nodes to a <code>DocumentType</code> will be considered for addition
+ * to a future release of the DOM.On import, the <code>publicId</code>,
+ * <code>systemId</code>, and <code>notationName</code> attributes are
+ * copied. If a <code>deep</code> import is requested, the descendants
+ * of the the source <code>Entity</code> are recursively imported and
* the resulting nodes reassembled to form the corresponding subtree.</dd>
* <dt>
* ENTITY_REFERENCE_NODE</dt>
- * <dd>Only the <code>EntityReference</code> itself is
- * copied, even if a <code>deep</code> import is requested, since the
- * source and destination documents might have defined the entity
- * differently. If the document being imported into provides a
+ * <dd>Only the <code>EntityReference</code> itself is
+ * copied, even if a <code>deep</code> import is requested, since the
+ * source and destination documents might have defined the entity
+ * differently. If the document being imported into provides a
* definition for this entity name, its value is assigned.</dd>
* <dt>NOTATION_NODE</dt>
* <dd>
- * <code>Notation</code> nodes can be imported, however in the current
- * release of the DOM the <code>DocumentType</code> is readonly. Ability
- * to add these imported nodes to a <code>DocumentType</code> will be
- * considered for addition to a future release of the DOM.On import, the
+ * <code>Notation</code> nodes can be imported, however in the current
+ * release of the DOM the <code>DocumentType</code> is readonly. Ability
+ * to add these imported nodes to a <code>DocumentType</code> will be
+ * considered for addition to a future release of the DOM.On import, the
* <code>publicId</code> and <code>systemId</code> attributes are copied.
- * Note that the <code>deep</code> parameter has no effect on this type
+ * Note that the <code>deep</code> parameter has no effect on this type
* of nodes since they cannot have any children.</dd>
* <dt>
* PROCESSING_INSTRUCTION_NODE</dt>
- * <dd>The imported node copies its
- * <code>target</code> and <code>data</code> values from those of the
- * source node.Note that the <code>deep</code> parameter has no effect
+ * <dd>The imported node copies its
+ * <code>target</code> and <code>data</code> values from those of the
+ * source node.Note that the <code>deep</code> parameter has no effect
* on this type of nodes since they cannot have any children.</dd>
- * <dt>TEXT_NODE,
+ * <dt>TEXT_NODE,
* CDATA_SECTION_NODE, COMMENT_NODE</dt>
- * <dd>These three types of nodes inheriting
- * from <code>CharacterData</code> copy their <code>data</code> and
- * <code>length</code> attributes from those of the source node.Note
- * that the <code>deep</code> parameter has no effect on these types of
+ * <dd>These three types of nodes inheriting
+ * from <code>CharacterData</code> copy their <code>data</code> and
+ * <code>length</code> attributes from those of the source node.Note
+ * that the <code>deep</code> parameter has no effect on these types of
* nodes since they cannot have any children.</dd>
- * </dl>
+ * </dl>
* @param importedNode The node to import.
- * @param deep If <code>true</code>, recursively import the subtree under
- * the specified node; if <code>false</code>, import only the node
- * itself, as explained above. This has no effect on nodes that cannot
- * have any children, and on <code>Attr</code>, and
+ * @param deep If <code>true</code>, recursively import the subtree under
+ * the specified node; if <code>false</code>, import only the node
+ * itself, as explained above. This has no effect on nodes that cannot
+ * have any children, and on <code>Attr</code>, and
* <code>EntityReference</code> nodes.
* @return The imported node that belongs to this <code>Document</code>.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
+ * NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
* supported.
- * <br>INVALID_CHARACTER_ERR: Raised if one of the imported names is not
- * an XML name according to the XML version in use specified in the
- * <code>Document.xmlVersion</code> attribute. This may happen when
- * importing an XML 1.1 [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] element
+ * <br>INVALID_CHARACTER_ERR: Raised if one of the imported names is not
+ * an XML name according to the XML version in use specified in the
+ * <code>Document.xmlVersion</code> attribute. This may happen when
+ * importing an XML 1.1 [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] element
* into an XML 1.0 document, for instance.
* @since DOM Level 2
*/
- public Node importNode(Node importedNode,
+ public Node importNode(Node importedNode,
boolean deep)
throws DOMException;
/**
* Creates an element of the given qualified name and namespace URI.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
+ * , applications must use the value <code>null</code> as the
* namespaceURI parameter for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the element to create.
- * @param qualifiedName The qualified name of the element type to
+ * @param qualifiedName The qualified name of the element type to
* instantiate.
- * @return A new <code>Element</code> object with the following
+ * @return A new <code>Element</code> object with the following
* attributes:
* <table border='1' cellpadding='3'>
* <tr>
@@ -340,13 +340,13 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.prefix</code></td>
- * <td valign='top' rowspan='1' colspan='1'>prefix, extracted
- * from <code>qualifiedName</code>, or <code>null</code> if there is
+ * <td valign='top' rowspan='1' colspan='1'>prefix, extracted
+ * from <code>qualifiedName</code>, or <code>null</code> if there is
* no prefix</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
- * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
+ * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
@@ -356,35 +356,35 @@
* </tr>
* </table>
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified
- * <code>qualifiedName</code> is not an XML name according to the XML
- * version in use specified in the <code>Document.xmlVersion</code>
+ * INVALID_CHARACTER_ERR: Raised if the specified
+ * <code>qualifiedName</code> is not an XML name according to the XML
+ * version in use specified in the <code>Document.xmlVersion</code>
* attribute.
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
- * malformed qualified name, if the <code>qualifiedName</code> has a
- * prefix and the <code>namespaceURI</code> is <code>null</code>, or
- * if the <code>qualifiedName</code> has a prefix that is "xml" and
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, if the <code>qualifiedName</code> has a
+ * prefix and the <code>namespaceURI</code> is <code>null</code>, or
+ * if the <code>qualifiedName</code> has a prefix that is "xml" and
* the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
* http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , or if the <code>qualifiedName</code> or its prefix is "xmlns" and
+ * , or if the <code>qualifiedName</code> or its prefix is "xmlns" and
* the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
- * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
- * support the <code>"XML"</code> feature, since namespaces were
+ * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
+ * support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2
*/
- public Element createElementNS(String namespaceURI,
+ public Element createElementNS(String namespaceURI,
String qualifiedName)
throws DOMException;
/**
* Creates an attribute of the given qualified name and namespace URI.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param namespaceURI The namespace URI of the attribute to create.
- * @param qualifiedName The qualified name of the attribute to
+ * @param qualifiedName The qualified name of the attribute to
* instantiate.
* @return A new <code>Attr</code> object with the following attributes:
* <table border='1' cellpadding='3'>
@@ -405,13 +405,13 @@
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* <code>Node.prefix</code></td>
- * <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
- * <code>qualifiedName</code>, or <code>null</code> if there is no
+ * <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
+ * <code>qualifiedName</code>, or <code>null</code> if there is no
* prefix</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
- * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
+ * <td valign='top' rowspan='1' colspan='1'>local name, extracted from
* <code>qualifiedName</code></td>
* </tr>
* <tr>
@@ -421,53 +421,53 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeValue</code></td>
- * <td valign='top' rowspan='1' colspan='1'>the empty
+ * <td valign='top' rowspan='1' colspan='1'>the empty
* string</td>
* </tr>
* </table>
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified
- * <code>qualifiedName</code> is not an XML name according to the XML
- * version in use specified in the <code>Document.xmlVersion</code>
+ * INVALID_CHARACTER_ERR: Raised if the specified
+ * <code>qualifiedName</code> is not an XML name according to the XML
+ * version in use specified in the <code>Document.xmlVersion</code>
* attribute.
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
- * malformed qualified name, if the <code>qualifiedName</code> has a
- * prefix and the <code>namespaceURI</code> is <code>null</code>, if
- * the <code>qualifiedName</code> has a prefix that is "xml" and the
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, if the <code>qualifiedName</code> has a
+ * prefix and the <code>namespaceURI</code> is <code>null</code>, if
+ * the <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
- * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
+ * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
* <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
- * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
- * support the <code>"XML"</code> feature, since namespaces were
+ * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
+ * support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
* @since DOM Level 2
*/
- public Attr createAttributeNS(String namespaceURI,
+ public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all the <code>Elements</code> with a
+ * Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given local name and namespace URI in document order.
- * @param namespaceURI The namespace URI of the elements to match on. The
+ * @param namespaceURI The namespace URI of the elements to match on. The
* special value <code>"*"</code> matches all namespaces.
- * @param localName The local name of the elements to match on. The
+ * @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
- * @return A new <code>NodeList</code> object containing all the matched
+ * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
* @since DOM Level 2
*/
- public NodeList getElementsByTagNameNS(String namespaceURI,
+ public NodeList getElementsByTagNameNS(String namespaceURI,
String localName);
/**
- * Returns the <code>Element</code> that has an ID attribute with the
+ * Returns the <code>Element</code> that has an ID attribute with the
* given value. If no such element exists, this returns <code>null</code>
- * . If more than one element has an ID attribute with that value, what
- * is returned is undefined.
- * <br> The DOM implementation is expected to use the attribute
- * <code>Attr.isId</code> to determine if an attribute is of type ID.
- * <p ><b>Note:</b> Attributes with the name "ID" or "id" are not of type
+ * . If more than one element has an ID attribute with that value, what
+ * is returned is undefined.
+ * <br> The DOM implementation is expected to use the attribute
+ * <code>Attr.isId</code> to determine if an attribute is of type ID.
+ * <p ><b>Note:</b> Attributes with the name "ID" or "id" are not of type
* ID unless so defined.
* @param elementId The unique <code>id</code> value for an element.
* @return The matching element or <code>null</code> if there is none.
@@ -476,179 +476,179 @@
public Element getElementById(String elementId);
/**
- * An attribute specifying the encoding used for this document at the time
- * of the parsing. This is <code>null</code> when it is not known, such
+ * An attribute specifying the encoding used for this document at the time
+ * of the parsing. This is <code>null</code> when it is not known, such
* as when the <code>Document</code> was created in memory.
* @since DOM Level 3
*/
public String getInputEncoding();
/**
- * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the encoding of this document. This is <code>null</code> when
- * unspecified or when it is not known, such as when the
+ * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the encoding of this document. This is <code>null</code> when
+ * unspecified or when it is not known, such as when the
* <code>Document</code> was created in memory.
* @since DOM Level 3
*/
public String getXmlEncoding();
/**
- * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, whether this document is standalone. This is <code>false</code> when
+ * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, whether this document is standalone. This is <code>false</code> when
* unspecified.
- * <p ><b>Note:</b> No verification is done on the value when setting
- * this attribute. Applications should use
- * <code>Document.normalizeDocument()</code> with the "validate"
- * parameter to verify if the value matches the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
- * constraint for standalone document declaration</a> as defined in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
+ * <p ><b>Note:</b> No verification is done on the value when setting
+ * this attribute. Applications should use
+ * <code>Document.normalizeDocument()</code> with the "validate"
+ * parameter to verify if the value matches the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
+ * constraint for standalone document declaration</a> as defined in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
* @since DOM Level 3
*/
public boolean getXmlStandalone();
/**
- * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, whether this document is standalone. This is <code>false</code> when
+ * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, whether this document is standalone. This is <code>false</code> when
* unspecified.
- * <p ><b>Note:</b> No verification is done on the value when setting
- * this attribute. Applications should use
- * <code>Document.normalizeDocument()</code> with the "validate"
- * parameter to verify if the value matches the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
- * constraint for standalone document declaration</a> as defined in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
+ * <p ><b>Note:</b> No verification is done on the value when setting
+ * this attribute. Applications should use
+ * <code>Document.normalizeDocument()</code> with the "validate"
+ * parameter to verify if the value matches the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-rmd'>validity
+ * constraint for standalone document declaration</a> as defined in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if this document does not support the
- * "XML" feature.
+ * NOT_SUPPORTED_ERR: Raised if this document does not support the
+ * "XML" feature.
* @since DOM Level 3
*/
public void setXmlStandalone(boolean xmlStandalone)
throws DOMException;
/**
- * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
- * this document supports the "XML" feature, the value is
- * <code>"1.0"</code>. If this document does not support the "XML"
- * feature, the value is always <code>null</code>. Changing this
- * attribute will affect methods that check for invalid characters in
- * XML names. Application should invoke
- * <code>Document.normalizeDocument()</code> in order to check for
- * invalid characters in the <code>Node</code>s that are already part of
- * this <code>Document</code>.
- * <br> DOM applications may use the
- * <code>DOMImplementation.hasFeature(feature, version)</code> method
- * with parameter values "XMLVersion" and "1.0" (respectively) to
- * determine if an implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
- * applications may use the same method with parameter values
- * "XMLVersion" and "1.1" (respectively) to determine if an
- * implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
- * cases, in order to support XML, an implementation must also support
+ * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
+ * this document supports the "XML" feature, the value is
+ * <code>"1.0"</code>. If this document does not support the "XML"
+ * feature, the value is always <code>null</code>. Changing this
+ * attribute will affect methods that check for invalid characters in
+ * XML names. Application should invoke
+ * <code>Document.normalizeDocument()</code> in order to check for
+ * invalid characters in the <code>Node</code>s that are already part of
+ * this <code>Document</code>.
+ * <br> DOM applications may use the
+ * <code>DOMImplementation.hasFeature(feature, version)</code> method
+ * with parameter values "XMLVersion" and "1.0" (respectively) to
+ * determine if an implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
+ * applications may use the same method with parameter values
+ * "XMLVersion" and "1.1" (respectively) to determine if an
+ * implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
+ * cases, in order to support XML, an implementation must also support
* the "XML" feature defined in this specification. <code>Document</code>
- * objects supporting a version of the "XMLVersion" feature must not
- * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
- * number when using <code>Document.xmlVersion</code>.
+ * objects supporting a version of the "XMLVersion" feature must not
+ * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
+ * number when using <code>Document.xmlVersion</code>.
* @since DOM Level 3
*/
public String getXmlVersion();
/**
- * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
- * this document supports the "XML" feature, the value is
- * <code>"1.0"</code>. If this document does not support the "XML"
- * feature, the value is always <code>null</code>. Changing this
- * attribute will affect methods that check for invalid characters in
- * XML names. Application should invoke
- * <code>Document.normalizeDocument()</code> in order to check for
- * invalid characters in the <code>Node</code>s that are already part of
- * this <code>Document</code>.
- * <br> DOM applications may use the
- * <code>DOMImplementation.hasFeature(feature, version)</code> method
- * with parameter values "XMLVersion" and "1.0" (respectively) to
- * determine if an implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
- * applications may use the same method with parameter values
- * "XMLVersion" and "1.1" (respectively) to determine if an
- * implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
- * cases, in order to support XML, an implementation must also support
+ * An attribute specifying, as part of the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-XMLDecl'>XML declaration</a>, the version number of this document. If there is no declaration and if
+ * this document supports the "XML" feature, the value is
+ * <code>"1.0"</code>. If this document does not support the "XML"
+ * feature, the value is always <code>null</code>. Changing this
+ * attribute will affect methods that check for invalid characters in
+ * XML names. Application should invoke
+ * <code>Document.normalizeDocument()</code> in order to check for
+ * invalid characters in the <code>Node</code>s that are already part of
+ * this <code>Document</code>.
+ * <br> DOM applications may use the
+ * <code>DOMImplementation.hasFeature(feature, version)</code> method
+ * with parameter values "XMLVersion" and "1.0" (respectively) to
+ * determine if an implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. DOM
+ * applications may use the same method with parameter values
+ * "XMLVersion" and "1.1" (respectively) to determine if an
+ * implementation supports [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]. In both
+ * cases, in order to support XML, an implementation must also support
* the "XML" feature defined in this specification. <code>Document</code>
- * objects supporting a version of the "XMLVersion" feature must not
- * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
- * number when using <code>Document.xmlVersion</code>.
+ * objects supporting a version of the "XMLVersion" feature must not
+ * raise a <code>NOT_SUPPORTED_ERR</code> exception for the same version
+ * number when using <code>Document.xmlVersion</code>.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
- * not supported by this <code>Document</code> or if this document
- * does not support the "XML" feature.
+ * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
+ * not supported by this <code>Document</code> or if this document
+ * does not support the "XML" feature.
* @since DOM Level 3
*/
public void setXmlVersion(String xmlVersion)
throws DOMException;
/**
- * An attribute specifying whether error checking is enforced or not. When
- * set to <code>false</code>, the implementation is free to not test
- * every possible error case normally defined on DOM operations, and not
- * raise any <code>DOMException</code> on DOM operations or report
- * errors while using <code>Document.normalizeDocument()</code>. In case
- * of error, the behavior is undefined. This attribute is
+ * An attribute specifying whether error checking is enforced or not. When
+ * set to <code>false</code>, the implementation is free to not test
+ * every possible error case normally defined on DOM operations, and not
+ * raise any <code>DOMException</code> on DOM operations or report
+ * errors while using <code>Document.normalizeDocument()</code>. In case
+ * of error, the behavior is undefined. This attribute is
* <code>true</code> by default.
* @since DOM Level 3
*/
public boolean getStrictErrorChecking();
/**
- * An attribute specifying whether error checking is enforced or not. When
- * set to <code>false</code>, the implementation is free to not test
- * every possible error case normally defined on DOM operations, and not
- * raise any <code>DOMException</code> on DOM operations or report
- * errors while using <code>Document.normalizeDocument()</code>. In case
- * of error, the behavior is undefined. This attribute is
+ * An attribute specifying whether error checking is enforced or not. When
+ * set to <code>false</code>, the implementation is free to not test
+ * every possible error case normally defined on DOM operations, and not
+ * raise any <code>DOMException</code> on DOM operations or report
+ * errors while using <code>Document.normalizeDocument()</code>. In case
+ * of error, the behavior is undefined. This attribute is
* <code>true</code> by default.
* @since DOM Level 3
*/
public void setStrictErrorChecking(boolean strictErrorChecking);
/**
- * The location of the document or <code>null</code> if undefined or if
- * the <code>Document</code> was created using
- * <code>DOMImplementation.createDocument</code>. No lexical checking is
- * performed when setting this attribute; this could result in a
+ * The location of the document or <code>null</code> if undefined or if
+ * the <code>Document</code> was created using
+ * <code>DOMImplementation.createDocument</code>. No lexical checking is
+ * performed when setting this attribute; this could result in a
* <code>null</code> value returned when using <code>Node.baseURI</code>
- * .
- * <br> Beware that when the <code>Document</code> supports the feature
+ * .
+ * <br> Beware that when the <code>Document</code> supports the feature
* "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * , the href attribute of the HTML BASE element takes precedence over
- * this attribute when computing <code>Node.baseURI</code>.
+ * , the href attribute of the HTML BASE element takes precedence over
+ * this attribute when computing <code>Node.baseURI</code>.
* @since DOM Level 3
*/
public String getDocumentURI();
/**
- * The location of the document or <code>null</code> if undefined or if
- * the <code>Document</code> was created using
- * <code>DOMImplementation.createDocument</code>. No lexical checking is
- * performed when setting this attribute; this could result in a
+ * The location of the document or <code>null</code> if undefined or if
+ * the <code>Document</code> was created using
+ * <code>DOMImplementation.createDocument</code>. No lexical checking is
+ * performed when setting this attribute; this could result in a
* <code>null</code> value returned when using <code>Node.baseURI</code>
- * .
- * <br> Beware that when the <code>Document</code> supports the feature
+ * .
+ * <br> Beware that when the <code>Document</code> supports the feature
* "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * , the href attribute of the HTML BASE element takes precedence over
- * this attribute when computing <code>Node.baseURI</code>.
+ * , the href attribute of the HTML BASE element takes precedence over
+ * this attribute when computing <code>Node.baseURI</code>.
* @since DOM Level 3
*/
public void setDocumentURI(String documentURI);
/**
- * Attempts to adopt a node from another document to this document. If
- * supported, it changes the <code>ownerDocument</code> of the source
- * node, its children, as well as the attached attribute nodes if there
- * are any. If the source node has a parent it is first removed from the
- * child list of its parent. This effectively allows moving a subtree
- * from one document to another (unlike <code>importNode()</code> which
- * create a copy of the source node instead of moving it). When it
- * fails, applications should use <code>Document.importNode()</code>
- * instead. Note that if the adopted node is already part of this
- * document (i.e. the source and target document are the same), this
- * method still has the effect of removing the source node from the
- * child list of its parent, if any. The following list describes the
- * specifics for each type of node.
+ * Attempts to adopt a node from another document to this document. If
+ * supported, it changes the <code>ownerDocument</code> of the source
+ * node, its children, as well as the attached attribute nodes if there
+ * are any. If the source node has a parent it is first removed from the
+ * child list of its parent. This effectively allows moving a subtree
+ * from one document to another (unlike <code>importNode()</code> which
+ * create a copy of the source node instead of moving it). When it
+ * fails, applications should use <code>Document.importNode()</code>
+ * instead. Note that if the adopted node is already part of this
+ * document (i.e. the source and target document are the same), this
+ * method still has the effect of removing the source node from the
+ * child list of its parent, if any. The following list describes the
+ * specifics for each type of node.
* <dl>
* <dt>ATTRIBUTE_NODE</dt>
- * <dd>The
- * <code>ownerElement</code> attribute is set to <code>null</code> and
- * the <code>specified</code> flag is set to <code>true</code> on the
- * adopted <code>Attr</code>. The descendants of the source
+ * <dd>The
+ * <code>ownerElement</code> attribute is set to <code>null</code> and
+ * the <code>specified</code> flag is set to <code>true</code> on the
+ * adopted <code>Attr</code>. The descendants of the source
* <code>Attr</code> are recursively adopted.</dd>
* <dt>DOCUMENT_FRAGMENT_NODE</dt>
- * <dd>The
+ * <dd>The
* descendants of the source node are recursively adopted.</dd>
* <dt>DOCUMENT_NODE</dt>
* <dd>
@@ -657,41 +657,41 @@
* <dd>
* <code>DocumentType</code> nodes cannot be adopted.</dd>
* <dt>ELEMENT_NODE</dt>
- * <dd><em>Specified</em> attribute nodes of the source element are adopted. Default attributes
- * are discarded, though if the document being adopted into defines
- * default attributes for this element name, those are assigned. The
+ * <dd><em>Specified</em> attribute nodes of the source element are adopted. Default attributes
+ * are discarded, though if the document being adopted into defines
+ * default attributes for this element name, those are assigned. The
* descendants of the source element are recursively adopted.</dd>
* <dt>ENTITY_NODE</dt>
* <dd>
* <code>Entity</code> nodes cannot be adopted.</dd>
* <dt>ENTITY_REFERENCE_NODE</dt>
- * <dd>Only
- * the <code>EntityReference</code> node itself is adopted, the
- * descendants are discarded, since the source and destination documents
- * might have defined the entity differently. If the document being
- * imported into provides a definition for this entity name, its value
+ * <dd>Only
+ * the <code>EntityReference</code> node itself is adopted, the
+ * descendants are discarded, since the source and destination documents
+ * might have defined the entity differently. If the document being
+ * imported into provides a definition for this entity name, its value
* is assigned.</dd>
* <dt>NOTATION_NODE</dt>
- * <dd><code>Notation</code> nodes cannot be
+ * <dd><code>Notation</code> nodes cannot be
* adopted.</dd>
- * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE,
+ * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE,
* COMMENT_NODE</dt>
* <dd>These nodes can all be adopted. No specifics.</dd>
- * </dl>
- * <p ><b>Note:</b> Since it does not create new nodes unlike the
- * <code>Document.importNode()</code> method, this method does not raise
- * an <code>INVALID_CHARACTER_ERR</code> exception, and applications
- * should use the <code>Document.normalizeDocument()</code> method to
- * check if an imported name is not an XML name according to the XML
- * version in use.
+ * </dl>
+ * <p ><b>Note:</b> Since it does not create new nodes unlike the
+ * <code>Document.importNode()</code> method, this method does not raise
+ * an <code>INVALID_CHARACTER_ERR</code> exception, and applications
+ * should use the <code>Document.normalizeDocument()</code> method to
+ * check if an imported name is not an XML name according to the XML
+ * version in use.
* @param source The node to move into this document.
- * @return The adopted node, or <code>null</code> if this operation
- * fails, such as when the source node comes from a different
+ * @return The adopted node, or <code>null</code> if this operation
+ * fails, such as when the source node comes from a different
* implementation.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the source node is of type
+ * NOT_SUPPORTED_ERR: Raised if the source node is of type
* <code>DOCUMENT</code>, <code>DOCUMENT_TYPE</code>.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is
* readonly.
* @since DOM Level 3
*/
@@ -699,115 +699,115 @@
throws DOMException;
/**
- * The configuration used when <code>Document.normalizeDocument()</code>
- * is invoked.
+ * The configuration used when <code>Document.normalizeDocument()</code>
+ * is invoked.
* @since DOM Level 3
*/
public DOMConfiguration getDomConfig();
/**
- * This method acts as if the document was going through a save and load
- * cycle, putting the document in a "normal" form. As a consequence,
- * this method updates the replacement tree of
- * <code>EntityReference</code> nodes and normalizes <code>Text</code>
- * nodes, as defined in the method <code>Node.normalize()</code>.
- * <br> Otherwise, the actual result depends on the features being set on
- * the <code>Document.domConfig</code> object and governing what
- * operations actually take place. Noticeably this method could also
- * make the document namespace well-formed according to the algorithm
- * described in , check the character normalization, remove the
- * <code>CDATASection</code> nodes, etc. See
- * <code>DOMConfiguration</code> for details.
- * <pre>// Keep in the document
- * the information defined // in the XML Information Set (Java example)
- * DOMConfiguration docConfig = myDocument.getDomConfig();
- * docConfig.setParameter("infoset", Boolean.TRUE);
+ * This method acts as if the document was going through a save and load
+ * cycle, putting the document in a "normal" form. As a consequence,
+ * this method updates the replacement tree of
+ * <code>EntityReference</code> nodes and normalizes <code>Text</code>
+ * nodes, as defined in the method <code>Node.normalize()</code>.
+ * <br> Otherwise, the actual result depends on the features being set on
+ * the <code>Document.domConfig</code> object and governing what
+ * operations actually take place. Noticeably this method could also
+ * make the document namespace well-formed according to the algorithm
+ * described in , check the character normalization, remove the
+ * <code>CDATASection</code> nodes, etc. See
+ * <code>DOMConfiguration</code> for details.
+ * <pre>// Keep in the document
+ * the information defined // in the XML Information Set (Java example)
+ * DOMConfiguration docConfig = myDocument.getDomConfig();
+ * docConfig.setParameter("infoset", Boolean.TRUE);
* myDocument.normalizeDocument();</pre>
- *
- * <br>Mutation events, when supported, are generated to reflect the
+ *
+ * <br>Mutation events, when supported, are generated to reflect the
* changes occurring on the document.
- * <br> If errors occur during the invocation of this method, such as an
- * attempt to update a read-only node or a <code>Node.nodeName</code>
- * contains an invalid character according to the XML version in use,
- * errors or warnings (<code>DOMError.SEVERITY_ERROR</code> or
- * <code>DOMError.SEVERITY_WARNING</code>) will be reported using the
+ * <br> If errors occur during the invocation of this method, such as an
+ * attempt to update a read-only node or a <code>Node.nodeName</code>
+ * contains an invalid character according to the XML version in use,
+ * errors or warnings (<code>DOMError.SEVERITY_ERROR</code> or
+ * <code>DOMError.SEVERITY_WARNING</code>) will be reported using the
* <code>DOMErrorHandler</code> object associated with the "error-handler
* " parameter. Note this method might also report fatal errors (
- * <code>DOMError.SEVERITY_FATAL_ERROR</code>) if an implementation
- * cannot recover from an error.
+ * <code>DOMError.SEVERITY_FATAL_ERROR</code>) if an implementation
+ * cannot recover from an error.
* @since DOM Level 3
*/
public void normalizeDocument();
/**
- * Rename an existing node of type <code>ELEMENT_NODE</code> or
+ * Rename an existing node of type <code>ELEMENT_NODE</code> or
* <code>ATTRIBUTE_NODE</code>.
- * <br>When possible this simply changes the name of the given node,
- * otherwise this creates a new node with the specified name and
+ * <br>When possible this simply changes the name of the given node,
+ * otherwise this creates a new node with the specified name and
* replaces the existing node with the new node as described below.
- * <br>If simply changing the name of the given node is not possible, the
- * following operations are performed: a new node is created, any
- * registered event listener is registered on the new node, any user
- * data attached to the old node is removed from that node, the old node
- * is removed from its parent if it has one, the children are moved to
- * the new node, if the renamed node is an <code>Element</code> its
- * attributes are moved to the new node, the new node is inserted at the
- * position the old node used to have in its parent's child nodes list
- * if it has one, the user data that was attached to the old node is
+ * <br>If simply changing the name of the given node is not possible, the
+ * following operations are performed: a new node is created, any
+ * registered event listener is registered on the new node, any user
+ * data attached to the old node is removed from that node, the old node
+ * is removed from its parent if it has one, the children are moved to
+ * the new node, if the renamed node is an <code>Element</code> its
+ * attributes are moved to the new node, the new node is inserted at the
+ * position the old node used to have in its parent's child nodes list
+ * if it has one, the user data that was attached to the old node is
* attached to the new node.
- * <br>When the node being renamed is an <code>Element</code> only the
- * specified attributes are moved, default attributes originated from
- * the DTD are updated according to the new element name. In addition,
- * the implementation may update default attributes from other schemas.
- * Applications should use <code>Document.normalizeDocument()</code> to
+ * <br>When the node being renamed is an <code>Element</code> only the
+ * specified attributes are moved, default attributes originated from
+ * the DTD are updated according to the new element name. In addition,
+ * the implementation may update default attributes from other schemas.
+ * Applications should use <code>Document.normalizeDocument()</code> to
* guarantee these attributes are up-to-date.
- * <br>When the node being renamed is an <code>Attr</code> that is
- * attached to an <code>Element</code>, the node is first removed from
- * the <code>Element</code> attributes map. Then, once renamed, either
- * by modifying the existing node or creating a new one as described
+ * <br>When the node being renamed is an <code>Attr</code> that is
+ * attached to an <code>Element</code>, the node is first removed from
+ * the <code>Element</code> attributes map. Then, once renamed, either
+ * by modifying the existing node or creating a new one as described
* above, it is put back.
* <br>In addition,
* <ul>
- * <li> a user data event <code>NODE_RENAMED</code> is fired,
+ * <li> a user data event <code>NODE_RENAMED</code> is fired,
* </li>
- * <li>
- * when the implementation supports the feature "MutationNameEvents",
- * each mutation operation involved in this method fires the appropriate
+ * <li>
+ * when the implementation supports the feature "MutationNameEvents",
+ * each mutation operation involved in this method fires the appropriate
* event, and in the end the event {
- * <code>http://www.w3.org/2001/xml-events</code>,
+ * <code>http://www.w3.org/2001/xml-events</code>,
* <code>DOMElementNameChanged</code>} or {
- * <code>http://www.w3.org/2001/xml-events</code>,
- * <code>DOMAttributeNameChanged</code>} is fired.
+ * <code>http://www.w3.org/2001/xml-events</code>,
+ * <code>DOMAttributeNameChanged</code>} is fired.
* </li>
* </ul>
* @param n The node to rename.
* @param namespaceURI The new namespace URI.
* @param qualifiedName The new qualified name.
- * @return The renamed node. This is either the specified node or the new
+ * @return The renamed node. This is either the specified node or the new
* node that was created to replace the specified node.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised when the type of the specified node is
- * neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>,
- * or if the implementation does not support the renaming of the
+ * NOT_SUPPORTED_ERR: Raised when the type of the specified node is
+ * neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>,
+ * or if the implementation does not support the renaming of the
* document element.
- * <br>INVALID_CHARACTER_ERR: Raised if the new qualified name is not an
- * XML name according to the XML version in use specified in the
+ * <br>INVALID_CHARACTER_ERR: Raised if the new qualified name is not an
+ * XML name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
- * <br>WRONG_DOCUMENT_ERR: Raised when the specified node was created
+ * <br>WRONG_DOCUMENT_ERR: Raised when the specified node was created
* from a different document than this document.
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
- * malformed qualified name, if the <code>qualifiedName</code> has a
- * prefix and the <code>namespaceURI</code> is <code>null</code>, or
- * if the <code>qualifiedName</code> has a prefix that is "xml" and
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, if the <code>qualifiedName</code> has a
+ * prefix and the <code>namespaceURI</code> is <code>null</code>, or
+ * if the <code>qualifiedName</code> has a prefix that is "xml" and
* the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
* http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * . Also raised, when the node being renamed is an attribute, if the
- * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
+ * . Also raised, when the node being renamed is an attribute, if the
+ * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
* <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>".
* @since DOM Level 3
*/
- public Node renameNode(Node n,
- String namespaceURI,
+ public Node renameNode(Node n,
+ String namespaceURI,
String qualifiedName)
throws DOMException;
diff --git a/luni/src/main/java/org/w3c/dom/DocumentFragment.java b/luni/src/main/java/org/w3c/dom/DocumentFragment.java
index 8c4531e..6873915 100644
--- a/luni/src/main/java/org/w3c/dom/DocumentFragment.java
+++ b/luni/src/main/java/org/w3c/dom/DocumentFragment.java
@@ -13,39 +13,39 @@
package org.w3c.dom;
/**
- * <code>DocumentFragment</code> is a "lightweight" or "minimal"
- * <code>Document</code> object. It is very common to want to be able to
- * extract a portion of a document's tree or to create a new fragment of a
- * document. Imagine implementing a user command like cut or rearranging a
- * document by moving fragments around. It is desirable to have an object
- * which can hold such fragments and it is quite natural to use a Node for
- * this purpose. While it is true that a <code>Document</code> object could
- * fulfill this role, a <code>Document</code> object can potentially be a
- * heavyweight object, depending on the underlying implementation. What is
- * really needed for this is a very lightweight object.
+ * <code>DocumentFragment</code> is a "lightweight" or "minimal"
+ * <code>Document</code> object. It is very common to want to be able to
+ * extract a portion of a document's tree or to create a new fragment of a
+ * document. Imagine implementing a user command like cut or rearranging a
+ * document by moving fragments around. It is desirable to have an object
+ * which can hold such fragments and it is quite natural to use a Node for
+ * this purpose. While it is true that a <code>Document</code> object could
+ * fulfill this role, a <code>Document</code> object can potentially be a
+ * heavyweight object, depending on the underlying implementation. What is
+ * really needed for this is a very lightweight object.
* <code>DocumentFragment</code> is such an object.
- * <p>Furthermore, various operations -- such as inserting nodes as children
- * of another <code>Node</code> -- may take <code>DocumentFragment</code>
- * objects as arguments; this results in all the child nodes of the
+ * <p>Furthermore, various operations -- such as inserting nodes as children
+ * of another <code>Node</code> -- may take <code>DocumentFragment</code>
+ * objects as arguments; this results in all the child nodes of the
* <code>DocumentFragment</code> being moved to the child list of this node.
- * <p>The children of a <code>DocumentFragment</code> node are zero or more
- * nodes representing the tops of any sub-trees defining the structure of
- * the document. <code>DocumentFragment</code> nodes do not need to be
- * well-formed XML documents (although they do need to follow the rules
- * imposed upon well-formed XML parsed entities, which can have multiple top
- * nodes). For example, a <code>DocumentFragment</code> might have only one
- * child and that child node could be a <code>Text</code> node. Such a
- * structure model represents neither an HTML document nor a well-formed XML
+ * <p>The children of a <code>DocumentFragment</code> node are zero or more
+ * nodes representing the tops of any sub-trees defining the structure of
+ * the document. <code>DocumentFragment</code> nodes do not need to be
+ * well-formed XML documents (although they do need to follow the rules
+ * imposed upon well-formed XML parsed entities, which can have multiple top
+ * nodes). For example, a <code>DocumentFragment</code> might have only one
+ * child and that child node could be a <code>Text</code> node. Such a
+ * structure model represents neither an HTML document nor a well-formed XML
* document.
- * <p>When a <code>DocumentFragment</code> is inserted into a
- * <code>Document</code> (or indeed any other <code>Node</code> that may
- * take children) the children of the <code>DocumentFragment</code> and not
- * the <code>DocumentFragment</code> itself are inserted into the
- * <code>Node</code>. This makes the <code>DocumentFragment</code> very
- * useful when the user wishes to create nodes that are siblings; the
- * <code>DocumentFragment</code> acts as the parent of these nodes so that
- * the user can use the standard methods from the <code>Node</code>
- * interface, such as <code>Node.insertBefore</code> and
+ * <p>When a <code>DocumentFragment</code> is inserted into a
+ * <code>Document</code> (or indeed any other <code>Node</code> that may
+ * take children) the children of the <code>DocumentFragment</code> and not
+ * the <code>DocumentFragment</code> itself are inserted into the
+ * <code>Node</code>. This makes the <code>DocumentFragment</code> very
+ * useful when the user wishes to create nodes that are siblings; the
+ * <code>DocumentFragment</code> acts as the parent of these nodes so that
+ * the user can use the standard methods from the <code>Node</code>
+ * interface, such as <code>Node.insertBefore</code> and
* <code>Node.appendChild</code>.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
diff --git a/luni/src/main/java/org/w3c/dom/DocumentType.java b/luni/src/main/java/org/w3c/dom/DocumentType.java
index 6221c7b..7855781 100644
--- a/luni/src/main/java/org/w3c/dom/DocumentType.java
+++ b/luni/src/main/java/org/w3c/dom/DocumentType.java
@@ -13,45 +13,45 @@
package org.w3c.dom;
/**
- * Each <code>Document</code> has a <code>doctype</code> attribute whose value
- * is either <code>null</code> or a <code>DocumentType</code> object. The
- * <code>DocumentType</code> interface in the DOM Core provides an interface
- * to the list of entities that are defined for the document, and little
- * else because the effect of namespaces and the various XML schema efforts
+ * Each <code>Document</code> has a <code>doctype</code> attribute whose value
+ * is either <code>null</code> or a <code>DocumentType</code> object. The
+ * <code>DocumentType</code> interface in the DOM Core provides an interface
+ * to the list of entities that are defined for the document, and little
+ * else because the effect of namespaces and the various XML schema efforts
* on DTD representation are not clearly understood as of this writing.
- * <p>DOM Level 3 doesn't support editing <code>DocumentType</code> nodes.
+ * <p>DOM Level 3 doesn't support editing <code>DocumentType</code> nodes.
* <code>DocumentType</code> nodes are read-only.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DocumentType extends Node {
/**
- * The name of DTD; i.e., the name immediately following the
+ * The name of DTD; i.e., the name immediately following the
* <code>DOCTYPE</code> keyword.
*/
public String getName();
/**
- * A <code>NamedNodeMap</code> containing the general entities, both
- * external and internal, declared in the DTD. Parameter entities are
- * not contained. Duplicates are discarded. For example in:
- * <pre><!DOCTYPE
- * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
- * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
+ * A <code>NamedNodeMap</code> containing the general entities, both
+ * external and internal, declared in the DTD. Parameter entities are
+ * not contained. Duplicates are discarded. For example in:
+ * <pre><!DOCTYPE
+ * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
+ * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
* ]> <ex/></pre>
- * the interface provides access to <code>foo</code>
- * and the first declaration of <code>bar</code> but not the second
- * declaration of <code>bar</code> or <code>baz</code>. Every node in
+ * the interface provides access to <code>foo</code>
+ * and the first declaration of <code>bar</code> but not the second
+ * declaration of <code>bar</code> or <code>baz</code>. Every node in
* this map also implements the <code>Entity</code> interface.
- * <br>The DOM Level 2 does not support editing entities, therefore
+ * <br>The DOM Level 2 does not support editing entities, therefore
* <code>entities</code> cannot be altered in any way.
*/
public NamedNodeMap getEntities();
/**
- * A <code>NamedNodeMap</code> containing the notations declared in the
- * DTD. Duplicates are discarded. Every node in this map also implements
+ * A <code>NamedNodeMap</code> containing the notations declared in the
+ * DTD. Duplicates are discarded. Every node in this map also implements
* the <code>Notation</code> interface.
- * <br>The DOM Level 2 does not support editing notations, therefore
+ * <br>The DOM Level 2 does not support editing notations, therefore
* <code>notations</code> cannot be altered in any way.
*/
public NamedNodeMap getNotations();
@@ -63,18 +63,18 @@
public String getPublicId();
/**
- * The system identifier of the external subset. This may be an absolute
+ * The system identifier of the external subset. This may be an absolute
* URI or not.
* @since DOM Level 2
*/
public String getSystemId();
/**
- * The internal subset as a string, or <code>null</code> if there is none.
+ * The internal subset as a string, or <code>null</code> if there is none.
* This is does not contain the delimiting square brackets.
- * <p ><b>Note:</b> The actual content returned depends on how much
- * information is available to the implementation. This may vary
- * depending on various parameters, including the XML processor used to
+ * <p ><b>Note:</b> The actual content returned depends on how much
+ * information is available to the implementation. This may vary
+ * depending on various parameters, including the XML processor used to
* build the document.
* @since DOM Level 2
*/
diff --git a/luni/src/main/java/org/w3c/dom/Element.java b/luni/src/main/java/org/w3c/dom/Element.java
index 6a7f7e3..beca7fc 100644
--- a/luni/src/main/java/org/w3c/dom/Element.java
+++ b/luni/src/main/java/org/w3c/dom/Element.java
@@ -13,33 +13,33 @@
package org.w3c.dom;
/**
- * The <code>Element</code> interface represents an element in an HTML or XML
- * document. Elements may have attributes associated with them; since the
- * <code>Element</code> interface inherits from <code>Node</code>, the
- * generic <code>Node</code> interface attribute <code>attributes</code> may
- * be used to retrieve the set of all attributes for an element. There are
- * methods on the <code>Element</code> interface to retrieve either an
- * <code>Attr</code> object by name or an attribute value by name. In XML,
- * where an attribute value may contain entity references, an
- * <code>Attr</code> object should be retrieved to examine the possibly
- * fairly complex sub-tree representing the attribute value. On the other
- * hand, in HTML, where all attributes have simple string values, methods to
+ * The <code>Element</code> interface represents an element in an HTML or XML
+ * document. Elements may have attributes associated with them; since the
+ * <code>Element</code> interface inherits from <code>Node</code>, the
+ * generic <code>Node</code> interface attribute <code>attributes</code> may
+ * be used to retrieve the set of all attributes for an element. There are
+ * methods on the <code>Element</code> interface to retrieve either an
+ * <code>Attr</code> object by name or an attribute value by name. In XML,
+ * where an attribute value may contain entity references, an
+ * <code>Attr</code> object should be retrieved to examine the possibly
+ * fairly complex sub-tree representing the attribute value. On the other
+ * hand, in HTML, where all attributes have simple string values, methods to
* directly access an attribute value can safely be used as a convenience.
- * <p ><b>Note:</b> In DOM Level 2, the method <code>normalize</code> is
+ * <p ><b>Note:</b> In DOM Level 2, the method <code>normalize</code> is
* inherited from the <code>Node</code> interface where it was moved.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Element extends Node {
/**
- * The name of the element. If <code>Node.localName</code> is different
- * from <code>null</code>, this attribute is a qualified name. For
- * example, in:
- * <pre> <elementExample id="demo"> ...
+ * The name of the element. If <code>Node.localName</code> is different
+ * from <code>null</code>, this attribute is a qualified name. For
+ * example, in:
+ * <pre> <elementExample id="demo"> ...
* </elementExample> , </pre>
- * <code>tagName</code> has the value
- * <code>"elementExample"</code>. Note that this is case-preserving in
- * XML, as are all of the operations of the DOM. The HTML DOM returns
- * the <code>tagName</code> of an HTML element in the canonical
+ * <code>tagName</code> has the value
+ * <code>"elementExample"</code>. Note that this is case-preserving in
+ * XML, as are all of the operations of the DOM. The HTML DOM returns
+ * the <code>tagName</code> of an HTML element in the canonical
* uppercase form, regardless of the case in the source HTML document.
*/
public String getTagName();
@@ -47,47 +47,47 @@
/**
* Retrieves an attribute value by name.
* @param name The name of the attribute to retrieve.
- * @return The <code>Attr</code> value as a string, or the empty string
+ * @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value.
*/
public String getAttribute(String name);
/**
- * Adds a new attribute. If an attribute with that name is already present
- * in the element, its value is changed to be that of the value
- * parameter. This value is a simple string; it is not parsed as it is
- * being set. So any markup (such as syntax to be recognized as an
- * entity reference) is treated as literal text, and needs to be
- * appropriately escaped by the implementation when it is written out.
- * In order to assign an attribute value that contains entity
- * references, the user must create an <code>Attr</code> node plus any
- * <code>Text</code> and <code>EntityReference</code> nodes, build the
- * appropriate subtree, and use <code>setAttributeNode</code> to assign
+ * Adds a new attribute. If an attribute with that name is already present
+ * in the element, its value is changed to be that of the value
+ * parameter. This value is a simple string; it is not parsed as it is
+ * being set. So any markup (such as syntax to be recognized as an
+ * entity reference) is treated as literal text, and needs to be
+ * appropriately escaped by the implementation when it is written out.
+ * In order to assign an attribute value that contains entity
+ * references, the user must create an <code>Attr</code> node plus any
+ * <code>Text</code> and <code>EntityReference</code> nodes, build the
+ * appropriate subtree, and use <code>setAttributeNode</code> to assign
* it as the value of an attribute.
- * <br>To set an attribute with a qualified name and namespace URI, use
+ * <br>To set an attribute with a qualified name and namespace URI, use
* the <code>setAttributeNS</code> method.
* @param name The name of the attribute to create or alter.
* @param value Value to set in string form.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
- * name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML
+ * name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
- public void setAttribute(String name,
+ public void setAttribute(String name,
String value)
throws DOMException;
/**
- * Removes an attribute by name. If a default value for the removed
- * attribute is defined in the DTD, a new attribute immediately appears
- * with the default value as well as the corresponding namespace URI,
- * local name, and prefix when applicable. The implementation may handle
- * default values from other schemas similarly but applications should
- * use <code>Document.normalizeDocument()</code> to guarantee this
+ * Removes an attribute by name. If a default value for the removed
+ * attribute is defined in the DTD, a new attribute immediately appears
+ * with the default value as well as the corresponding namespace URI,
+ * local name, and prefix when applicable. The implementation may handle
+ * default values from other schemas similarly but applications should
+ * use <code>Document.normalizeDocument()</code> to guarantee this
* information is up-to-date.
* <br>If no attribute with this name is found, this method has no effect.
- * <br>To remove an attribute by local name and namespace URI, use the
+ * <br>To remove an attribute by local name and namespace URI, use the
* <code>removeAttributeNS</code> method.
* @param name The name of the attribute to remove.
* @exception DOMException
@@ -98,63 +98,63 @@
/**
* Retrieves an attribute node by name.
- * <br>To retrieve an attribute node by qualified name and namespace URI,
+ * <br>To retrieve an attribute node by qualified name and namespace URI,
* use the <code>getAttributeNodeNS</code> method.
- * @param name The name (<code>nodeName</code>) of the attribute to
+ * @param name The name (<code>nodeName</code>) of the attribute to
* retrieve.
* @return The <code>Attr</code> node with the specified name (
- * <code>nodeName</code>) or <code>null</code> if there is no such
+ * <code>nodeName</code>) or <code>null</code> if there is no such
* attribute.
*/
public Attr getAttributeNode(String name);
/**
* Adds a new attribute node. If an attribute with that name (
- * <code>nodeName</code>) is already present in the element, it is
- * replaced by the new one. Replacing an attribute node by itself has no
+ * <code>nodeName</code>) is already present in the element, it is
+ * replaced by the new one. Replacing an attribute node by itself has no
* effect.
- * <br>To add a new attribute node with a qualified name and namespace
+ * <br>To add a new attribute node with a qualified name and namespace
* URI, use the <code>setAttributeNodeNS</code> method.
* @param newAttr The <code>Attr</code> node to add to the attribute list.
- * @return If the <code>newAttr</code> attribute replaces an existing
- * attribute, the replaced <code>Attr</code> node is returned,
+ * @return If the <code>newAttr</code> attribute replaces an existing
+ * attribute, the replaced <code>Attr</code> node is returned,
* otherwise <code>null</code> is returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
* different document than the one that created the element.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
- * attribute of another <code>Element</code> object. The DOM user must
- * explicitly clone <code>Attr</code> nodes to re-use them in other
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
+ * attribute of another <code>Element</code> object. The DOM user must
+ * explicitly clone <code>Attr</code> nodes to re-use them in other
* elements.
*/
public Attr setAttributeNode(Attr newAttr)
throws DOMException;
/**
- * Removes the specified attribute node. If a default value for the
- * removed <code>Attr</code> node is defined in the DTD, a new node
- * immediately appears with the default value as well as the
- * corresponding namespace URI, local name, and prefix when applicable.
- * The implementation may handle default values from other schemas
- * similarly but applications should use
- * <code>Document.normalizeDocument()</code> to guarantee this
+ * Removes the specified attribute node. If a default value for the
+ * removed <code>Attr</code> node is defined in the DTD, a new node
+ * immediately appears with the default value as well as the
+ * corresponding namespace URI, local name, and prefix when applicable.
+ * The implementation may handle default values from other schemas
+ * similarly but applications should use
+ * <code>Document.normalizeDocument()</code> to guarantee this
* information is up-to-date.
- * @param oldAttr The <code>Attr</code> node to remove from the attribute
+ * @param oldAttr The <code>Attr</code> node to remove from the attribute
* list.
* @return The <code>Attr</code> node that was removed.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute
+ * <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute
* of the element.
*/
public Attr removeAttributeNode(Attr oldAttr)
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all descendant <code>Elements</code>
+ * Returns a <code>NodeList</code> of all descendant <code>Elements</code>
* with a given tag name, in document order.
- * @param name The name of the tag to match on. The special value "*"
+ * @param name The name of the tag to match on. The special value "*"
* matches all tags.
* @return A list of matching <code>Element</code> nodes.
*/
@@ -163,174 +163,174 @@
/**
* Retrieves an attribute value by local name and namespace URI.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
- * @return The <code>Attr</code> value as a string, or the empty string
+ * @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value.
* @exception DOMException
- * NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public String getAttributeNS(String namespaceURI,
+ public String getAttributeNS(String namespaceURI,
String localName)
throws DOMException;
/**
- * Adds a new attribute. If an attribute with the same local name and
- * namespace URI is already present on the element, its prefix is
- * changed to be the prefix part of the <code>qualifiedName</code>, and
- * its value is changed to be the <code>value</code> parameter. This
- * value is a simple string; it is not parsed as it is being set. So any
- * markup (such as syntax to be recognized as an entity reference) is
- * treated as literal text, and needs to be appropriately escaped by the
- * implementation when it is written out. In order to assign an
- * attribute value that contains entity references, the user must create
- * an <code>Attr</code> node plus any <code>Text</code> and
- * <code>EntityReference</code> nodes, build the appropriate subtree,
- * and use <code>setAttributeNodeNS</code> or
- * <code>setAttributeNode</code> to assign it as the value of an
+ * Adds a new attribute. If an attribute with the same local name and
+ * namespace URI is already present on the element, its prefix is
+ * changed to be the prefix part of the <code>qualifiedName</code>, and
+ * its value is changed to be the <code>value</code> parameter. This
+ * value is a simple string; it is not parsed as it is being set. So any
+ * markup (such as syntax to be recognized as an entity reference) is
+ * treated as literal text, and needs to be appropriately escaped by the
+ * implementation when it is written out. In order to assign an
+ * attribute value that contains entity references, the user must create
+ * an <code>Attr</code> node plus any <code>Text</code> and
+ * <code>EntityReference</code> nodes, build the appropriate subtree,
+ * and use <code>setAttributeNodeNS</code> or
+ * <code>setAttributeNode</code> to assign it as the value of an
* attribute.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
- * @param namespaceURI The namespace URI of the attribute to create or
+ * @param namespaceURI The namespace URI of the attribute to create or
* alter.
- * @param qualifiedName The qualified name of the attribute to create or
+ * @param qualifiedName The qualified name of the attribute to create or
* alter.
* @param value The value to set in string form.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
- * an XML name according to the XML version in use specified in the
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
+ * an XML name according to the XML version in use specified in the
* <code>Document.xmlVersion</code> attribute.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code>, if the
- * <code>qualifiedName</code> has a prefix that is "xml" and the
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * malformed per the Namespaces in XML specification, if the
+ * <code>qualifiedName</code> has a prefix and the
+ * <code>namespaceURI</code> is <code>null</code>, if the
+ * <code>qualifiedName</code> has a prefix that is "xml" and the
* <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
- * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
+ * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
* <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public void setAttributeNS(String namespaceURI,
- String qualifiedName,
+ public void setAttributeNS(String namespaceURI,
+ String qualifiedName,
String value)
throws DOMException;
/**
- * Removes an attribute by local name and namespace URI. If a default
- * value for the removed attribute is defined in the DTD, a new
- * attribute immediately appears with the default value as well as the
- * corresponding namespace URI, local name, and prefix when applicable.
- * The implementation may handle default values from other schemas
- * similarly but applications should use
- * <code>Document.normalizeDocument()</code> to guarantee this
+ * Removes an attribute by local name and namespace URI. If a default
+ * value for the removed attribute is defined in the DTD, a new
+ * attribute immediately appears with the default value as well as the
+ * corresponding namespace URI, local name, and prefix when applicable.
+ * The implementation may handle default values from other schemas
+ * similarly but applications should use
+ * <code>Document.normalizeDocument()</code> to guarantee this
* information is up-to-date.
- * <br>If no attribute with this local name and namespace URI is found,
+ * <br>If no attribute with this local name and namespace URI is found,
* this method has no effect.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param namespaceURI The namespace URI of the attribute to remove.
* @param localName The local name of the attribute to remove.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public void removeAttributeNS(String namespaceURI,
+ public void removeAttributeNS(String namespaceURI,
String localName)
throws DOMException;
/**
* Retrieves an <code>Attr</code> node by local name and namespace URI.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
- * @return The <code>Attr</code> node with the specified attribute local
- * name and namespace URI or <code>null</code> if there is no such
+ * @return The <code>Attr</code> node with the specified attribute local
+ * name and namespace URI or <code>null</code> if there is no such
* attribute.
* @exception DOMException
- * NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public Attr getAttributeNodeNS(String namespaceURI,
+ public Attr getAttributeNodeNS(String namespaceURI,
String localName)
throws DOMException;
/**
- * Adds a new attribute. If an attribute with that local name and that
- * namespace URI is already present in the element, it is replaced by
+ * Adds a new attribute. If an attribute with that local name and that
+ * namespace URI is already present in the element, it is replaced by
* the new one. Replacing an attribute node by itself has no effect.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param newAttr The <code>Attr</code> node to add to the attribute list.
- * @return If the <code>newAttr</code> attribute replaces an existing
- * attribute with the same local name and namespace URI, the replaced
- * <code>Attr</code> node is returned, otherwise <code>null</code> is
+ * @return If the <code>newAttr</code> attribute replaces an existing
+ * attribute with the same local name and namespace URI, the replaced
+ * <code>Attr</code> node is returned, otherwise <code>null</code> is
* returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
* different document than the one that created the element.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
- * attribute of another <code>Element</code> object. The DOM user must
- * explicitly clone <code>Attr</code> nodes to re-use them in other
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
+ * attribute of another <code>Element</code> object. The DOM user must
+ * explicitly clone <code>Attr</code> nodes to re-use them in other
* elements.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Attr setAttributeNodeNS(Attr newAttr)
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all the descendant
- * <code>Elements</code> with a given local name and namespace URI in
+ * Returns a <code>NodeList</code> of all the descendant
+ * <code>Elements</code> with a given local name and namespace URI in
* document order.
- * @param namespaceURI The namespace URI of the elements to match on. The
+ * @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces.
- * @param localName The local name of the elements to match on. The
+ * @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
- * @return A new <code>NodeList</code> object containing all the matched
+ * @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
* @exception DOMException
- * NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public NodeList getElementsByTagNameNS(String namespaceURI,
+ public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
throws DOMException;
/**
- * Returns <code>true</code> when an attribute with a given name is
- * specified on this element or has a default value, <code>false</code>
+ * Returns <code>true</code> when an attribute with a given name is
+ * specified on this element or has a default value, <code>false</code>
* otherwise.
* @param name The name of the attribute to look for.
- * @return <code>true</code> if an attribute with the given name is
+ * @return <code>true</code> if an attribute with the given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
* @since DOM Level 2
@@ -338,101 +338,101 @@
public boolean hasAttribute(String name);
/**
- * Returns <code>true</code> when an attribute with a given local name and
- * namespace URI is specified on this element or has a default value,
+ * Returns <code>true</code> when an attribute with a given local name and
+ * namespace URI is specified on this element or has a default value,
* <code>false</code> otherwise.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value <code>null</code> as the
- * <code>namespaceURI</code> parameter for methods if they wish to have
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
* no namespace.
* @param namespaceURI The namespace URI of the attribute to look for.
* @param localName The local name of the attribute to look for.
- * @return <code>true</code> if an attribute with the given local name
- * and namespace URI is specified or has a default value on this
+ * @return <code>true</code> if an attribute with the given local name
+ * and namespace URI is specified or has a default value on this
* element, <code>false</code> otherwise.
* @exception DOMException
- * NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature <code>"XML"</code> and the language exposed
- * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature <code>"XML"</code> and the language exposed
+ * through the Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public boolean hasAttributeNS(String namespaceURI,
+ public boolean hasAttributeNS(String namespaceURI,
String localName)
throws DOMException;
/**
- * The type information associated with this element.
+ * The type information associated with this element.
* @since DOM Level 3
*/
public TypeInfo getSchemaTypeInfo();
/**
- * If the parameter <code>isId</code> is <code>true</code>, this method
+ * If the parameter <code>isId</code> is <code>true</code>, this method
* declares the specified attribute to be a user-determined ID attribute
- * . This affects the value of <code>Attr.isId</code> and the behavior
- * of <code>Document.getElementById</code>, but does not change any
- * schema that may be in use, in particular this does not affect the
- * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
- * node. Use the value <code>false</code> for the parameter
- * <code>isId</code> to undeclare an attribute for being a
- * user-determined ID attribute.
- * <br> To specify an attribute by local name and namespace URI, use the
- * <code>setIdAttributeNS</code> method.
+ * . This affects the value of <code>Attr.isId</code> and the behavior
+ * of <code>Document.getElementById</code>, but does not change any
+ * schema that may be in use, in particular this does not affect the
+ * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
+ * node. Use the value <code>false</code> for the parameter
+ * <code>isId</code> to undeclare an attribute for being a
+ * user-determined ID attribute.
+ * <br> To specify an attribute by local name and namespace URI, use the
+ * <code>setIdAttributeNS</code> method.
* @param name The name of the attribute.
* @param isId Whether the attribute is a of type ID.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
* of this element.
* @since DOM Level 3
*/
- public void setIdAttribute(String name,
+ public void setIdAttribute(String name,
boolean isId)
throws DOMException;
/**
- * If the parameter <code>isId</code> is <code>true</code>, this method
+ * If the parameter <code>isId</code> is <code>true</code>, this method
* declares the specified attribute to be a user-determined ID attribute
- * . This affects the value of <code>Attr.isId</code> and the behavior
- * of <code>Document.getElementById</code>, but does not change any
- * schema that may be in use, in particular this does not affect the
- * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
- * node. Use the value <code>false</code> for the parameter
- * <code>isId</code> to undeclare an attribute for being a
- * user-determined ID attribute.
+ * . This affects the value of <code>Attr.isId</code> and the behavior
+ * of <code>Document.getElementById</code>, but does not change any
+ * schema that may be in use, in particular this does not affect the
+ * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
+ * node. Use the value <code>false</code> for the parameter
+ * <code>isId</code> to undeclare an attribute for being a
+ * user-determined ID attribute.
* @param namespaceURI The namespace URI of the attribute.
* @param localName The local name of the attribute.
* @param isId Whether the attribute is a of type ID.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
* of this element.
* @since DOM Level 3
*/
- public void setIdAttributeNS(String namespaceURI,
- String localName,
+ public void setIdAttributeNS(String namespaceURI,
+ String localName,
boolean isId)
throws DOMException;
/**
- * If the parameter <code>isId</code> is <code>true</code>, this method
+ * If the parameter <code>isId</code> is <code>true</code>, this method
* declares the specified attribute to be a user-determined ID attribute
- * . This affects the value of <code>Attr.isId</code> and the behavior
- * of <code>Document.getElementById</code>, but does not change any
- * schema that may be in use, in particular this does not affect the
- * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
- * node. Use the value <code>false</code> for the parameter
- * <code>isId</code> to undeclare an attribute for being a
- * user-determined ID attribute.
+ * . This affects the value of <code>Attr.isId</code> and the behavior
+ * of <code>Document.getElementById</code>, but does not change any
+ * schema that may be in use, in particular this does not affect the
+ * <code>Attr.schemaTypeInfo</code> of the specified <code>Attr</code>
+ * node. Use the value <code>false</code> for the parameter
+ * <code>isId</code> to undeclare an attribute for being a
+ * user-determined ID attribute.
* @param idAttr The attribute node.
* @param isId Whether the attribute is a of type ID.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
* of this element.
* @since DOM Level 3
*/
- public void setIdAttributeNode(Attr idAttr,
+ public void setIdAttributeNode(Attr idAttr,
boolean isId)
throws DOMException;
diff --git a/luni/src/main/java/org/w3c/dom/Entity.java b/luni/src/main/java/org/w3c/dom/Entity.java
index f621c33..fc89248 100644
--- a/luni/src/main/java/org/w3c/dom/Entity.java
+++ b/luni/src/main/java/org/w3c/dom/Entity.java
@@ -13,75 +13,75 @@
package org.w3c.dom;
/**
- * This interface represents a known entity, either parsed or unparsed, in an
+ * This interface represents a known entity, either parsed or unparsed, in an
* XML document. Note that this models the entity itself <em>not</em> the entity declaration.
- * <p>The <code>nodeName</code> attribute that is inherited from
+ * <p>The <code>nodeName</code> attribute that is inherited from
* <code>Node</code> contains the name of the entity.
- * <p>An XML processor may choose to completely expand entities before the
- * structure model is passed to the DOM; in this case there will be no
+ * <p>An XML processor may choose to completely expand entities before the
+ * structure model is passed to the DOM; in this case there will be no
* <code>EntityReference</code> nodes in the document tree.
- * <p>XML does not mandate that a non-validating XML processor read and
- * process entity declarations made in the external subset or declared in
- * parameter entities. This means that parsed entities declared in the
- * external subset need not be expanded by some classes of applications, and
+ * <p>XML does not mandate that a non-validating XML processor read and
+ * process entity declarations made in the external subset or declared in
+ * parameter entities. This means that parsed entities declared in the
+ * external subset need not be expanded by some classes of applications, and
* that the replacement text of the entity may not be available. When the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#intern-replacement'>
- * replacement text</a> is available, the corresponding <code>Entity</code> node's child list
- * represents the structure of that replacement value. Otherwise, the child
+ * replacement text</a> is available, the corresponding <code>Entity</code> node's child list
+ * represents the structure of that replacement value. Otherwise, the child
* list is empty.
- * <p>DOM Level 3 does not support editing <code>Entity</code> nodes; if a
- * user wants to make changes to the contents of an <code>Entity</code>,
- * every related <code>EntityReference</code> node has to be replaced in the
- * structure model by a clone of the <code>Entity</code>'s contents, and
- * then the desired changes must be made to each of those clones instead.
+ * <p>DOM Level 3 does not support editing <code>Entity</code> nodes; if a
+ * user wants to make changes to the contents of an <code>Entity</code>,
+ * every related <code>EntityReference</code> node has to be replaced in the
+ * structure model by a clone of the <code>Entity</code>'s contents, and
+ * then the desired changes must be made to each of those clones instead.
* <code>Entity</code> nodes and all their descendants are readonly.
* <p>An <code>Entity</code> node does not have any parent.
- * <p ><b>Note:</b> If the entity contains an unbound namespace prefix, the
- * <code>namespaceURI</code> of the corresponding node in the
- * <code>Entity</code> node subtree is <code>null</code>. The same is true
- * for <code>EntityReference</code> nodes that refer to this entity, when
- * they are created using the <code>createEntityReference</code> method of
+ * <p ><b>Note:</b> If the entity contains an unbound namespace prefix, the
+ * <code>namespaceURI</code> of the corresponding node in the
+ * <code>Entity</code> node subtree is <code>null</code>. The same is true
+ * for <code>EntityReference</code> nodes that refer to this entity, when
+ * they are created using the <code>createEntityReference</code> method of
* the <code>Document</code> interface.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Entity extends Node {
/**
- * The public identifier associated with the entity if specified, and
+ * The public identifier associated with the entity if specified, and
* <code>null</code> otherwise.
*/
public String getPublicId();
/**
- * The system identifier associated with the entity if specified, and
+ * The system identifier associated with the entity if specified, and
* <code>null</code> otherwise. This may be an absolute URI or not.
*/
public String getSystemId();
/**
- * For unparsed entities, the name of the notation for the entity. For
+ * For unparsed entities, the name of the notation for the entity. For
* parsed entities, this is <code>null</code>.
*/
public String getNotationName();
/**
- * An attribute specifying the encoding used for this entity at the time
- * of parsing, when it is an external parsed entity. This is
- * <code>null</code> if it an entity from the internal subset or if it
+ * An attribute specifying the encoding used for this entity at the time
+ * of parsing, when it is an external parsed entity. This is
+ * <code>null</code> if it an entity from the internal subset or if it
* is not known.
* @since DOM Level 3
*/
public String getInputEncoding();
/**
- * An attribute specifying, as part of the text declaration, the encoding
- * of this entity, when it is an external parsed entity. This is
+ * An attribute specifying, as part of the text declaration, the encoding
+ * of this entity, when it is an external parsed entity. This is
* <code>null</code> otherwise.
* @since DOM Level 3
*/
public String getXmlEncoding();
/**
- * An attribute specifying, as part of the text declaration, the version
- * number of this entity, when it is an external parsed entity. This is
+ * An attribute specifying, as part of the text declaration, the version
+ * number of this entity, when it is an external parsed entity. This is
* <code>null</code> otherwise.
* @since DOM Level 3
*/
diff --git a/luni/src/main/java/org/w3c/dom/EntityReference.java b/luni/src/main/java/org/w3c/dom/EntityReference.java
index b42b091..66cc661 100644
--- a/luni/src/main/java/org/w3c/dom/EntityReference.java
+++ b/luni/src/main/java/org/w3c/dom/EntityReference.java
@@ -13,29 +13,29 @@
package org.w3c.dom;
/**
- * <code>EntityReference</code> nodes may be used to represent an entity
- * reference in the tree. Note that character references and references to
- * predefined entities are considered to be expanded by the HTML or XML
- * processor so that characters are represented by their Unicode equivalent
- * rather than by an entity reference. Moreover, the XML processor may
- * completely expand references to entities while building the
- * <code>Document</code>, instead of providing <code>EntityReference</code>
- * nodes. If it does provide such nodes, then for an
- * <code>EntityReference</code> node that represents a reference to a known
- * entity an <code>Entity</code> exists, and the subtree of the
- * <code>EntityReference</code> node is a copy of the <code>Entity</code>
- * node subtree. However, the latter may not be true when an entity contains
- * an unbound namespace prefix. In such a case, because the namespace prefix
- * resolution depends on where the entity reference is, the descendants of
- * the <code>EntityReference</code> node may be bound to different namespace
- * URIs. When an <code>EntityReference</code> node represents a reference to
- * an unknown entity, the node has no children and its replacement value,
+ * <code>EntityReference</code> nodes may be used to represent an entity
+ * reference in the tree. Note that character references and references to
+ * predefined entities are considered to be expanded by the HTML or XML
+ * processor so that characters are represented by their Unicode equivalent
+ * rather than by an entity reference. Moreover, the XML processor may
+ * completely expand references to entities while building the
+ * <code>Document</code>, instead of providing <code>EntityReference</code>
+ * nodes. If it does provide such nodes, then for an
+ * <code>EntityReference</code> node that represents a reference to a known
+ * entity an <code>Entity</code> exists, and the subtree of the
+ * <code>EntityReference</code> node is a copy of the <code>Entity</code>
+ * node subtree. However, the latter may not be true when an entity contains
+ * an unbound namespace prefix. In such a case, because the namespace prefix
+ * resolution depends on where the entity reference is, the descendants of
+ * the <code>EntityReference</code> node may be bound to different namespace
+ * URIs. When an <code>EntityReference</code> node represents a reference to
+ * an unknown entity, the node has no children and its replacement value,
* when used by <code>Attr.value</code> for example, is empty.
- * <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and
+ * <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and
* all their descendants are readonly.
- * <p ><b>Note:</b> <code>EntityReference</code> nodes may cause element
- * content and attribute value normalization problems when, such as in XML
- * 1.0 and XML Schema, the normalization is performed after entity reference
+ * <p ><b>Note:</b> <code>EntityReference</code> nodes may cause element
+ * content and attribute value normalization problems when, such as in XML
+ * 1.0 and XML Schema, the normalization is performed after entity reference
* are expanded.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
diff --git a/luni/src/main/java/org/w3c/dom/NameList.java b/luni/src/main/java/org/w3c/dom/NameList.java
index 10caa90..e94433f 100644
--- a/luni/src/main/java/org/w3c/dom/NameList.java
+++ b/luni/src/main/java/org/w3c/dom/NameList.java
@@ -13,56 +13,56 @@
package org.w3c.dom;
/**
- * The <code>NameList</code> interface provides the abstraction of an ordered
- * collection of parallel pairs of name and namespace values (which could be
- * null values), without defining or constraining how this collection is
- * implemented. The items in the <code>NameList</code> are accessible via an
- * integral index, starting from 0.
+ * The <code>NameList</code> interface provides the abstraction of an ordered
+ * collection of parallel pairs of name and namespace values (which could be
+ * null values), without defining or constraining how this collection is
+ * implemented. The items in the <code>NameList</code> are accessible via an
+ * integral index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface NameList {
/**
- * Returns the <code>index</code>th name item in the collection.
+ * Returns the <code>index</code>th name item in the collection.
* @param index Index into the collection.
- * @return The name at the <code>index</code>th position in the
- * <code>NameList</code>, or <code>null</code> if there is no name for
- * the specified index or if the index is out of range.
+ * @return The name at the <code>index</code>th position in the
+ * <code>NameList</code>, or <code>null</code> if there is no name for
+ * the specified index or if the index is out of range.
*/
public String getName(int index);
/**
- * Returns the <code>index</code>th namespaceURI item in the collection.
+ * Returns the <code>index</code>th namespaceURI item in the collection.
* @param index Index into the collection.
- * @return The namespace URI at the <code>index</code>th position in the
- * <code>NameList</code>, or <code>null</code> if there is no name for
- * the specified index or if the index is out of range.
+ * @return The namespace URI at the <code>index</code>th position in the
+ * <code>NameList</code>, or <code>null</code> if there is no name for
+ * the specified index or if the index is out of range.
*/
public String getNamespaceURI(int index);
/**
- * The number of pairs (name and namespaceURI) in the list. The range of
- * valid child node indices is 0 to <code>length-1</code> inclusive.
+ * The number of pairs (name and namespaceURI) in the list. The range of
+ * valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
/**
- * Test if a name is part of this <code>NameList</code>.
- * @param str The name to look for.
- * @return <code>true</code> if the name has been found,
- * <code>false</code> otherwise.
+ * Test if a name is part of this <code>NameList</code>.
+ * @param str The name to look for.
+ * @return <code>true</code> if the name has been found,
+ * <code>false</code> otherwise.
*/
public boolean contains(String str);
/**
- * Test if the pair namespaceURI/name is part of this
- * <code>NameList</code>.
- * @param namespaceURI The namespace URI to look for.
- * @param name The name to look for.
- * @return <code>true</code> if the pair namespaceURI/name has been
- * found, <code>false</code> otherwise.
+ * Test if the pair namespaceURI/name is part of this
+ * <code>NameList</code>.
+ * @param namespaceURI The namespace URI to look for.
+ * @param name The name to look for.
+ * @return <code>true</code> if the pair namespaceURI/name has been
+ * found, <code>false</code> otherwise.
*/
- public boolean containsNS(String namespaceURI,
+ public boolean containsNS(String namespaceURI,
String name);
}
diff --git a/luni/src/main/java/org/w3c/dom/NamedNodeMap.java b/luni/src/main/java/org/w3c/dom/NamedNodeMap.java
index ad1e67b..d74ace7 100644
--- a/luni/src/main/java/org/w3c/dom/NamedNodeMap.java
+++ b/luni/src/main/java/org/w3c/dom/NamedNodeMap.java
@@ -13,14 +13,14 @@
package org.w3c.dom;
/**
- * Objects implementing the <code>NamedNodeMap</code> interface are used to
- * represent collections of nodes that can be accessed by name. Note that
- * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>;
- * <code>NamedNodeMaps</code> are not maintained in any particular order.
- * Objects contained in an object implementing <code>NamedNodeMap</code> may
- * also be accessed by an ordinal index, but this is simply to allow
- * convenient enumeration of the contents of a <code>NamedNodeMap</code>,
- * and does not imply that the DOM specifies an order to these Nodes.
+ * Objects implementing the <code>NamedNodeMap</code> interface are used to
+ * represent collections of nodes that can be accessed by name. Note that
+ * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>;
+ * <code>NamedNodeMaps</code> are not maintained in any particular order.
+ * Objects contained in an object implementing <code>NamedNodeMap</code> may
+ * also be accessed by an ordinal index, but this is simply to allow
+ * convenient enumeration of the contents of a <code>NamedNodeMap</code>,
+ * and does not imply that the DOM specifies an order to these Nodes.
* <p><code>NamedNodeMap</code> objects in the DOM are live.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
@@ -28,54 +28,54 @@
/**
* Retrieves a node specified by name.
* @param name The <code>nodeName</code> of a node to retrieve.
- * @return A <code>Node</code> (of any type) with the specified
- * <code>nodeName</code>, or <code>null</code> if it does not identify
+ * @return A <code>Node</code> (of any type) with the specified
+ * <code>nodeName</code>, or <code>null</code> if it does not identify
* any node in this map.
*/
public Node getNamedItem(String name);
/**
- * Adds a node using its <code>nodeName</code> attribute. If a node with
- * that name is already present in this map, it is replaced by the new
+ * Adds a node using its <code>nodeName</code> attribute. If a node with
+ * that name is already present in this map, it is replaced by the new
* one. Replacing a node by itself has no effect.
- * <br>As the <code>nodeName</code> attribute is used to derive the name
- * which the node must be stored under, multiple nodes of certain types
- * (those that have a "special" string value) cannot be stored as the
- * names would clash. This is seen as preferable to allowing nodes to be
+ * <br>As the <code>nodeName</code> attribute is used to derive the name
+ * which the node must be stored under, multiple nodes of certain types
+ * (those that have a "special" string value) cannot be stored as the
+ * names would clash. This is seen as preferable to allowing nodes to be
* aliased.
- * @param arg A node to store in this map. The node will later be
+ * @param arg A node to store in this map. The node will later be
* accessible using the value of its <code>nodeName</code> attribute.
- * @return If the new <code>Node</code> replaces an existing node the
- * replaced <code>Node</code> is returned, otherwise <code>null</code>
+ * @return If the new <code>Node</code> replaces an existing node the
+ * replaced <code>Node</code> is returned, otherwise <code>null</code>
* is returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created this map.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
- * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
- * <code>Attr</code> that is already an attribute of another
- * <code>Element</code> object. The DOM user must explicitly clone
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
+ * <code>Attr</code> that is already an attribute of another
+ * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements.
- * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
- * doesn't belong in this NamedNodeMap. Examples would include trying
- * to insert something other than an Attr node into an Element's map
- * of attributes, or a non-Entity node into the DocumentType's map of
+ * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
+ * doesn't belong in this NamedNodeMap. Examples would include trying
+ * to insert something other than an Attr node into an Element's map
+ * of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
*/
public Node setNamedItem(Node arg)
throws DOMException;
/**
- * Removes a node specified by name. When this map contains the attributes
- * attached to an element, if the removed attribute is known to have a
- * default value, an attribute immediately appears containing the
- * default value as well as the corresponding namespace URI, local name,
+ * Removes a node specified by name. When this map contains the attributes
+ * attached to an element, if the removed attribute is known to have a
+ * default value, an attribute immediately appears containing the
+ * default value as well as the corresponding namespace URI, local name,
* and prefix when applicable.
* @param name The <code>nodeName</code> of the node to remove.
- * @return The node removed from this map if a node with such a name
+ * @return The node removed from this map if a node with such a name
* exists.
* @exception DOMException
- * NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in
+ * NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in
* this map.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
*/
@@ -83,17 +83,17 @@
throws DOMException;
/**
- * Returns the <code>index</code>th item in the map. If <code>index</code>
- * is greater than or equal to the number of nodes in this map, this
+ * Returns the <code>index</code>th item in the map. If <code>index</code>
+ * is greater than or equal to the number of nodes in this map, this
* returns <code>null</code>.
* @param index Index into this map.
- * @return The node at the <code>index</code>th position in the map, or
+ * @return The node at the <code>index</code>th position in the map, or
* <code>null</code> if that is not a valid index.
*/
public Node item(int index);
/**
- * The number of nodes in this map. The range of valid child node indices
+ * The number of nodes in this map. The range of valid child node indices
* is <code>0</code> to <code>length-1</code> inclusive.
*/
public int getLength();
@@ -101,82 +101,82 @@
/**
* Retrieves a node specified by local name and namespace URI.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value null as the namespaceURI parameter
+ * , applications must use the value null as the namespaceURI parameter
* for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the node to retrieve.
* @param localName The local name of the node to retrieve.
- * @return A <code>Node</code> (of any type) with the specified local
- * name and namespace URI, or <code>null</code> if they do not
+ * @return A <code>Node</code> (of any type) with the specified local
+ * name and namespace URI, or <code>null</code> if they do not
* identify any node in this map.
* @exception DOMException
- * NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature "XML" and the language exposed through the
- * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public Node getNamedItemNS(String namespaceURI,
+ public Node getNamedItemNS(String namespaceURI,
String localName)
throws DOMException;
/**
- * Adds a node using its <code>namespaceURI</code> and
- * <code>localName</code>. If a node with that namespace URI and that
- * local name is already present in this map, it is replaced by the new
+ * Adds a node using its <code>namespaceURI</code> and
+ * <code>localName</code>. If a node with that namespace URI and that
+ * local name is already present in this map, it is replaced by the new
* one. Replacing a node by itself has no effect.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value null as the namespaceURI parameter
+ * , applications must use the value null as the namespaceURI parameter
* for methods if they wish to have no namespace.
- * @param arg A node to store in this map. The node will later be
- * accessible using the value of its <code>namespaceURI</code> and
+ * @param arg A node to store in this map. The node will later be
+ * accessible using the value of its <code>namespaceURI</code> and
* <code>localName</code> attributes.
- * @return If the new <code>Node</code> replaces an existing node the
- * replaced <code>Node</code> is returned, otherwise <code>null</code>
+ * @return If the new <code>Node</code> replaces an existing node the
+ * replaced <code>Node</code> is returned, otherwise <code>null</code>
* is returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created this map.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
- * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
- * <code>Attr</code> that is already an attribute of another
- * <code>Element</code> object. The DOM user must explicitly clone
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
+ * <code>Attr</code> that is already an attribute of another
+ * <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements.
- * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
- * doesn't belong in this NamedNodeMap. Examples would include trying
- * to insert something other than an Attr node into an Element's map
- * of attributes, or a non-Entity node into the DocumentType's map of
+ * <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
+ * doesn't belong in this NamedNodeMap. Examples would include trying
+ * to insert something other than an Attr node into an Element's map
+ * of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature "XML" and the language exposed through the
- * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Node setNamedItemNS(Node arg)
throws DOMException;
/**
- * Removes a node specified by local name and namespace URI. A removed
- * attribute may be known to have a default value when this map contains
- * the attributes attached to an element, as returned by the attributes
- * attribute of the <code>Node</code> interface. If so, an attribute
- * immediately appears containing the default value as well as the
+ * Removes a node specified by local name and namespace URI. A removed
+ * attribute may be known to have a default value when this map contains
+ * the attributes attached to an element, as returned by the attributes
+ * attribute of the <code>Node</code> interface. If so, an attribute
+ * immediately appears containing the default value as well as the
* corresponding namespace URI, local name, and prefix when applicable.
* <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * , applications must use the value null as the namespaceURI parameter
+ * , applications must use the value null as the namespaceURI parameter
* for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the node to remove.
* @param localName The local name of the node to remove.
- * @return The node removed from this map if a node with such a local
+ * @return The node removed from this map if a node with such a local
* name and namespace URI exists.
* @exception DOMException
- * NOT_FOUND_ERR: Raised if there is no node with the specified
+ * NOT_FOUND_ERR: Raised if there is no node with the specified
* <code>namespaceURI</code> and <code>localName</code> in this map.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
- * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
- * support the feature "XML" and the language exposed through the
- * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
- public Node removeNamedItemNS(String namespaceURI,
+ public Node removeNamedItemNS(String namespaceURI,
String localName)
throws DOMException;
diff --git a/luni/src/main/java/org/w3c/dom/Node.java b/luni/src/main/java/org/w3c/dom/Node.java
index 989d49a..c9a6d00 100644
--- a/luni/src/main/java/org/w3c/dom/Node.java
+++ b/luni/src/main/java/org/w3c/dom/Node.java
@@ -13,25 +13,25 @@
package org.w3c.dom;
/**
- * The <code>Node</code> interface is the primary datatype for the entire
- * Document Object Model. It represents a single node in the document tree.
- * While all objects implementing the <code>Node</code> interface expose
- * methods for dealing with children, not all objects implementing the
- * <code>Node</code> interface may have children. For example,
- * <code>Text</code> nodes may not have children, and adding children to
+ * The <code>Node</code> interface is the primary datatype for the entire
+ * Document Object Model. It represents a single node in the document tree.
+ * While all objects implementing the <code>Node</code> interface expose
+ * methods for dealing with children, not all objects implementing the
+ * <code>Node</code> interface may have children. For example,
+ * <code>Text</code> nodes may not have children, and adding children to
* such nodes results in a <code>DOMException</code> being raised.
- * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and
- * <code>attributes</code> are included as a mechanism to get at node
- * information without casting down to the specific derived interface. In
- * cases where there is no obvious mapping of these attributes for a
- * specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an
+ * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and
+ * <code>attributes</code> are included as a mechanism to get at node
+ * information without casting down to the specific derived interface. In
+ * cases where there is no obvious mapping of these attributes for a
+ * specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an
* <code>Element</code> or <code>attributes</code> for a <code>Comment</code>
- * ), this returns <code>null</code>. Note that the specialized interfaces
- * may contain additional and more convenient mechanisms to get and set the
+ * ), this returns <code>null</code>. Note that the specialized interfaces
+ * may contain additional and more convenient mechanisms to get and set the
* relevant information.
- * <p>The values of <code>nodeName</code>,
- * <code>nodeValue</code>, and <code>attributes</code> vary according to the
- * node type as follows:
+ * <p>The values of <code>nodeName</code>,
+ * <code>nodeValue</code>, and <code>attributes</code> vary according to the
+ * node type as follows:
* <table border='1' cellpadding='3'>
* <tr>
* <th>Interface</th>
@@ -43,7 +43,7 @@
* <td valign='top' rowspan='1' colspan='1'>
* <code>Attr</code></td>
* <td valign='top' rowspan='1' colspan='1'>same as <code>Attr.name</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as
+ * <td valign='top' rowspan='1' colspan='1'>same as
* <code>Attr.value</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* </tr>
@@ -51,7 +51,7 @@
* <td valign='top' rowspan='1' colspan='1'><code>CDATASection</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#cdata-section"</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the
* content of the CDATA Section</td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* </tr>
@@ -59,7 +59,7 @@
* <td valign='top' rowspan='1' colspan='1'><code>Comment</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#comment"</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the
* content of the comment</td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* </tr>
@@ -80,7 +80,7 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>DocumentType</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as
+ * <td valign='top' rowspan='1' colspan='1'>same as
* <code>DocumentType.name</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
@@ -116,9 +116,9 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'><code>ProcessingInstruction</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same
+ * <td valign='top' rowspan='1' colspan='1'>same
* as <code>ProcessingInstruction.target</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as
+ * <td valign='top' rowspan='1' colspan='1'>same as
* <code>ProcessingInstruction.data</code></td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* </tr>
@@ -126,11 +126,11 @@
* <td valign='top' rowspan='1' colspan='1'><code>Text</code></td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>"#text"</code></td>
- * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the content
+ * <td valign='top' rowspan='1' colspan='1'>same as <code>CharacterData.data</code>, the content
* of the text node</td>
* <td valign='top' rowspan='1' colspan='1'><code>null</code></td>
* </tr>
- * </table>
+ * </table>
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Node {
@@ -190,22 +190,22 @@
public String getNodeName();
/**
- * The value of this node, depending on its type; see the table above.
- * When it is defined to be <code>null</code>, setting it has no effect,
+ * The value of this node, depending on its type; see the table above.
+ * When it is defined to be <code>null</code>, setting it has no effect,
* including if the node is read-only.
* @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
+ * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
+ * fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public String getNodeValue()
throws DOMException;
/**
- * The value of this node, depending on its type; see the table above.
- * When it is defined to be <code>null</code>, setting it has no effect,
+ * The value of this node, depending on its type; see the table above.
+ * When it is defined to be <code>null</code>, setting it has no effect,
* including if the node is read-only.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if
+ * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if
* it is not defined to be <code>null</code>.
*/
public void setNodeValue(String nodeValue)
@@ -217,148 +217,148 @@
public short getNodeType();
/**
- * The parent of this node. All nodes, except <code>Attr</code>,
- * <code>Document</code>, <code>DocumentFragment</code>,
- * <code>Entity</code>, and <code>Notation</code> may have a parent.
- * However, if a node has just been created and not yet added to the
- * tree, or if it has been removed from the tree, this is
- * <code>null</code>.
+ * The parent of this node. All nodes, except <code>Attr</code>,
+ * <code>Document</code>, <code>DocumentFragment</code>,
+ * <code>Entity</code>, and <code>Notation</code> may have a parent.
+ * However, if a node has just been created and not yet added to the
+ * tree, or if it has been removed from the tree, this is
+ * <code>null</code>.
*/
public Node getParentNode();
/**
- * A <code>NodeList</code> that contains all children of this node. If
- * there are no children, this is a <code>NodeList</code> containing no
+ * A <code>NodeList</code> that contains all children of this node. If
+ * there are no children, this is a <code>NodeList</code> containing no
* nodes.
*/
public NodeList getChildNodes();
/**
- * The first child of this node. If there is no such node, this returns
+ * The first child of this node. If there is no such node, this returns
* <code>null</code>.
*/
public Node getFirstChild();
/**
- * The last child of this node. If there is no such node, this returns
+ * The last child of this node. If there is no such node, this returns
* <code>null</code>.
*/
public Node getLastChild();
/**
- * The node immediately preceding this node. If there is no such node,
+ * The node immediately preceding this node. If there is no such node,
* this returns <code>null</code>.
*/
public Node getPreviousSibling();
/**
- * The node immediately following this node. If there is no such node,
+ * The node immediately following this node. If there is no such node,
* this returns <code>null</code>.
*/
public Node getNextSibling();
/**
- * A <code>NamedNodeMap</code> containing the attributes of this node (if
+ * A <code>NamedNodeMap</code> containing the attributes of this node (if
* it is an <code>Element</code>) or <code>null</code> otherwise.
*/
public NamedNodeMap getAttributes();
/**
- * The <code>Document</code> object associated with this node. This is
- * also the <code>Document</code> object used to create new nodes. When
- * this node is a <code>Document</code> or a <code>DocumentType</code>
- * which is not used with any <code>Document</code> yet, this is
+ * The <code>Document</code> object associated with this node. This is
+ * also the <code>Document</code> object used to create new nodes. When
+ * this node is a <code>Document</code> or a <code>DocumentType</code>
+ * which is not used with any <code>Document</code> yet, this is
* <code>null</code>.
* @version DOM Level 2
*/
public Document getOwnerDocument();
/**
- * Inserts the node <code>newChild</code> before the existing child node
- * <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
+ * Inserts the node <code>newChild</code> before the existing child node
+ * <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
* insert <code>newChild</code> at the end of the list of children.
- * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
- * all of its children are inserted, in the same order, before
- * <code>refChild</code>. If the <code>newChild</code> is already in the
+ * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
+ * all of its children are inserted, in the same order, before
+ * <code>refChild</code>. If the <code>newChild</code> is already in the
* tree, it is first removed.
- * <p ><b>Note:</b> Inserting a node before itself is implementation
- * dependent.
+ * <p ><b>Note:</b> Inserting a node before itself is implementation
+ * dependent.
* @param newChild The node to insert.
- * @param refChild The reference node, i.e., the node before which the
+ * @param refChild The reference node, i.e., the node before which the
* new node must be inserted.
* @return The node being inserted.
* @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
- * allow children of the type of the <code>newChild</code> node, or if
- * the node to insert is one of this node's ancestors or this node
- * itself, or if this node is of type <code>Document</code> and the
- * DOM application attempts to insert a second
+ * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
+ * allow children of the type of the <code>newChild</code> node, or if
+ * the node to insert is one of this node's ancestors or this node
+ * itself, or if this node is of type <code>Document</code> and the
+ * DOM application attempts to insert a second
* <code>DocumentType</code> or <code>Element</code> node.
- * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
* if the parent of the node being inserted is readonly.
- * <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of
+ * <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of
* this node.
- * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
- * this exception might be raised if the DOM implementation doesn't
- * support the insertion of a <code>DocumentType</code> or
+ * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
+ * this exception might be raised if the DOM implementation doesn't
+ * support the insertion of a <code>DocumentType</code> or
* <code>Element</code> node.
* @version DOM Level 3
*/
- public Node insertBefore(Node newChild,
+ public Node insertBefore(Node newChild,
Node refChild)
throws DOMException;
/**
* Replaces the child node <code>oldChild</code> with <code>newChild</code>
* in the list of children, and returns the <code>oldChild</code> node.
- * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
- * <code>oldChild</code> is replaced by all of the
- * <code>DocumentFragment</code> children, which are inserted in the
- * same order. If the <code>newChild</code> is already in the tree, it
+ * <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
+ * <code>oldChild</code> is replaced by all of the
+ * <code>DocumentFragment</code> children, which are inserted in the
+ * same order. If the <code>newChild</code> is already in the tree, it
* is first removed.
- * <p ><b>Note:</b> Replacing a node with itself is implementation
- * dependent.
+ * <p ><b>Note:</b> Replacing a node with itself is implementation
+ * dependent.
* @param newChild The new node to put in the child list.
* @param oldChild The node being replaced in the list.
* @return The node replaced.
* @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
- * allow children of the type of the <code>newChild</code> node, or if
- * the node to put in is one of this node's ancestors or this node
- * itself, or if this node is of type <code>Document</code> and the
- * result of the replacement operation would add a second
- * <code>DocumentType</code> or <code>Element</code> on the
+ * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
+ * allow children of the type of the <code>newChild</code> node, or if
+ * the node to put in is one of this node's ancestors or this node
+ * itself, or if this node is of type <code>Document</code> and the
+ * result of the replacement operation would add a second
+ * <code>DocumentType</code> or <code>Element</code> on the
* <code>Document</code> node.
- * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
* the new node is readonly.
- * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
+ * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
* this node.
- * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
- * this exception might be raised if the DOM implementation doesn't
- * support the replacement of the <code>DocumentType</code> child or
+ * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
+ * this exception might be raised if the DOM implementation doesn't
+ * support the replacement of the <code>DocumentType</code> child or
* <code>Element</code> child.
* @version DOM Level 3
*/
- public Node replaceChild(Node newChild,
+ public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException;
/**
- * Removes the child node indicated by <code>oldChild</code> from the list
+ * Removes the child node indicated by <code>oldChild</code> from the list
* of children, and returns it.
* @param oldChild The node being removed.
* @return The node removed.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
+ * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
* this node.
- * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
- * this exception might be raised if the DOM implementation doesn't
- * support the removal of the <code>DocumentType</code> child or the
+ * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
+ * this exception might be raised if the DOM implementation doesn't
+ * support the removal of the <code>DocumentType</code> child or the
* <code>Element</code> child.
* @version DOM Level 3
*/
@@ -366,27 +366,27 @@
throws DOMException;
/**
- * Adds the node <code>newChild</code> to the end of the list of children
- * of this node. If the <code>newChild</code> is already in the tree, it
+ * Adds the node <code>newChild</code> to the end of the list of children
+ * of this node. If the <code>newChild</code> is already in the tree, it
* is first removed.
- * @param newChild The node to add.If it is a
- * <code>DocumentFragment</code> object, the entire contents of the
+ * @param newChild The node to add.If it is a
+ * <code>DocumentFragment</code> object, the entire contents of the
* document fragment are moved into the child list of this node
* @return The node added.
* @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
- * allow children of the type of the <code>newChild</code> node, or if
- * the node to append is one of this node's ancestors or this node
- * itself, or if this node is of type <code>Document</code> and the
- * DOM application attempts to append a second
+ * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
+ * allow children of the type of the <code>newChild</code> node, or if
+ * the node to append is one of this node's ancestors or this node
+ * itself, or if this node is of type <code>Document</code> and the
+ * DOM application attempts to append a second
* <code>DocumentType</code> or <code>Element</code> node.
- * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
* if the previous parent of the node being inserted is readonly.
- * <br>NOT_SUPPORTED_ERR: if the <code>newChild</code> node is a child
- * of the <code>Document</code> node, this exception might be raised
- * if the DOM implementation doesn't support the removal of the
+ * <br>NOT_SUPPORTED_ERR: if the <code>newChild</code> node is a child
+ * of the <code>Document</code> node, this exception might be raised
+ * if the DOM implementation doesn't support the removal of the
* <code>DocumentType</code> child or <code>Element</code> child.
* @version DOM Level 3
*/
@@ -395,154 +395,154 @@
/**
* Returns whether this node has any children.
- * @return Returns <code>true</code> if this node has any children,
+ * @return Returns <code>true</code> if this node has any children,
* <code>false</code> otherwise.
*/
public boolean hasChildNodes();
/**
- * Returns a duplicate of this node, i.e., serves as a generic copy
+ * Returns a duplicate of this node, i.e., serves as a generic copy
* constructor for nodes. The duplicate node has no parent (
- * <code>parentNode</code> is <code>null</code>) and no user data. User
- * data associated to the imported node is not carried over. However, if
- * any <code>UserDataHandlers</code> has been specified along with the
- * associated data these handlers will be called with the appropriate
+ * <code>parentNode</code> is <code>null</code>) and no user data. User
+ * data associated to the imported node is not carried over. However, if
+ * any <code>UserDataHandlers</code> has been specified along with the
+ * associated data these handlers will be called with the appropriate
* parameters before this method returns.
- * <br>Cloning an <code>Element</code> copies all attributes and their
- * values, including those generated by the XML processor to represent
- * defaulted attributes, but this method does not copy any children it
- * contains unless it is a deep clone. This includes text contained in
- * an the <code>Element</code> since the text is contained in a child
- * <code>Text</code> node. Cloning an <code>Attr</code> directly, as
- * opposed to be cloned as part of an <code>Element</code> cloning
- * operation, returns a specified attribute (<code>specified</code> is
- * <code>true</code>). Cloning an <code>Attr</code> always clones its
- * children, since they represent its value, no matter whether this is a
- * deep clone or not. Cloning an <code>EntityReference</code>
- * automatically constructs its subtree if a corresponding
- * <code>Entity</code> is available, no matter whether this is a deep
- * clone or not. Cloning any other type of node simply returns a copy of
+ * <br>Cloning an <code>Element</code> copies all attributes and their
+ * values, including those generated by the XML processor to represent
+ * defaulted attributes, but this method does not copy any children it
+ * contains unless it is a deep clone. This includes text contained in
+ * an the <code>Element</code> since the text is contained in a child
+ * <code>Text</code> node. Cloning an <code>Attr</code> directly, as
+ * opposed to be cloned as part of an <code>Element</code> cloning
+ * operation, returns a specified attribute (<code>specified</code> is
+ * <code>true</code>). Cloning an <code>Attr</code> always clones its
+ * children, since they represent its value, no matter whether this is a
+ * deep clone or not. Cloning an <code>EntityReference</code>
+ * automatically constructs its subtree if a corresponding
+ * <code>Entity</code> is available, no matter whether this is a deep
+ * clone or not. Cloning any other type of node simply returns a copy of
* this node.
- * <br>Note that cloning an immutable subtree results in a mutable copy,
+ * <br>Note that cloning an immutable subtree results in a mutable copy,
* but the children of an <code>EntityReference</code> clone are readonly
- * . In addition, clones of unspecified <code>Attr</code> nodes are
- * specified. And, cloning <code>Document</code>,
- * <code>DocumentType</code>, <code>Entity</code>, and
+ * . In addition, clones of unspecified <code>Attr</code> nodes are
+ * specified. And, cloning <code>Document</code>,
+ * <code>DocumentType</code>, <code>Entity</code>, and
* <code>Notation</code> nodes is implementation dependent.
- * @param deep If <code>true</code>, recursively clone the subtree under
- * the specified node; if <code>false</code>, clone only the node
+ * @param deep If <code>true</code>, recursively clone the subtree under
+ * the specified node; if <code>false</code>, clone only the node
* itself (and its attributes, if it is an <code>Element</code>).
* @return The duplicate node.
*/
public Node cloneNode(boolean deep);
/**
- * Puts all <code>Text</code> nodes in the full depth of the sub-tree
- * underneath this <code>Node</code>, including attribute nodes, into a
- * "normal" form where only structure (e.g., elements, comments,
- * processing instructions, CDATA sections, and entity references)
- * separates <code>Text</code> nodes, i.e., there are neither adjacent
- * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can
- * be used to ensure that the DOM view of a document is the same as if
- * it were saved and re-loaded, and is useful when operations (such as
+ * Puts all <code>Text</code> nodes in the full depth of the sub-tree
+ * underneath this <code>Node</code>, including attribute nodes, into a
+ * "normal" form where only structure (e.g., elements, comments,
+ * processing instructions, CDATA sections, and entity references)
+ * separates <code>Text</code> nodes, i.e., there are neither adjacent
+ * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can
+ * be used to ensure that the DOM view of a document is the same as if
+ * it were saved and re-loaded, and is useful when operations (such as
* XPointer [<a href='http://www.w3.org/TR/2003/REC-xptr-framework-20030325/'>XPointer</a>]
- * lookups) that depend on a particular document tree structure are to
- * be used. If the parameter "normalize-characters" of the
- * <code>DOMConfiguration</code> object attached to the
- * <code>Node.ownerDocument</code> is <code>true</code>, this method
- * will also fully normalize the characters of the <code>Text</code>
- * nodes.
- * <p ><b>Note:</b> In cases where the document contains
- * <code>CDATASections</code>, the normalize operation alone may not be
- * sufficient, since XPointers do not differentiate between
+ * lookups) that depend on a particular document tree structure are to
+ * be used. If the parameter "normalize-characters" of the
+ * <code>DOMConfiguration</code> object attached to the
+ * <code>Node.ownerDocument</code> is <code>true</code>, this method
+ * will also fully normalize the characters of the <code>Text</code>
+ * nodes.
+ * <p ><b>Note:</b> In cases where the document contains
+ * <code>CDATASections</code>, the normalize operation alone may not be
+ * sufficient, since XPointers do not differentiate between
* <code>Text</code> nodes and <code>CDATASection</code> nodes.
* @version DOM Level 3
*/
public void normalize();
/**
- * Tests whether the DOM implementation implements a specific feature and
- * that feature is supported by this node, as specified in .
- * @param feature The name of the feature to test.
- * @param version This is the version number of the feature to test.
- * @return Returns <code>true</code> if the specified feature is
+ * Tests whether the DOM implementation implements a specific feature and
+ * that feature is supported by this node, as specified in .
+ * @param feature The name of the feature to test.
+ * @param version This is the version number of the feature to test.
+ * @return Returns <code>true</code> if the specified feature is
* supported on this node, <code>false</code> otherwise.
* @since DOM Level 2
*/
- public boolean isSupported(String feature,
+ public boolean isSupported(String feature,
String version);
/**
- * The namespace URI of this node, or <code>null</code> if it is
+ * The namespace URI of this node, or <code>null</code> if it is
* unspecified (see ).
- * <br>This is not a computed value that is the result of a namespace
- * lookup based on an examination of the namespace declarations in
+ * <br>This is not a computed value that is the result of a namespace
+ * lookup based on an examination of the namespace declarations in
* scope. It is merely the namespace URI given at creation time.
- * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
- * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
- * method, such as <code>Document.createElement()</code>, this is always
+ * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
+ * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
+ * method, such as <code>Document.createElement()</code>, this is always
* <code>null</code>.
* <p ><b>Note:</b> Per the <em>Namespaces in XML</em> Specification [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
- * an attribute does not inherit its namespace from the element it is
- * attached to. If an attribute is not explicitly given a namespace, it
+ * an attribute does not inherit its namespace from the element it is
+ * attached to. If an attribute is not explicitly given a namespace, it
* simply has no namespace.
* @since DOM Level 2
*/
public String getNamespaceURI();
/**
- * The namespace prefix of this node, or <code>null</code> if it is
- * unspecified. When it is defined to be <code>null</code>, setting it
+ * The namespace prefix of this node, or <code>null</code> if it is
+ * unspecified. When it is defined to be <code>null</code>, setting it
* has no effect, including if the node is read-only.
- * <br>Note that setting this attribute, when permitted, changes the
- * <code>nodeName</code> attribute, which holds the qualified name, as
- * well as the <code>tagName</code> and <code>name</code> attributes of
- * the <code>Element</code> and <code>Attr</code> interfaces, when
+ * <br>Note that setting this attribute, when permitted, changes the
+ * <code>nodeName</code> attribute, which holds the qualified name, as
+ * well as the <code>tagName</code> and <code>name</code> attributes of
+ * the <code>Element</code> and <code>Attr</code> interfaces, when
* applicable.
- * <br>Setting the prefix to <code>null</code> makes it unspecified,
+ * <br>Setting the prefix to <code>null</code> makes it unspecified,
* setting it to an empty string is implementation dependent.
- * <br>Note also that changing the prefix of an attribute that is known to
- * have a default value, does not make a new attribute with the default
- * value and the original prefix appear, since the
+ * <br>Note also that changing the prefix of an attribute that is known to
+ * have a default value, does not make a new attribute with the default
+ * value and the original prefix appear, since the
* <code>namespaceURI</code> and <code>localName</code> do not change.
- * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
- * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
- * method, such as <code>createElement</code> from the
+ * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
+ * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
+ * method, such as <code>createElement</code> from the
* <code>Document</code> interface, this is always <code>null</code>.
* @since DOM Level 2
*/
public String getPrefix();
/**
- * The namespace prefix of this node, or <code>null</code> if it is
- * unspecified. When it is defined to be <code>null</code>, setting it
+ * The namespace prefix of this node, or <code>null</code> if it is
+ * unspecified. When it is defined to be <code>null</code>, setting it
* has no effect, including if the node is read-only.
- * <br>Note that setting this attribute, when permitted, changes the
- * <code>nodeName</code> attribute, which holds the qualified name, as
- * well as the <code>tagName</code> and <code>name</code> attributes of
- * the <code>Element</code> and <code>Attr</code> interfaces, when
+ * <br>Note that setting this attribute, when permitted, changes the
+ * <code>nodeName</code> attribute, which holds the qualified name, as
+ * well as the <code>tagName</code> and <code>name</code> attributes of
+ * the <code>Element</code> and <code>Attr</code> interfaces, when
* applicable.
- * <br>Setting the prefix to <code>null</code> makes it unspecified,
+ * <br>Setting the prefix to <code>null</code> makes it unspecified,
* setting it to an empty string is implementation dependent.
- * <br>Note also that changing the prefix of an attribute that is known to
- * have a default value, does not make a new attribute with the default
- * value and the original prefix appear, since the
+ * <br>Note also that changing the prefix of an attribute that is known to
+ * have a default value, does not make a new attribute with the default
+ * value and the original prefix appear, since the
* <code>namespaceURI</code> and <code>localName</code> do not change.
- * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
- * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
- * method, such as <code>createElement</code> from the
+ * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
+ * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
+ * method, such as <code>createElement</code> from the
* <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
- * illegal character according to the XML version in use specified in
+ * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
+ * illegal character according to the XML version in use specified in
* the <code>Document.xmlVersion</code> attribute.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>namespaceURI</code> of this node is <code>null</code>, if the
- * specified prefix is "xml" and the <code>namespaceURI</code> of this
+ * <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
+ * malformed per the Namespaces in XML specification, if the
+ * <code>namespaceURI</code> of this node is <code>null</code>, if the
+ * specified prefix is "xml" and the <code>namespaceURI</code> of this
* node is different from "<a href='http://www.w3.org/XML/1998/namespace'>
- * http://www.w3.org/XML/1998/namespace</a>", if this node is an attribute and the specified prefix is "xmlns" and
- * the <code>namespaceURI</code> of this node is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if this node is an attribute and the <code>qualifiedName</code> of
+ * http://www.w3.org/XML/1998/namespace</a>", if this node is an attribute and the specified prefix is "xmlns" and
+ * the <code>namespaceURI</code> of this node is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if this node is an attribute and the <code>qualifiedName</code> of
* this node is "xmlns" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
* .
* @since DOM Level 2
@@ -552,9 +552,9 @@
/**
* Returns the local part of the qualified name of this node.
- * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
- * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
- * method, such as <code>Document.createElement()</code>, this is always
+ * <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
+ * <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
+ * method, such as <code>Document.createElement()</code>, this is always
* <code>null</code>.
* @since DOM Level 2
*/
@@ -562,20 +562,20 @@
/**
* Returns whether this node (if it is an element) has any attributes.
- * @return Returns <code>true</code> if this node has any attributes,
+ * @return Returns <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
* @since DOM Level 2
*/
public boolean hasAttributes();
/**
- * The absolute base URI of this node or <code>null</code> if the
- * implementation wasn't able to obtain an absolute URI. This value is
- * computed as described in . However, when the <code>Document</code>
+ * The absolute base URI of this node or <code>null</code> if the
+ * implementation wasn't able to obtain an absolute URI. This value is
+ * computed as described in . However, when the <code>Document</code>
* supports the feature "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
- * , the base URI is computed using first the value of the href
- * attribute of the HTML BASE element if any, and the value of the
- * <code>documentURI</code> attribute from the <code>Document</code>
+ * , the base URI is computed using first the value of the href
+ * attribute of the HTML BASE element if any, and the value of the
+ * <code>documentURI</code> attribute from the <code>Document</code>
* interface otherwise.
* @since DOM Level 3
*/
@@ -583,7 +583,7 @@
// DocumentPosition
/**
- * The two nodes are disconnected. Order between disconnected nodes is
+ * The two nodes are disconnected. Order between disconnected nodes is
* always implementation-specific.
*/
public static final short DOCUMENT_POSITION_DISCONNECTED = 0x01;
@@ -596,32 +596,32 @@
*/
public static final short DOCUMENT_POSITION_FOLLOWING = 0x04;
/**
- * The node contains the reference node. A node which contains is always
+ * The node contains the reference node. A node which contains is always
* preceding, too.
*/
public static final short DOCUMENT_POSITION_CONTAINS = 0x08;
/**
- * The node is contained by the reference node. A node which is contained
+ * The node is contained by the reference node. A node which is contained
* is always following, too.
*/
public static final short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
/**
- * The determination of preceding versus following is
+ * The determination of preceding versus following is
* implementation-specific.
*/
public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
/**
- * Compares the reference node, i.e. the node on which this method is
- * being called, with a node, i.e. the one passed as a parameter, with
- * regard to their position in the document and according to the
+ * Compares the reference node, i.e. the node on which this method is
+ * being called, with a node, i.e. the one passed as a parameter, with
+ * regard to their position in the document and according to the
* document order.
* @param other The node to compare against the reference node.
- * @return Returns how the node is positioned relatively to the reference
+ * @return Returns how the node is positioned relatively to the reference
* node.
* @exception DOMException
- * NOT_SUPPORTED_ERR: when the compared nodes are from different DOM
- * implementations that do not coordinate to return consistent
+ * NOT_SUPPORTED_ERR: when the compared nodes are from different DOM
+ * implementations that do not coordinate to return consistent
* implementation-specific results.
* @since DOM Level 3
*/
@@ -629,21 +629,21 @@
throws DOMException;
/**
- * This attribute returns the text content of this node and its
- * descendants. When it is defined to be <code>null</code>, setting it
- * has no effect. On setting, any possible children this node may have
- * are removed and, if it the new string is not empty or
- * <code>null</code>, replaced by a single <code>Text</code> node
- * containing the string this attribute is set to.
- * <br> On getting, no serialization is performed, the returned string
- * does not contain any markup. No whitespace normalization is performed
- * and the returned string does not contain the white spaces in element
- * content (see the attribute
- * <code>Text.isElementContentWhitespace</code>). Similarly, on setting,
- * no parsing is performed either, the input string is taken as pure
- * textual content.
- * <br>The string returned is made of the text content of this node
- * depending on its type, as defined below:
+ * This attribute returns the text content of this node and its
+ * descendants. When it is defined to be <code>null</code>, setting it
+ * has no effect. On setting, any possible children this node may have
+ * are removed and, if it the new string is not empty or
+ * <code>null</code>, replaced by a single <code>Text</code> node
+ * containing the string this attribute is set to.
+ * <br> On getting, no serialization is performed, the returned string
+ * does not contain any markup. No whitespace normalization is performed
+ * and the returned string does not contain the white spaces in element
+ * content (see the attribute
+ * <code>Text.isElementContentWhitespace</code>). Similarly, on setting,
+ * no parsing is performed either, the input string is taken as pure
+ * textual content.
+ * <br>The string returned is made of the text content of this node
+ * depending on its type, as defined below:
* <table border='1' cellpadding='3'>
* <tr>
* <th>Node type</th>
@@ -651,48 +651,48 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
- * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
+ * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
* DOCUMENT_FRAGMENT_NODE</td>
- * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
- * attribute value of every child node, excluding COMMENT_NODE and
- * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
+ * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
+ * attribute value of every child node, excluding COMMENT_NODE and
+ * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
* node has no children.</td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE,
+ * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE,
* PROCESSING_INSTRUCTION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE,
+ * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE,
* DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
* </tr>
* </table>
* @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
+ * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
+ * fit in a <code>DOMString</code> variable on the implementation
* platform.
* @since DOM Level 3
*/
public String getTextContent()
throws DOMException;
/**
- * This attribute returns the text content of this node and its
- * descendants. When it is defined to be <code>null</code>, setting it
- * has no effect. On setting, any possible children this node may have
- * are removed and, if it the new string is not empty or
- * <code>null</code>, replaced by a single <code>Text</code> node
- * containing the string this attribute is set to.
- * <br> On getting, no serialization is performed, the returned string
- * does not contain any markup. No whitespace normalization is performed
- * and the returned string does not contain the white spaces in element
- * content (see the attribute
- * <code>Text.isElementContentWhitespace</code>). Similarly, on setting,
- * no parsing is performed either, the input string is taken as pure
- * textual content.
- * <br>The string returned is made of the text content of this node
- * depending on its type, as defined below:
+ * This attribute returns the text content of this node and its
+ * descendants. When it is defined to be <code>null</code>, setting it
+ * has no effect. On setting, any possible children this node may have
+ * are removed and, if it the new string is not empty or
+ * <code>null</code>, replaced by a single <code>Text</code> node
+ * containing the string this attribute is set to.
+ * <br> On getting, no serialization is performed, the returned string
+ * does not contain any markup. No whitespace normalization is performed
+ * and the returned string does not contain the white spaces in element
+ * content (see the attribute
+ * <code>Text.isElementContentWhitespace</code>). Similarly, on setting,
+ * no parsing is performed either, the input string is taken as pure
+ * textual content.
+ * <br>The string returned is made of the text content of this node
+ * depending on its type, as defined below:
* <table border='1' cellpadding='3'>
* <tr>
* <th>Node type</th>
@@ -700,20 +700,20 @@
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
- * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
+ * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
* DOCUMENT_FRAGMENT_NODE</td>
- * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
- * attribute value of every child node, excluding COMMENT_NODE and
- * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
+ * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
+ * attribute value of every child node, excluding COMMENT_NODE and
+ * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
* node has no children.</td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE,
+ * <td valign='top' rowspan='1' colspan='1'>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE,
* PROCESSING_INSTRUCTION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE,
+ * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE,
* DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
* </tr>
@@ -727,53 +727,53 @@
/**
* Returns whether this node is the same node as the given one.
- * <br>This method provides a way to determine whether two
- * <code>Node</code> references returned by the implementation reference
- * the same object. When two <code>Node</code> references are references
- * to the same object, even if through a proxy, the references may be
- * used completely interchangeably, such that all attributes have the
- * same values and calling the same DOM method on either reference
+ * <br>This method provides a way to determine whether two
+ * <code>Node</code> references returned by the implementation reference
+ * the same object. When two <code>Node</code> references are references
+ * to the same object, even if through a proxy, the references may be
+ * used completely interchangeably, such that all attributes have the
+ * same values and calling the same DOM method on either reference
* always has exactly the same effect.
* @param other The node to test against.
- * @return Returns <code>true</code> if the nodes are the same,
+ * @return Returns <code>true</code> if the nodes are the same,
* <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isSameNode(Node other);
/**
- * Look up the prefix associated to the given namespace URI, starting from
- * this node. The default namespace declarations are ignored by this
+ * Look up the prefix associated to the given namespace URI, starting from
+ * this node. The default namespace declarations are ignored by this
* method.
* <br>See for details on the algorithm used by this method.
* @param namespaceURI The namespace URI to look for.
- * @return Returns an associated namespace prefix if found or
- * <code>null</code> if none is found. If more than one prefix are
- * associated to the namespace prefix, the returned namespace prefix
+ * @return Returns an associated namespace prefix if found or
+ * <code>null</code> if none is found. If more than one prefix are
+ * associated to the namespace prefix, the returned namespace prefix
* is implementation dependent.
* @since DOM Level 3
*/
public String lookupPrefix(String namespaceURI);
/**
- * This method checks if the specified <code>namespaceURI</code> is the
- * default namespace or not.
+ * This method checks if the specified <code>namespaceURI</code> is the
+ * default namespace or not.
* @param namespaceURI The namespace URI to look for.
- * @return Returns <code>true</code> if the specified
- * <code>namespaceURI</code> is the default namespace,
- * <code>false</code> otherwise.
+ * @return Returns <code>true</code> if the specified
+ * <code>namespaceURI</code> is the default namespace,
+ * <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isDefaultNamespace(String namespaceURI);
/**
- * Look up the namespace URI associated to the given prefix, starting from
+ * Look up the namespace URI associated to the given prefix, starting from
* this node.
* <br>See for details on the algorithm used by this method.
- * @param prefix The prefix to look for. If this parameter is
- * <code>null</code>, the method will return the default namespace URI
+ * @param prefix The prefix to look for. If this parameter is
+ * <code>null</code>, the method will return the default namespace URI
* if any.
- * @return Returns the associated namespace URI or <code>null</code> if
+ * @return Returns the associated namespace URI or <code>null</code> if
* none is found.
* @since DOM Level 3
*/
@@ -781,117 +781,117 @@
/**
* Tests whether two nodes are equal.
- * <br>This method tests for equality of nodes, not sameness (i.e.,
- * whether the two nodes are references to the same object) which can be
- * tested with <code>Node.isSameNode()</code>. All nodes that are the
+ * <br>This method tests for equality of nodes, not sameness (i.e.,
+ * whether the two nodes are references to the same object) which can be
+ * tested with <code>Node.isSameNode()</code>. All nodes that are the
* same will also be equal, though the reverse may not be true.
- * <br>Two nodes are equal if and only if the following conditions are
- * satisfied:
+ * <br>Two nodes are equal if and only if the following conditions are
+ * satisfied:
* <ul>
* <li>The two nodes are of the same type.
* </li>
- * <li>The following string
- * attributes are equal: <code>nodeName</code>, <code>localName</code>,
+ * <li>The following string
+ * attributes are equal: <code>nodeName</code>, <code>localName</code>,
* <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
- * . This is: they are both <code>null</code>, or they have the same
+ * . This is: they are both <code>null</code>, or they have the same
* length and are character for character identical.
* </li>
- * <li>The
- * <code>attributes</code> <code>NamedNodeMaps</code> are equal. This
- * is: they are both <code>null</code>, or they have the same length and
- * for each node that exists in one map there is a node that exists in
- * the other map and is equal, although not necessarily at the same
+ * <li>The
+ * <code>attributes</code> <code>NamedNodeMaps</code> are equal. This
+ * is: they are both <code>null</code>, or they have the same length and
+ * for each node that exists in one map there is a node that exists in
+ * the other map and is equal, although not necessarily at the same
* index.
* </li>
- * <li>The <code>childNodes</code> <code>NodeLists</code> are equal.
- * This is: they are both <code>null</code>, or they have the same
- * length and contain equal nodes at the same index. Note that
- * normalization can affect equality; to avoid this, nodes should be
+ * <li>The <code>childNodes</code> <code>NodeLists</code> are equal.
+ * This is: they are both <code>null</code>, or they have the same
+ * length and contain equal nodes at the same index. Note that
+ * normalization can affect equality; to avoid this, nodes should be
* normalized before being compared.
* </li>
- * </ul>
- * <br>For two <code>DocumentType</code> nodes to be equal, the following
- * conditions must also be satisfied:
+ * </ul>
+ * <br>For two <code>DocumentType</code> nodes to be equal, the following
+ * conditions must also be satisfied:
* <ul>
- * <li>The following string attributes
- * are equal: <code>publicId</code>, <code>systemId</code>,
+ * <li>The following string attributes
+ * are equal: <code>publicId</code>, <code>systemId</code>,
* <code>internalSubset</code>.
* </li>
- * <li>The <code>entities</code>
+ * <li>The <code>entities</code>
* <code>NamedNodeMaps</code> are equal.
* </li>
- * <li>The <code>notations</code>
+ * <li>The <code>notations</code>
* <code>NamedNodeMaps</code> are equal.
* </li>
- * </ul>
- * <br>On the other hand, the following do not affect equality: the
- * <code>ownerDocument</code>, <code>baseURI</code>, and
- * <code>parentNode</code> attributes, the <code>specified</code>
+ * </ul>
+ * <br>On the other hand, the following do not affect equality: the
+ * <code>ownerDocument</code>, <code>baseURI</code>, and
+ * <code>parentNode</code> attributes, the <code>specified</code>
* attribute for <code>Attr</code> nodes, the <code>schemaTypeInfo</code>
- * attribute for <code>Attr</code> and <code>Element</code> nodes, the
- * <code>Text.isElementContentWhitespace</code> attribute for
- * <code>Text</code> nodes, as well as any user data or event listeners
- * registered on the nodes.
- * <p ><b>Note:</b> As a general rule, anything not mentioned in the
- * description above is not significant in consideration of equality
- * checking. Note that future versions of this specification may take
- * into account more attributes and implementations conform to this
- * specification are expected to be updated accordingly.
+ * attribute for <code>Attr</code> and <code>Element</code> nodes, the
+ * <code>Text.isElementContentWhitespace</code> attribute for
+ * <code>Text</code> nodes, as well as any user data or event listeners
+ * registered on the nodes.
+ * <p ><b>Note:</b> As a general rule, anything not mentioned in the
+ * description above is not significant in consideration of equality
+ * checking. Note that future versions of this specification may take
+ * into account more attributes and implementations conform to this
+ * specification are expected to be updated accordingly.
* @param arg The node to compare equality with.
- * @return Returns <code>true</code> if the nodes are equal,
+ * @return Returns <code>true</code> if the nodes are equal,
* <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isEqualNode(Node arg);
/**
- * This method returns a specialized object which implements the
- * specialized APIs of the specified feature and version, as specified
- * in . The specialized object may also be obtained by using
- * binding-specific casting methods but is not necessarily expected to,
- * as discussed in . This method also allow the implementation to
+ * This method returns a specialized object which implements the
+ * specialized APIs of the specified feature and version, as specified
+ * in . The specialized object may also be obtained by using
+ * binding-specific casting methods but is not necessarily expected to,
+ * as discussed in . This method also allow the implementation to
* provide specialized objects which do not support the <code>Node</code>
- * interface.
- * @param feature The name of the feature requested. Note that any plus
- * sign "+" prepended to the name of the feature will be ignored since
- * it is not significant in the context of this method.
- * @param version This is the version number of the feature to test.
- * @return Returns an object which implements the specialized APIs of
- * the specified feature and version, if any, or <code>null</code> if
- * there is no object which implements interfaces associated with that
- * feature. If the <code>DOMObject</code> returned by this method
- * implements the <code>Node</code> interface, it must delegate to the
- * primary core <code>Node</code> and not return results inconsistent
- * with the primary core <code>Node</code> such as attributes,
- * childNodes, etc.
+ * interface.
+ * @param feature The name of the feature requested. Note that any plus
+ * sign "+" prepended to the name of the feature will be ignored since
+ * it is not significant in the context of this method.
+ * @param version This is the version number of the feature to test.
+ * @return Returns an object which implements the specialized APIs of
+ * the specified feature and version, if any, or <code>null</code> if
+ * there is no object which implements interfaces associated with that
+ * feature. If the <code>DOMObject</code> returned by this method
+ * implements the <code>Node</code> interface, it must delegate to the
+ * primary core <code>Node</code> and not return results inconsistent
+ * with the primary core <code>Node</code> such as attributes,
+ * childNodes, etc.
* @since DOM Level 3
*/
- public Object getFeature(String feature,
+ public Object getFeature(String feature,
String version);
/**
- * Associate an object to a key on this node. The object can later be
- * retrieved from this node by calling <code>getUserData</code> with the
+ * Associate an object to a key on this node. The object can later be
+ * retrieved from this node by calling <code>getUserData</code> with the
* same key.
* @param key The key to associate the object to.
- * @param data The object to associate to the given key, or
+ * @param data The object to associate to the given key, or
* <code>null</code> to remove any existing association to that key.
- * @param handler The handler to associate to that key, or
+ * @param handler The handler to associate to that key, or
* <code>null</code>.
- * @return Returns the <code>DOMUserData</code> previously associated to
+ * @return Returns the <code>DOMUserData</code> previously associated to
* the given key on this node, or <code>null</code> if there was none.
* @since DOM Level 3
*/
- public Object setUserData(String key,
- Object data,
+ public Object setUserData(String key,
+ Object data,
UserDataHandler handler);
/**
- * Retrieves the object associated to a key on a this node. The object
- * must first have been set to this node by calling
+ * Retrieves the object associated to a key on a this node. The object
+ * must first have been set to this node by calling
* <code>setUserData</code> with the same key.
* @param key The key the object is associated to.
- * @return Returns the <code>DOMUserData</code> associated to the given
+ * @return Returns the <code>DOMUserData</code> associated to the given
* key on this node, or <code>null</code> if there was none.
* @since DOM Level 3
*/
diff --git a/luni/src/main/java/org/w3c/dom/NodeList.java b/luni/src/main/java/org/w3c/dom/NodeList.java
index e4204ec..4a98a90 100644
--- a/luni/src/main/java/org/w3c/dom/NodeList.java
+++ b/luni/src/main/java/org/w3c/dom/NodeList.java
@@ -13,27 +13,27 @@
package org.w3c.dom;
/**
- * The <code>NodeList</code> interface provides the abstraction of an ordered
- * collection of nodes, without defining or constraining how this collection
+ * The <code>NodeList</code> interface provides the abstraction of an ordered
+ * collection of nodes, without defining or constraining how this collection
* is implemented. <code>NodeList</code> objects in the DOM are live.
- * <p>The items in the <code>NodeList</code> are accessible via an integral
+ * <p>The items in the <code>NodeList</code> are accessible via an integral
* index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface NodeList {
/**
- * Returns the <code>index</code>th item in the collection. If
- * <code>index</code> is greater than or equal to the number of nodes in
+ * Returns the <code>index</code>th item in the collection. If
+ * <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>.
* @param index Index into the collection.
- * @return The node at the <code>index</code>th position in the
- * <code>NodeList</code>, or <code>null</code> if that is not a valid
+ * @return The node at the <code>index</code>th position in the
+ * <code>NodeList</code>, or <code>null</code> if that is not a valid
* index.
*/
public Node item(int index);
/**
- * The number of nodes in the list. The range of valid child node indices
+ * The number of nodes in the list. The range of valid child node indices
* is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
diff --git a/luni/src/main/java/org/w3c/dom/Notation.java b/luni/src/main/java/org/w3c/dom/Notation.java
index 3739f92..a7ad409 100644
--- a/luni/src/main/java/org/w3c/dom/Notation.java
+++ b/luni/src/main/java/org/w3c/dom/Notation.java
@@ -13,26 +13,26 @@
package org.w3c.dom;
/**
- * This interface represents a notation declared in the DTD. A notation either
- * declares, by name, the format of an unparsed entity (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#Notations'>section 4.7</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), or is
- * used for formal declaration of processing instruction targets (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-pi'>section 2.6</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]). The
- * <code>nodeName</code> attribute inherited from <code>Node</code> is set
+ * This interface represents a notation declared in the DTD. A notation either
+ * declares, by name, the format of an unparsed entity (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#Notations'>section 4.7</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), or is
+ * used for formal declaration of processing instruction targets (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-pi'>section 2.6</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]). The
+ * <code>nodeName</code> attribute inherited from <code>Node</code> is set
* to the declared name of the notation.
- * <p>The DOM Core does not support editing <code>Notation</code> nodes; they
+ * <p>The DOM Core does not support editing <code>Notation</code> nodes; they
* are therefore readonly.
* <p>A <code>Notation</code> node does not have any parent.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Notation extends Node {
/**
- * The public identifier of this notation. If the public identifier was
+ * The public identifier of this notation. If the public identifier was
* not specified, this is <code>null</code>.
*/
public String getPublicId();
/**
- * The system identifier of this notation. If the system identifier was
- * not specified, this is <code>null</code>. This may be an absolute URI
+ * The system identifier of this notation. If the system identifier was
+ * not specified, this is <code>null</code>. This may be an absolute URI
* or not.
*/
public String getSystemId();
diff --git a/luni/src/main/java/org/w3c/dom/ProcessingInstruction.java b/luni/src/main/java/org/w3c/dom/ProcessingInstruction.java
index 0b6825f..61b7892 100644
--- a/luni/src/main/java/org/w3c/dom/ProcessingInstruction.java
+++ b/luni/src/main/java/org/w3c/dom/ProcessingInstruction.java
@@ -13,34 +13,34 @@
package org.w3c.dom;
/**
- * The <code>ProcessingInstruction</code> interface represents a "processing
- * instruction", used in XML as a way to keep processor-specific information
+ * The <code>ProcessingInstruction</code> interface represents a "processing
+ * instruction", used in XML as a way to keep processor-specific information
* in the text of the document.
- * <p> No lexical check is done on the content of a processing instruction and
- * it is therefore possible to have the character sequence
- * <code>"?>"</code> in the content, which is illegal a processing
- * instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
- * presence of this character sequence must generate a fatal error during
- * serialization.
+ * <p> No lexical check is done on the content of a processing instruction and
+ * it is therefore possible to have the character sequence
+ * <code>"?>"</code> in the content, which is illegal a processing
+ * instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
+ * presence of this character sequence must generate a fatal error during
+ * serialization.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface ProcessingInstruction extends Node {
/**
- * The target of this processing instruction. XML defines this as being
- * the first token following the markup that begins the processing
+ * The target of this processing instruction. XML defines this as being
+ * the first token following the markup that begins the processing
* instruction.
*/
public String getTarget();
/**
- * The content of this processing instruction. This is from the first non
- * white space character after the target to the character immediately
+ * The content of this processing instruction. This is from the first non
+ * white space character after the target to the character immediately
* preceding the <code>?></code>.
*/
public String getData();
/**
- * The content of this processing instruction. This is from the first non
- * white space character after the target to the character immediately
+ * The content of this processing instruction. This is from the first non
+ * white space character after the target to the character immediately
* preceding the <code>?></code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
diff --git a/luni/src/main/java/org/w3c/dom/Text.java b/luni/src/main/java/org/w3c/dom/Text.java
index 9c294a4..872c549 100644
--- a/luni/src/main/java/org/w3c/dom/Text.java
+++ b/luni/src/main/java/org/w3c/dom/Text.java
@@ -13,45 +13,45 @@
package org.w3c.dom;
/**
- * The <code>Text</code> interface inherits from <code>CharacterData</code>
- * and represents the textual content (termed <a href='http://www.w3.org/TR/2004/REC-xml-20040204#syntax'>character data</a> in XML) of an <code>Element</code> or <code>Attr</code>. If there is no
- * markup inside an element's content, the text is contained in a single
- * object implementing the <code>Text</code> interface that is the only
- * child of the element. If there is markup, it is parsed into the
- * information items (elements, comments, etc.) and <code>Text</code> nodes
+ * The <code>Text</code> interface inherits from <code>CharacterData</code>
+ * and represents the textual content (termed <a href='http://www.w3.org/TR/2004/REC-xml-20040204#syntax'>character data</a> in XML) of an <code>Element</code> or <code>Attr</code>. If there is no
+ * markup inside an element's content, the text is contained in a single
+ * object implementing the <code>Text</code> interface that is the only
+ * child of the element. If there is markup, it is parsed into the
+ * information items (elements, comments, etc.) and <code>Text</code> nodes
* that form the list of children of the element.
- * <p>When a document is first made available via the DOM, there is only one
- * <code>Text</code> node for each block of text. Users may create adjacent
- * <code>Text</code> nodes that represent the contents of a given element
- * without any intervening markup, but should be aware that there is no way
- * to represent the separations between these nodes in XML or HTML, so they
- * will not (in general) persist between DOM editing sessions. The
- * <code>Node.normalize()</code> method merges any such adjacent
+ * <p>When a document is first made available via the DOM, there is only one
+ * <code>Text</code> node for each block of text. Users may create adjacent
+ * <code>Text</code> nodes that represent the contents of a given element
+ * without any intervening markup, but should be aware that there is no way
+ * to represent the separations between these nodes in XML or HTML, so they
+ * will not (in general) persist between DOM editing sessions. The
+ * <code>Node.normalize()</code> method merges any such adjacent
* <code>Text</code> objects into a single node for each block of text.
- * <p> No lexical check is done on the content of a <code>Text</code> node
- * and, depending on its position in the document, some characters must be
- * escaped during serialization using character references; e.g. the
- * characters "<&" if the textual content is part of an element or of
- * an attribute, the character sequence "]]>" when part of an element,
- * the quotation mark character " or the apostrophe character ' when part of
- * an attribute.
+ * <p> No lexical check is done on the content of a <code>Text</code> node
+ * and, depending on its position in the document, some characters must be
+ * escaped during serialization using character references; e.g. the
+ * characters "<&" if the textual content is part of an element or of
+ * an attribute, the character sequence "]]>" when part of an element,
+ * the quotation mark character " or the apostrophe character ' when part of
+ * an attribute.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Text extends CharacterData {
/**
- * Breaks this node into two nodes at the specified <code>offset</code>,
- * keeping both in the tree as siblings. After being split, this node
- * will contain all the content up to the <code>offset</code> point. A
- * new node of the same type, which contains all the content at and
- * after the <code>offset</code> point, is returned. If the original
- * node had a parent node, the new node is inserted as the next sibling
- * of the original node. When the <code>offset</code> is equal to the
+ * Breaks this node into two nodes at the specified <code>offset</code>,
+ * keeping both in the tree as siblings. After being split, this node
+ * will contain all the content up to the <code>offset</code> point. A
+ * new node of the same type, which contains all the content at and
+ * after the <code>offset</code> point, is returned. If the original
+ * node had a parent node, the new node is inserted as the next sibling
+ * of the original node. When the <code>offset</code> is equal to the
* length of this node, the new node has no data.
- * @param offset The 16-bit unit offset at which to split, starting from
+ * @param offset The 16-bit unit offset at which to split, starting from
* <code>0</code>.
* @return The new node, of the same type as this node.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
+ * INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of 16-bit units in <code>data</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
@@ -60,63 +60,63 @@
/**
* Returns whether this text node contains <a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204#infoitem.character'>
- * element content whitespace</a>, often abusively called "ignorable whitespace". The text node is
- * determined to contain whitespace in element content during the load
- * of the document or if validation occurs while using
+ * element content whitespace</a>, often abusively called "ignorable whitespace". The text node is
+ * determined to contain whitespace in element content during the load
+ * of the document or if validation occurs while using
* <code>Document.normalizeDocument()</code>.
* @since DOM Level 3
*/
public boolean isElementContentWhitespace();
/**
- * Returns all text of <code>Text</code> nodes logically-adjacent text
+ * Returns all text of <code>Text</code> nodes logically-adjacent text
* nodes to this node, concatenated in document order.
- * <br>For instance, in the example below <code>wholeText</code> on the
- * <code>Text</code> node that contains "bar" returns "barfoo", while on
- * the <code>Text</code> node that contains "foo" it returns "barfoo".
+ * <br>For instance, in the example below <code>wholeText</code> on the
+ * <code>Text</code> node that contains "bar" returns "barfoo", while on
+ * the <code>Text</code> node that contains "foo" it returns "barfoo".
* @since DOM Level 3
*/
public String getWholeText();
/**
- * Replaces the text of the current node and all logically-adjacent text
- * nodes with the specified text. All logically-adjacent text nodes are
- * removed including the current node unless it was the recipient of the
+ * Replaces the text of the current node and all logically-adjacent text
+ * nodes with the specified text. All logically-adjacent text nodes are
+ * removed including the current node unless it was the recipient of the
* replacement text.
- * <br>This method returns the node which received the replacement text.
- * The returned node is:
+ * <br>This method returns the node which received the replacement text.
+ * The returned node is:
* <ul>
- * <li><code>null</code>, when the replacement text is
+ * <li><code>null</code>, when the replacement text is
* the empty string;
* </li>
- * <li>the current node, except when the current node is
+ * <li>the current node, except when the current node is
* read-only;
* </li>
* <li> a new <code>Text</code> node of the same type (
- * <code>Text</code> or <code>CDATASection</code>) as the current node
+ * <code>Text</code> or <code>CDATASection</code>) as the current node
* inserted at the location of the replacement.
* </li>
* </ul>
- * <br>For instance, in the above example calling
- * <code>replaceWholeText</code> on the <code>Text</code> node that
- * contains "bar" with "yo" in argument results in the following:
- * <br>Where the nodes to be removed are read-only descendants of an
- * <code>EntityReference</code>, the <code>EntityReference</code> must
- * be removed instead of the read-only nodes. If any
- * <code>EntityReference</code> to be removed has descendants that are
- * not <code>EntityReference</code>, <code>Text</code>, or
- * <code>CDATASection</code> nodes, the <code>replaceWholeText</code>
- * method must fail before performing any modification of the document,
- * raising a <code>DOMException</code> with the code
+ * <br>For instance, in the above example calling
+ * <code>replaceWholeText</code> on the <code>Text</code> node that
+ * contains "bar" with "yo" in argument results in the following:
+ * <br>Where the nodes to be removed are read-only descendants of an
+ * <code>EntityReference</code>, the <code>EntityReference</code> must
+ * be removed instead of the read-only nodes. If any
+ * <code>EntityReference</code> to be removed has descendants that are
+ * not <code>EntityReference</code>, <code>Text</code>, or
+ * <code>CDATASection</code> nodes, the <code>replaceWholeText</code>
+ * method must fail before performing any modification of the document,
+ * raising a <code>DOMException</code> with the code
* <code>NO_MODIFICATION_ALLOWED_ERR</code>.
- * <br>For instance, in the example below calling
- * <code>replaceWholeText</code> on the <code>Text</code> node that
- * contains "bar" fails, because the <code>EntityReference</code> node
+ * <br>For instance, in the example below calling
+ * <code>replaceWholeText</code> on the <code>Text</code> node that
+ * contains "bar" fails, because the <code>EntityReference</code> node
* "ent" contains an <code>Element</code> node which cannot be removed.
* @param content The content of the replacing <code>Text</code> node.
* @return The <code>Text</code> node created with the specified content.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if one of the <code>Text</code>
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if one of the <code>Text</code>
* nodes being replaced is readonly.
* @since DOM Level 3
*/
diff --git a/luni/src/main/java/org/w3c/dom/TypeInfo.java b/luni/src/main/java/org/w3c/dom/TypeInfo.java
index 054f990..d36f3cc 100644
--- a/luni/src/main/java/org/w3c/dom/TypeInfo.java
+++ b/luni/src/main/java/org/w3c/dom/TypeInfo.java
@@ -13,95 +13,95 @@
package org.w3c.dom;
/**
- * The <code>TypeInfo</code> interface represents a type referenced from
- * <code>Element</code> or <code>Attr</code> nodes, specified in the schemas
- * associated with the document. The type is a pair of a namespace URI and
- * name properties, and depends on the document's schema.
- * <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], the values
- * are computed as follows:
+ * The <code>TypeInfo</code> interface represents a type referenced from
+ * <code>Element</code> or <code>Attr</code> nodes, specified in the schemas
+ * associated with the document. The type is a pair of a namespace URI and
+ * name properties, and depends on the document's schema.
+ * <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], the values
+ * are computed as follows:
* <ul>
- * <li> If this type is referenced from an
- * <code>Attr</code> node, <code>typeNamespace</code> is
- * <code>"http://www.w3.org/TR/REC-xml"</code> and <code>typeName</code>
+ * <li> If this type is referenced from an
+ * <code>Attr</code> node, <code>typeNamespace</code> is
+ * <code>"http://www.w3.org/TR/REC-xml"</code> and <code>typeName</code>
* represents the <b>[attribute type]</b> property in the [<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
* . If there is no declaration for the attribute, <code>typeNamespace</code>
- * and <code>typeName</code> are <code>null</code>.
+ * and <code>typeName</code> are <code>null</code>.
* </li>
- * <li> If this type is
- * referenced from an <code>Element</code> node, <code>typeNamespace</code>
- * and <code>typeName</code> are <code>null</code>.
+ * <li> If this type is
+ * referenced from an <code>Element</code> node, <code>typeNamespace</code>
+ * and <code>typeName</code> are <code>null</code>.
* </li>
* </ul>
* <p> If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * , the values are computed as follows using the post-schema-validation
- * infoset contributions (also called PSVI contributions):
+ * , the values are computed as follows using the post-schema-validation
+ * infoset contributions (also called PSVI contributions):
* <ul>
- * <li> If the <b>[validity]</b> property exists AND is <em>"invalid"</em> or <em>"notKnown"</em>: the {target namespace} and {name} properties of the declared type if
- * available, otherwise <code>null</code>.
- * <p ><b>Note:</b> At the time of writing, the XML Schema specification does
- * not require exposing the declared type. Thus, DOM implementations might
- * choose not to provide type information if validity is not valid.
+ * <li> If the <b>[validity]</b> property exists AND is <em>"invalid"</em> or <em>"notKnown"</em>: the {target namespace} and {name} properties of the declared type if
+ * available, otherwise <code>null</code>.
+ * <p ><b>Note:</b> At the time of writing, the XML Schema specification does
+ * not require exposing the declared type. Thus, DOM implementations might
+ * choose not to provide type information if validity is not valid.
* </li>
- * <li> If the <b>[validity]</b> property exists and is <em>"valid"</em>:
+ * <li> If the <b>[validity]</b> property exists and is <em>"valid"</em>:
* <ol>
- * <li> If <b>[member type definition]</b> exists:
+ * <li> If <b>[member type definition]</b> exists:
* <ol>
- * <li>If {name} is not absent, then expose {name} and {target
+ * <li>If {name} is not absent, then expose {name} and {target
* namespace} properties of the <b>[member type definition]</b> property;
* </li>
- * <li>Otherwise, expose the namespace and local name of the
+ * <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
* </ol>
* </li>
- * <li> If the <b>[type definition]</b> property exists:
+ * <li> If the <b>[type definition]</b> property exists:
* <ol>
- * <li>If {name} is not absent, then expose {name} and {target
+ * <li>If {name} is not absent, then expose {name} and {target
* namespace} properties of the <b>[type definition]</b> property;
* </li>
- * <li>Otherwise, expose the namespace and local name of the
+ * <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
- * </ol>
+ * </ol>
* </li>
- * <li> If the <b>[member type definition anonymous]</b> exists:
+ * <li> If the <b>[member type definition anonymous]</b> exists:
* <ol>
* <li>If it is false, then expose <b>[member type definition name]</b> and <b>[member type definition namespace]</b> properties;
* </li>
- * <li>Otherwise, expose the namespace and local name of the
+ * <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
- * </ol>
+ * </ol>
* </li>
- * <li> If the <b>[type definition anonymous]</b> exists:
+ * <li> If the <b>[type definition anonymous]</b> exists:
* <ol>
* <li>If it is false, then expose <b>[type definition name]</b> and <b>[type definition namespace]</b> properties;
* </li>
- * <li>Otherwise, expose the namespace and local name of the
+ * <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
- * </ol>
+ * </ol>
* </li>
* </ol>
* </li>
* </ul>
- * <p ><b>Note:</b> Other schema languages are outside the scope of the W3C
- * and therefore should define how to represent their type systems using
- * <code>TypeInfo</code>.
+ * <p ><b>Note:</b> Other schema languages are outside the scope of the W3C
+ * and therefore should define how to represent their type systems using
+ * <code>TypeInfo</code>.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface TypeInfo {
/**
- * The name of a type declared for the associated element or attribute,
- * or <code>null</code> if unknown.
+ * The name of a type declared for the associated element or attribute,
+ * or <code>null</code> if unknown.
*/
public String getTypeName();
/**
- * The namespace of the type declared for the associated element or
- * attribute or <code>null</code> if the element does not have
- * declaration or if no namespace information is available.
+ * The namespace of the type declared for the associated element or
+ * attribute or <code>null</code> if the element does not have
+ * declaration or if no namespace information is available.
*/
public String getTypeNamespace();
@@ -110,76 +110,76 @@
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeRestriction'>
* restriction</a> if complex types are involved, or a <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-restriction'>
- * restriction</a> if simple types are involved.
- * <br> The reference type definition is derived by restriction from the
- * other type definition if the other type definition is the same as the
- * reference type definition, or if the other type definition can be
- * reached recursively following the {base type definition} property
- * from the reference type definition, and all the <em>derivation methods</em> involved are restriction.
+ * restriction</a> if simple types are involved.
+ * <br> The reference type definition is derived by restriction from the
+ * other type definition if the other type definition is the same as the
+ * reference type definition, or if the other type definition can be
+ * reached recursively following the {base type definition} property
+ * from the reference type definition, and all the <em>derivation methods</em> involved are restriction.
*/
public static final int DERIVATION_RESTRICTION = 0x00000001;
/**
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeExtension'>
- * extension</a>.
- * <br> The reference type definition is derived by extension from the
- * other type definition if the other type definition can be reached
- * recursively following the {base type definition} property from the
- * reference type definition, and at least one of the <em>derivation methods</em> involved is an extension.
+ * extension</a>.
+ * <br> The reference type definition is derived by extension from the
+ * other type definition if the other type definition can be reached
+ * recursively following the {base type definition} property from the
+ * reference type definition, and at least one of the <em>derivation methods</em> involved is an extension.
*/
public static final int DERIVATION_EXTENSION = 0x00000002;
/**
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-union'>
- * union</a> if simple types are involved.
- * <br> The reference type definition is derived by union from the other
- * type definition if there exists two type definitions T1 and T2 such
- * as the reference type definition is derived from T1 by
- * <code>DERIVATION_RESTRICTION</code> or
- * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
- * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>union</em>, and one of the {member type definitions} is T2. Note that T1 could be
- * the same as the reference type definition, and T2 could be the same
- * as the other type definition.
+ * union</a> if simple types are involved.
+ * <br> The reference type definition is derived by union from the other
+ * type definition if there exists two type definitions T1 and T2 such
+ * as the reference type definition is derived from T1 by
+ * <code>DERIVATION_RESTRICTION</code> or
+ * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
+ * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>union</em>, and one of the {member type definitions} is T2. Note that T1 could be
+ * the same as the reference type definition, and T2 could be the same
+ * as the other type definition.
*/
public static final int DERIVATION_UNION = 0x00000004;
/**
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-list'>list</a>.
- * <br> The reference type definition is derived by list from the other
- * type definition if there exists two type definitions T1 and T2 such
- * as the reference type definition is derived from T1 by
- * <code>DERIVATION_RESTRICTION</code> or
- * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
- * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>list</em>, and T2 is the {item type definition}. Note that T1 could be the same as
- * the reference type definition, and T2 could be the same as the other
- * type definition.
+ * , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-list'>list</a>.
+ * <br> The reference type definition is derived by list from the other
+ * type definition if there exists two type definitions T1 and T2 such
+ * as the reference type definition is derived from T1 by
+ * <code>DERIVATION_RESTRICTION</code> or
+ * <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
+ * definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>list</em>, and T2 is the {item type definition}. Note that T1 could be the same as
+ * the reference type definition, and T2 could be the same as the other
+ * type definition.
*/
public static final int DERIVATION_LIST = 0x00000008;
/**
- * This method returns if there is a derivation between the reference
- * type definition, i.e. the <code>TypeInfo</code> on which the method
- * is being called, and the other type definition, i.e. the one passed
- * as parameters.
- * @param typeNamespaceArg the namespace of the other type definition.
- * @param typeNameArg the name of the other type definition.
- * @param derivationMethod the type of derivation and conditions applied
- * between two types, as described in the list of constants provided
- * in this interface.
- * @return If the document's schema is a DTD or no schema is associated
+ * This method returns if there is a derivation between the reference
+ * type definition, i.e. the <code>TypeInfo</code> on which the method
+ * is being called, and the other type definition, i.e. the one passed
+ * as parameters.
+ * @param typeNamespaceArg the namespace of the other type definition.
+ * @param typeNameArg the name of the other type definition.
+ * @param derivationMethod the type of derivation and conditions applied
+ * between two types, as described in the list of constants provided
+ * in this interface.
+ * @return If the document's schema is a DTD or no schema is associated
* with the document, this method will always return <code>false</code>
- * . If the document's schema is an XML Schema, the method will
- * <code>true</code> if the reference type definition is derived from
- * the other type definition according to the derivation parameter. If
- * the value of the parameter is <code>0</code> (no bit is set to
- * <code>1</code> for the <code>derivationMethod</code> parameter),
- * the method will return <code>true</code> if the other type
- * definition can be reached by recursing any combination of {base
- * type definition}, {item type definition}, or {member type
- * definitions} from the reference type definition.
+ * . If the document's schema is an XML Schema, the method will
+ * <code>true</code> if the reference type definition is derived from
+ * the other type definition according to the derivation parameter. If
+ * the value of the parameter is <code>0</code> (no bit is set to
+ * <code>1</code> for the <code>derivationMethod</code> parameter),
+ * the method will return <code>true</code> if the other type
+ * definition can be reached by recursing any combination of {base
+ * type definition}, {item type definition}, or {member type
+ * definitions} from the reference type definition.
*/
- public boolean isDerivedFrom(String typeNamespaceArg,
- String typeNameArg,
+ public boolean isDerivedFrom(String typeNamespaceArg,
+ String typeNameArg,
int derivationMethod);
}
diff --git a/luni/src/main/java/org/w3c/dom/UserDataHandler.java b/luni/src/main/java/org/w3c/dom/UserDataHandler.java
index a16ea73..cf6ee56 100644
--- a/luni/src/main/java/org/w3c/dom/UserDataHandler.java
+++ b/luni/src/main/java/org/w3c/dom/UserDataHandler.java
@@ -13,12 +13,12 @@
package org.w3c.dom;
/**
- * When associating an object to a key on a node using
- * <code>Node.setUserData()</code> the application can provide a handler
- * that gets called when the node the object is associated to is being
- * cloned, imported, or renamed. This can be used by the application to
- * implement various behaviors regarding the data it associates to the DOM
- * nodes. This interface defines that handler.
+ * When associating an object to a key on a node using
+ * <code>Node.setUserData()</code> the application can provide a handler
+ * that gets called when the node the object is associated to is being
+ * cloned, imported, or renamed. This can be used by the application to
+ * implement various behaviors regarding the data it associates to the DOM
+ * nodes. This interface defines that handler.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
@@ -34,8 +34,8 @@
public static final short NODE_IMPORTED = 2;
/**
* The node is deleted.
- * <p ><b>Note:</b> This may not be supported or may not be reliable in
- * certain environments, such as Java, where the implementation has no
+ * <p ><b>Note:</b> This may not be supported or may not be reliable in
+ * certain environments, such as Java, where the implementation has no
* real control over when objects are actually deleted.
*/
public static final short NODE_DELETED = 3;
@@ -49,24 +49,24 @@
public static final short NODE_ADOPTED = 5;
/**
- * This method is called whenever the node for which this handler is
+ * This method is called whenever the node for which this handler is
* registered is imported or cloned.
- * <br> DOM applications must not raise exceptions in a
- * <code>UserDataHandler</code>. The effect of throwing exceptions from
- * the handler is DOM implementation dependent.
- * @param operation Specifies the type of operation that is being
+ * <br> DOM applications must not raise exceptions in a
+ * <code>UserDataHandler</code>. The effect of throwing exceptions from
+ * the handler is DOM implementation dependent.
+ * @param operation Specifies the type of operation that is being
* performed on the node.
- * @param key Specifies the key for which this handler is being called.
- * @param data Specifies the data for which this handler is being called.
- * @param src Specifies the node being cloned, adopted, imported, or
+ * @param key Specifies the key for which this handler is being called.
+ * @param data Specifies the data for which this handler is being called.
+ * @param src Specifies the node being cloned, adopted, imported, or
* renamed. This is <code>null</code> when the node is being deleted.
- * @param dst Specifies the node newly created if any, or
+ * @param dst Specifies the node newly created if any, or
* <code>null</code>.
*/
- public void handle(short operation,
- String key,
- Object data,
- Node src,
+ public void handle(short operation,
+ String key,
+ Object data,
+ Node src,
Node dst);
}
diff --git a/luni/src/main/java/org/w3c/dom/ls/DOMImplementationLS.java b/luni/src/main/java/org/w3c/dom/ls/DOMImplementationLS.java
index c94fc8e..4d1b097 100644
--- a/luni/src/main/java/org/w3c/dom/ls/DOMImplementationLS.java
+++ b/luni/src/main/java/org/w3c/dom/ls/DOMImplementationLS.java
@@ -15,17 +15,17 @@
import org.w3c.dom.DOMException;
/**
- * <code>DOMImplementationLS</code> contains the factory methods for creating
- * Load and Save objects.
- * <p> The expectation is that an instance of the
- * <code>DOMImplementationLS</code> interface can be obtained by using
- * binding-specific casting methods on an instance of the
- * <code>DOMImplementation</code> interface or, if the <code>Document</code>
- * supports the feature <code>"Core"</code> version <code>"3.0"</code>
+ * <code>DOMImplementationLS</code> contains the factory methods for creating
+ * Load and Save objects.
+ * <p> The expectation is that an instance of the
+ * <code>DOMImplementationLS</code> interface can be obtained by using
+ * binding-specific casting methods on an instance of the
+ * <code>DOMImplementation</code> interface or, if the <code>Document</code>
+ * supports the feature <code>"Core"</code> version <code>"3.0"</code>
* defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , by using the method <code>DOMImplementation.getFeature</code> with
- * parameter values <code>"LS"</code> (or <code>"LS-Async"</code>) and
- * <code>"3.0"</code> (respectively).
+ * , by using the method <code>DOMImplementation.getFeature</code> with
+ * parameter values <code>"LS"</code> (or <code>"LS-Async"</code>) and
+ * <code>"3.0"</code> (respectively).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
@@ -41,81 +41,81 @@
public static final short MODE_ASYNCHRONOUS = 2;
/**
- * Create a new <code>LSParser</code>. The newly constructed parser may
- * then be configured by means of its <code>DOMConfiguration</code>
+ * Create a new <code>LSParser</code>. The newly constructed parser may
+ * then be configured by means of its <code>DOMConfiguration</code>
* object, and used to parse documents by means of its <code>parse</code>
- * method.
- * @param mode The <code>mode</code> argument is either
- * <code>MODE_SYNCHRONOUS</code> or <code>MODE_ASYNCHRONOUS</code>, if
- * <code>mode</code> is <code>MODE_SYNCHRONOUS</code> then the
- * <code>LSParser</code> that is created will operate in synchronous
- * mode, if it's <code>MODE_ASYNCHRONOUS</code> then the
- * <code>LSParser</code> that is created will operate in asynchronous
- * mode.
- * @param schemaType An absolute URI representing the type of the schema
- * language used during the load of a <code>Document</code> using the
- * newly created <code>LSParser</code>. Note that no lexical checking
- * is done on the absolute URI. In order to create a
- * <code>LSParser</code> for any kind of schema types (i.e. the
- * LSParser will be free to use any schema found), use the value
- * <code>null</code>.
+ * method.
+ * @param mode The <code>mode</code> argument is either
+ * <code>MODE_SYNCHRONOUS</code> or <code>MODE_ASYNCHRONOUS</code>, if
+ * <code>mode</code> is <code>MODE_SYNCHRONOUS</code> then the
+ * <code>LSParser</code> that is created will operate in synchronous
+ * mode, if it's <code>MODE_ASYNCHRONOUS</code> then the
+ * <code>LSParser</code> that is created will operate in asynchronous
+ * mode.
+ * @param schemaType An absolute URI representing the type of the schema
+ * language used during the load of a <code>Document</code> using the
+ * newly created <code>LSParser</code>. Note that no lexical checking
+ * is done on the absolute URI. In order to create a
+ * <code>LSParser</code> for any kind of schema types (i.e. the
+ * LSParser will be free to use any schema found), use the value
+ * <code>null</code>.
* <p ><b>Note:</b> For W3C XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * , applications must use the value
- * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
- * applications must use the value
- * <code>"http://www.w3.org/TR/REC-xml"</code>. Other Schema languages
- * are outside the scope of the W3C and therefore should recommend an
- * absolute URI in order to use this method.
- * @return The newly created <code>LSParser</code> object. This
- * <code>LSParser</code> is either synchronous or asynchronous
- * depending on the value of the <code>mode</code> argument.
- * <p ><b>Note:</b> By default, the newly created <code>LSParser</code>
- * does not contain a <code>DOMErrorHandler</code>, i.e. the value of
+ * , applications must use the value
+ * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>],
+ * applications must use the value
+ * <code>"http://www.w3.org/TR/REC-xml"</code>. Other Schema languages
+ * are outside the scope of the W3C and therefore should recommend an
+ * absolute URI in order to use this method.
+ * @return The newly created <code>LSParser</code> object. This
+ * <code>LSParser</code> is either synchronous or asynchronous
+ * depending on the value of the <code>mode</code> argument.
+ * <p ><b>Note:</b> By default, the newly created <code>LSParser</code>
+ * does not contain a <code>DOMErrorHandler</code>, i.e. the value of
* the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" configuration parameter is <code>null</code>. However, implementations
- * may provide a default error handler at creation time. In that case,
- * the initial value of the <code>"error-handler"</code> configuration
- * parameter on the new <code>LSParser</code> object contains a
- * reference to the default error handler.
+ * error-handler</a>" configuration parameter is <code>null</code>. However, implementations
+ * may provide a default error handler at creation time. In that case,
+ * the initial value of the <code>"error-handler"</code> configuration
+ * parameter on the new <code>LSParser</code> object contains a
+ * reference to the default error handler.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is
- * not supported.
+ * NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is
+ * not supported.
*/
- public LSParser createLSParser(short mode,
+ public LSParser createLSParser(short mode,
String schemaType)
throws DOMException;
/**
- * Create a new <code>LSSerializer</code> object.
+ * Create a new <code>LSSerializer</code> object.
* @return The newly created <code>LSSerializer</code> object.
- * <p ><b>Note:</b> By default, the newly created
- * <code>LSSerializer</code> has no <code>DOMErrorHandler</code>, i.e.
- * the value of the <code>"error-handler"</code> configuration
- * parameter is <code>null</code>. However, implementations may
- * provide a default error handler at creation time. In that case, the
- * initial value of the <code>"error-handler"</code> configuration
- * parameter on the new <code>LSSerializer</code> object contains a
- * reference to the default error handler.
+ * <p ><b>Note:</b> By default, the newly created
+ * <code>LSSerializer</code> has no <code>DOMErrorHandler</code>, i.e.
+ * the value of the <code>"error-handler"</code> configuration
+ * parameter is <code>null</code>. However, implementations may
+ * provide a default error handler at creation time. In that case, the
+ * initial value of the <code>"error-handler"</code> configuration
+ * parameter on the new <code>LSSerializer</code> object contains a
+ * reference to the default error handler.
*/
public LSSerializer createLSSerializer();
/**
- * Create a new empty input source object where
+ * Create a new empty input source object where
* <code>LSInput.characterStream</code>, <code>LSInput.byteStream</code>
- * , <code>LSInput.stringData</code> <code>LSInput.systemId</code>,
- * <code>LSInput.publicId</code>, <code>LSInput.baseURI</code>, and
- * <code>LSInput.encoding</code> are null, and
- * <code>LSInput.certifiedText</code> is false.
- * @return The newly created input object.
+ * , <code>LSInput.stringData</code> <code>LSInput.systemId</code>,
+ * <code>LSInput.publicId</code>, <code>LSInput.baseURI</code>, and
+ * <code>LSInput.encoding</code> are null, and
+ * <code>LSInput.certifiedText</code> is false.
+ * @return The newly created input object.
*/
public LSInput createLSInput();
/**
- * Create a new empty output destination object where
- * <code>LSOutput.characterStream</code>,
- * <code>LSOutput.byteStream</code>, <code>LSOutput.systemId</code>,
- * <code>LSOutput.encoding</code> are null.
- * @return The newly created output object.
+ * Create a new empty output destination object where
+ * <code>LSOutput.characterStream</code>,
+ * <code>LSOutput.byteStream</code>, <code>LSOutput.systemId</code>,
+ * <code>LSOutput.encoding</code> are null.
+ * @return The newly created output object.
*/
public LSOutput createLSOutput();
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSException.java b/luni/src/main/java/org/w3c/dom/ls/LSException.java
index 65a83f0..677ad38 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSException.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSException.java
@@ -13,16 +13,16 @@
package org.w3c.dom.ls;
/**
- * Parser or write operations may throw an <code>LSException</code> if the
- * processing is stopped. The processing can be stopped due to a
- * <code>DOMError</code> with a severity of
- * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered
- * <code>DOMError.SEVERITY_ERROR</code>, or if
- * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>.
- * <p ><b>Note:</b> As suggested in the definition of the constants in the
- * <code>DOMError</code> interface, a DOM implementation may choose to
- * continue after a fatal error, but the resulting DOM tree is then
- * implementation dependent.
+ * Parser or write operations may throw an <code>LSException</code> if the
+ * processing is stopped. The processing can be stopped due to a
+ * <code>DOMError</code> with a severity of
+ * <code>DOMError.SEVERITY_FATAL_ERROR</code> or a non recovered
+ * <code>DOMError.SEVERITY_ERROR</code>, or if
+ * <code>DOMErrorHandler.handleError()</code> returned <code>false</code>.
+ * <p ><b>Note:</b> As suggested in the definition of the constants in the
+ * <code>DOMError</code> interface, a DOM implementation may choose to
+ * continue after a fatal error, but the resulting DOM tree is then
+ * implementation dependent.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
@@ -34,13 +34,13 @@
public short code;
// LSExceptionCode
/**
- * If an attempt was made to load a document, or an XML Fragment, using
- * <code>LSParser</code> and the processing has been stopped.
+ * If an attempt was made to load a document, or an XML Fragment, using
+ * <code>LSParser</code> and the processing has been stopped.
*/
public static final short PARSE_ERR = 81;
/**
- * If an attempt was made to serialize a <code>Node</code> using
- * <code>LSSerializer</code> and the processing has been stopped.
+ * If an attempt was made to serialize a <code>Node</code> using
+ * <code>LSSerializer</code> and the processing has been stopped.
*/
public static final short SERIALIZE_ERR = 82;
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSInput.java b/luni/src/main/java/org/w3c/dom/ls/LSInput.java
index 862bf77..bba1792 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSInput.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSInput.java
@@ -13,205 +13,205 @@
package org.w3c.dom.ls;
/**
- * This interface represents an input source for data.
- * <p> This interface allows an application to encapsulate information about
- * an input source in a single object, which may include a public
- * identifier, a system identifier, a byte stream (possibly with a specified
- * encoding), a base URI, and/or a character stream.
- * <p> The exact definitions of a byte stream and a character stream are
- * binding dependent.
- * <p> The application is expected to provide objects that implement this
- * interface whenever such objects are needed. The application can either
- * provide its own objects that implement this interface, or it can use the
- * generic factory method <code>DOMImplementationLS.createLSInput()</code>
- * to create objects that implement this interface.
- * <p> The <code>LSParser</code> will use the <code>LSInput</code> object to
- * determine how to read data. The <code>LSParser</code> will look at the
- * different inputs specified in the <code>LSInput</code> in the following
- * order to know which one to read from, the first one that is not null and
- * not an empty string will be used:
+ * This interface represents an input source for data.
+ * <p> This interface allows an application to encapsulate information about
+ * an input source in a single object, which may include a public
+ * identifier, a system identifier, a byte stream (possibly with a specified
+ * encoding), a base URI, and/or a character stream.
+ * <p> The exact definitions of a byte stream and a character stream are
+ * binding dependent.
+ * <p> The application is expected to provide objects that implement this
+ * interface whenever such objects are needed. The application can either
+ * provide its own objects that implement this interface, or it can use the
+ * generic factory method <code>DOMImplementationLS.createLSInput()</code>
+ * to create objects that implement this interface.
+ * <p> The <code>LSParser</code> will use the <code>LSInput</code> object to
+ * determine how to read data. The <code>LSParser</code> will look at the
+ * different inputs specified in the <code>LSInput</code> in the following
+ * order to know which one to read from, the first one that is not null and
+ * not an empty string will be used:
* <ol>
- * <li> <code>LSInput.characterStream</code>
+ * <li> <code>LSInput.characterStream</code>
* </li>
- * <li>
- * <code>LSInput.byteStream</code>
+ * <li>
+ * <code>LSInput.byteStream</code>
* </li>
- * <li> <code>LSInput.stringData</code>
+ * <li> <code>LSInput.stringData</code>
* </li>
- * <li>
- * <code>LSInput.systemId</code>
+ * <li>
+ * <code>LSInput.systemId</code>
* </li>
- * <li> <code>LSInput.publicId</code>
+ * <li> <code>LSInput.publicId</code>
* </li>
- * </ol>
- * <p> If all inputs are null, the <code>LSParser</code> will report a
- * <code>DOMError</code> with its <code>DOMError.type</code> set to
- * <code>"no-input-specified"</code> and its <code>DOMError.severity</code>
- * set to <code>DOMError.SEVERITY_FATAL_ERROR</code>.
- * <p> <code>LSInput</code> objects belong to the application. The DOM
- * implementation will never modify them (though it may make copies and
- * modify the copies, if necessary).
+ * </ol>
+ * <p> If all inputs are null, the <code>LSParser</code> will report a
+ * <code>DOMError</code> with its <code>DOMError.type</code> set to
+ * <code>"no-input-specified"</code> and its <code>DOMError.severity</code>
+ * set to <code>DOMError.SEVERITY_FATAL_ERROR</code>.
+ * <p> <code>LSInput</code> objects belong to the application. The DOM
+ * implementation will never modify them (though it may make copies and
+ * modify the copies, if necessary).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSInput {
/**
- * An attribute of a language and binding dependent type that represents
- * a stream of 16-bit units. The application must encode the stream
- * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
- * using character streams. If an XML declaration is present, the value
- * of the encoding attribute will be ignored.
+ * An attribute of a language and binding dependent type that represents
+ * a stream of 16-bit units. The application must encode the stream
+ * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
+ * using character streams. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public java.io.Reader getCharacterStream();
/**
- * An attribute of a language and binding dependent type that represents
- * a stream of 16-bit units. The application must encode the stream
- * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
- * using character streams. If an XML declaration is present, the value
- * of the encoding attribute will be ignored.
+ * An attribute of a language and binding dependent type that represents
+ * a stream of 16-bit units. The application must encode the stream
+ * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when
+ * using character streams. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public void setCharacterStream(java.io.Reader characterStream);
/**
- * An attribute of a language and binding dependent type that represents
- * a stream of bytes.
- * <br> If the application knows the character encoding of the byte
- * stream, it should set the encoding attribute. Setting the encoding in
- * this way will override any encoding specified in an XML declaration
- * in the data.
+ * An attribute of a language and binding dependent type that represents
+ * a stream of bytes.
+ * <br> If the application knows the character encoding of the byte
+ * stream, it should set the encoding attribute. Setting the encoding in
+ * this way will override any encoding specified in an XML declaration
+ * in the data.
*/
public java.io.InputStream getByteStream();
/**
- * An attribute of a language and binding dependent type that represents
- * a stream of bytes.
- * <br> If the application knows the character encoding of the byte
- * stream, it should set the encoding attribute. Setting the encoding in
- * this way will override any encoding specified in an XML declaration
- * in the data.
+ * An attribute of a language and binding dependent type that represents
+ * a stream of bytes.
+ * <br> If the application knows the character encoding of the byte
+ * stream, it should set the encoding attribute. Setting the encoding in
+ * this way will override any encoding specified in an XML declaration
+ * in the data.
*/
public void setByteStream(java.io.InputStream byteStream);
/**
- * String data to parse. If provided, this will always be treated as a
- * sequence of 16-bit units (UTF-16 encoded characters). It is not a
- * requirement to have an XML declaration when using
- * <code>stringData</code>. If an XML declaration is present, the value
- * of the encoding attribute will be ignored.
+ * String data to parse. If provided, this will always be treated as a
+ * sequence of 16-bit units (UTF-16 encoded characters). It is not a
+ * requirement to have an XML declaration when using
+ * <code>stringData</code>. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public String getStringData();
/**
- * String data to parse. If provided, this will always be treated as a
- * sequence of 16-bit units (UTF-16 encoded characters). It is not a
- * requirement to have an XML declaration when using
- * <code>stringData</code>. If an XML declaration is present, the value
- * of the encoding attribute will be ignored.
+ * String data to parse. If provided, this will always be treated as a
+ * sequence of 16-bit units (UTF-16 encoded characters). It is not a
+ * requirement to have an XML declaration when using
+ * <code>stringData</code>. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public void setStringData(String stringData);
/**
- * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
- * input source. The system identifier is optional if there is a byte
- * stream, a character stream, or string data. It is still useful to
- * provide one, since the application will use it to resolve any
- * relative URIs and can include it in error messages and warnings. (The
- * LSParser will only attempt to fetch the resource identified by the
- * URI reference if there is no other input available in the input
- * source.)
- * <br> If the application knows the character encoding of the object
- * pointed to by the system identifier, it can set the encoding using
- * the <code>encoding</code> attribute.
- * <br> If the specified system ID is a relative URI reference (see
- * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM
- * implementation will attempt to resolve the relative URI with the
- * <code>baseURI</code> as the base, if that fails, the behavior is
- * implementation dependent.
+ * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
+ * input source. The system identifier is optional if there is a byte
+ * stream, a character stream, or string data. It is still useful to
+ * provide one, since the application will use it to resolve any
+ * relative URIs and can include it in error messages and warnings. (The
+ * LSParser will only attempt to fetch the resource identified by the
+ * URI reference if there is no other input available in the input
+ * source.)
+ * <br> If the application knows the character encoding of the object
+ * pointed to by the system identifier, it can set the encoding using
+ * the <code>encoding</code> attribute.
+ * <br> If the specified system ID is a relative URI reference (see
+ * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM
+ * implementation will attempt to resolve the relative URI with the
+ * <code>baseURI</code> as the base, if that fails, the behavior is
+ * implementation dependent.
*/
public String getSystemId();
/**
- * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
- * input source. The system identifier is optional if there is a byte
- * stream, a character stream, or string data. It is still useful to
- * provide one, since the application will use it to resolve any
- * relative URIs and can include it in error messages and warnings. (The
- * LSParser will only attempt to fetch the resource identified by the
- * URI reference if there is no other input available in the input
- * source.)
- * <br> If the application knows the character encoding of the object
- * pointed to by the system identifier, it can set the encoding using
- * the <code>encoding</code> attribute.
- * <br> If the specified system ID is a relative URI reference (see
- * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM
- * implementation will attempt to resolve the relative URI with the
- * <code>baseURI</code> as the base, if that fails, the behavior is
- * implementation dependent.
+ * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
+ * input source. The system identifier is optional if there is a byte
+ * stream, a character stream, or string data. It is still useful to
+ * provide one, since the application will use it to resolve any
+ * relative URIs and can include it in error messages and warnings. (The
+ * LSParser will only attempt to fetch the resource identified by the
+ * URI reference if there is no other input available in the input
+ * source.)
+ * <br> If the application knows the character encoding of the object
+ * pointed to by the system identifier, it can set the encoding using
+ * the <code>encoding</code> attribute.
+ * <br> If the specified system ID is a relative URI reference (see
+ * section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the DOM
+ * implementation will attempt to resolve the relative URI with the
+ * <code>baseURI</code> as the base, if that fails, the behavior is
+ * implementation dependent.
*/
public void setSystemId(String systemId);
/**
- * The public identifier for this input source. This may be mapped to an
- * input source using an implementation dependent mechanism (such as
- * catalogues or other mappings). The public identifier, if specified,
- * may also be reported as part of the location information when errors
- * are reported.
+ * The public identifier for this input source. This may be mapped to an
+ * input source using an implementation dependent mechanism (such as
+ * catalogues or other mappings). The public identifier, if specified,
+ * may also be reported as part of the location information when errors
+ * are reported.
*/
public String getPublicId();
/**
- * The public identifier for this input source. This may be mapped to an
- * input source using an implementation dependent mechanism (such as
- * catalogues or other mappings). The public identifier, if specified,
- * may also be reported as part of the location information when errors
- * are reported.
+ * The public identifier for this input source. This may be mapped to an
+ * input source using an implementation dependent mechanism (such as
+ * catalogues or other mappings). The public identifier, if specified,
+ * may also be reported as part of the location information when errors
+ * are reported.
*/
public void setPublicId(String publicId);
/**
- * The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for
- * resolving a relative <code>systemId</code> to an absolute URI.
- * <br> If, when used, the base URI is itself a relative URI, an empty
- * string, or null, the behavior is implementation dependent.
+ * The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for
+ * resolving a relative <code>systemId</code> to an absolute URI.
+ * <br> If, when used, the base URI is itself a relative URI, an empty
+ * string, or null, the behavior is implementation dependent.
*/
public String getBaseURI();
/**
- * The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for
- * resolving a relative <code>systemId</code> to an absolute URI.
- * <br> If, when used, the base URI is itself a relative URI, an empty
- * string, or null, the behavior is implementation dependent.
+ * The base URI to be used (see section 5.1.4 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]) for
+ * resolving a relative <code>systemId</code> to an absolute URI.
+ * <br> If, when used, the base URI is itself a relative URI, an empty
+ * string, or null, the behavior is implementation dependent.
*/
public void setBaseURI(String baseURI);
/**
- * The character encoding, if known. The encoding must be a string
- * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
- * 4.3.3 "Character Encoding in Entities").
- * <br> This attribute has no effect when the application provides a
- * character stream or string data. For other sources of input, an
- * encoding specified by means of this attribute will override any
- * encoding specified in the XML declaration or the Text declaration, or
- * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>].
+ * The character encoding, if known. The encoding must be a string
+ * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * 4.3.3 "Character Encoding in Entities").
+ * <br> This attribute has no effect when the application provides a
+ * character stream or string data. For other sources of input, an
+ * encoding specified by means of this attribute will override any
+ * encoding specified in the XML declaration or the Text declaration, or
+ * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>].
*/
public String getEncoding();
/**
- * The character encoding, if known. The encoding must be a string
- * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
- * 4.3.3 "Character Encoding in Entities").
- * <br> This attribute has no effect when the application provides a
- * character stream or string data. For other sources of input, an
- * encoding specified by means of this attribute will override any
- * encoding specified in the XML declaration or the Text declaration, or
- * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>].
+ * The character encoding, if known. The encoding must be a string
+ * acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * 4.3.3 "Character Encoding in Entities").
+ * <br> This attribute has no effect when the application provides a
+ * character stream or string data. For other sources of input, an
+ * encoding specified by means of this attribute will override any
+ * encoding specified in the XML declaration or the Text declaration, or
+ * an encoding obtained from a higher level protocol, such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>].
*/
public void setEncoding(String encoding);
/**
- * If set to true, assume that the input is certified (see section 2.13
- * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when
- * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>].
+ * If set to true, assume that the input is certified (see section 2.13
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when
+ * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>].
*/
public boolean getCertifiedText();
/**
- * If set to true, assume that the input is certified (see section 2.13
- * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when
- * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>].
+ * If set to true, assume that the input is certified (see section 2.13
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>]) when
+ * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>].
*/
public void setCertifiedText(boolean certifiedText);
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSOutput.java b/luni/src/main/java/org/w3c/dom/ls/LSOutput.java
index 2f8675c..789b95a 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSOutput.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSOutput.java
@@ -13,93 +13,93 @@
package org.w3c.dom.ls;
/**
- * This interface represents an output destination for data.
- * <p> This interface allows an application to encapsulate information about
- * an output destination in a single object, which may include a URI, a byte
- * stream (possibly with a specified encoding), a base URI, and/or a
- * character stream.
- * <p> The exact definitions of a byte stream and a character stream are
- * binding dependent.
- * <p> The application is expected to provide objects that implement this
- * interface whenever such objects are needed. The application can either
- * provide its own objects that implement this interface, or it can use the
- * generic factory method <code>DOMImplementationLS.createLSOutput()</code>
- * to create objects that implement this interface.
- * <p> The <code>LSSerializer</code> will use the <code>LSOutput</code> object
- * to determine where to serialize the output to. The
- * <code>LSSerializer</code> will look at the different outputs specified in
- * the <code>LSOutput</code> in the following order to know which one to
- * output to, the first one that is not null and not an empty string will be
- * used:
+ * This interface represents an output destination for data.
+ * <p> This interface allows an application to encapsulate information about
+ * an output destination in a single object, which may include a URI, a byte
+ * stream (possibly with a specified encoding), a base URI, and/or a
+ * character stream.
+ * <p> The exact definitions of a byte stream and a character stream are
+ * binding dependent.
+ * <p> The application is expected to provide objects that implement this
+ * interface whenever such objects are needed. The application can either
+ * provide its own objects that implement this interface, or it can use the
+ * generic factory method <code>DOMImplementationLS.createLSOutput()</code>
+ * to create objects that implement this interface.
+ * <p> The <code>LSSerializer</code> will use the <code>LSOutput</code> object
+ * to determine where to serialize the output to. The
+ * <code>LSSerializer</code> will look at the different outputs specified in
+ * the <code>LSOutput</code> in the following order to know which one to
+ * output to, the first one that is not null and not an empty string will be
+ * used:
* <ol>
- * <li> <code>LSOutput.characterStream</code>
+ * <li> <code>LSOutput.characterStream</code>
* </li>
- * <li>
- * <code>LSOutput.byteStream</code>
+ * <li>
+ * <code>LSOutput.byteStream</code>
* </li>
- * <li> <code>LSOutput.systemId</code>
+ * <li> <code>LSOutput.systemId</code>
* </li>
- * </ol>
- * <p> <code>LSOutput</code> objects belong to the application. The DOM
- * implementation will never modify them (though it may make copies and
- * modify the copies, if necessary).
+ * </ol>
+ * <p> <code>LSOutput</code> objects belong to the application. The DOM
+ * implementation will never modify them (though it may make copies and
+ * modify the copies, if necessary).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSOutput {
/**
- * An attribute of a language and binding dependent type that represents
- * a writable stream to which 16-bit units can be output.
+ * An attribute of a language and binding dependent type that represents
+ * a writable stream to which 16-bit units can be output.
*/
public java.io.Writer getCharacterStream();
/**
- * An attribute of a language and binding dependent type that represents
- * a writable stream to which 16-bit units can be output.
+ * An attribute of a language and binding dependent type that represents
+ * a writable stream to which 16-bit units can be output.
*/
public void setCharacterStream(java.io.Writer characterStream);
/**
- * An attribute of a language and binding dependent type that represents
- * a writable stream of bytes.
+ * An attribute of a language and binding dependent type that represents
+ * a writable stream of bytes.
*/
public java.io.OutputStream getByteStream();
/**
- * An attribute of a language and binding dependent type that represents
- * a writable stream of bytes.
+ * An attribute of a language and binding dependent type that represents
+ * a writable stream of bytes.
*/
public void setByteStream(java.io.OutputStream byteStream);
/**
- * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
- * output destination.
- * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
- * behavior is implementation dependent.
+ * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
+ * output destination.
+ * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
+ * behavior is implementation dependent.
*/
public String getSystemId();
/**
- * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
- * output destination.
- * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
- * behavior is implementation dependent.
+ * The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
+ * output destination.
+ * <br> If the system ID is a relative URI reference (see section 5 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
+ * behavior is implementation dependent.
*/
public void setSystemId(String systemId);
/**
- * The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
- * 4.3.3 "Character Encoding in Entities"), it is recommended that
- * character encodings registered (as charsets) with the Internet
+ * The character encoding to use for the output. The encoding must be a
+ * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * 4.3.3 "Character Encoding in Entities"), it is recommended that
+ * character encodings registered (as charsets) with the Internet
* Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
- * should be referred to using their registered names.
+ * should be referred to using their registered names.
*/
public String getEncoding();
/**
- * The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
- * 4.3.3 "Character Encoding in Entities"), it is recommended that
- * character encodings registered (as charsets) with the Internet
+ * The character encoding to use for the output. The encoding must be a
+ * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * 4.3.3 "Character Encoding in Entities"), it is recommended that
+ * character encodings registered (as charsets) with the Internet
* Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
- * should be referred to using their registered names.
+ * should be referred to using their registered names.
*/
public void setEncoding(String encoding);
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSParser.java b/luni/src/main/java/org/w3c/dom/ls/LSParser.java
index ee918e0..41781fa 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSParser.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSParser.java
@@ -18,156 +18,156 @@
import org.w3c.dom.DOMException;
/**
- * An interface to an object that is able to build, or augment, a DOM tree
- * from various input sources.
- * <p> <code>LSParser</code> provides an API for parsing XML and building the
- * corresponding DOM document structure. A <code>LSParser</code> instance
- * can be obtained by invoking the
- * <code>DOMImplementationLS.createLSParser()</code> method.
+ * An interface to an object that is able to build, or augment, a DOM tree
+ * from various input sources.
+ * <p> <code>LSParser</code> provides an API for parsing XML and building the
+ * corresponding DOM document structure. A <code>LSParser</code> instance
+ * can be obtained by invoking the
+ * <code>DOMImplementationLS.createLSParser()</code> method.
* <p> As specified in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , when a document is first made available via the LSParser:
+ * , when a document is first made available via the LSParser:
* <ul>
- * <li> there will
- * never be two adjacent nodes of type NODE_TEXT, and there will never be
- * empty text nodes.
+ * <li> there will
+ * never be two adjacent nodes of type NODE_TEXT, and there will never be
+ * empty text nodes.
* </li>
- * <li> it is expected that the <code>value</code> and
- * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
- * return the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#AVNormalize'>XML 1.0
+ * <li> it is expected that the <code>value</code> and
+ * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
+ * return the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#AVNormalize'>XML 1.0
* normalized value</a>. However, if the parameters "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate-if-schema'>
* validate-if-schema</a>" and "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
- * datatype-normalization</a>" are set to <code>true</code>, depending on the attribute normalization
- * used, the attribute values may differ from the ones obtained by the XML
+ * datatype-normalization</a>" are set to <code>true</code>, depending on the attribute normalization
+ * used, the attribute values may differ from the ones obtained by the XML
* 1.0 attribute normalization. If the parameters "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
- * datatype-normalization</a>" is set to <code>false</code>, the XML 1.0 attribute normalization is
- * guaranteed to occur, and if the attributes list does not contain
- * namespace declarations, the <code>attributes</code> attribute on
+ * datatype-normalization</a>" is set to <code>false</code>, the XML 1.0 attribute normalization is
+ * guaranteed to occur, and if the attributes list does not contain
+ * namespace declarations, the <code>attributes</code> attribute on
* <code>Element</code> node represents the property <b>[attributes]</b> defined in [<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
- * .
+ * .
* </li>
* </ul>
- * <p> Asynchronous <code>LSParser</code> objects are expected to also
- * implement the <code>events::EventTarget</code> interface so that event
- * listeners can be registered on asynchronous <code>LSParser</code>
- * objects.
- * <p> Events supported by asynchronous <code>LSParser</code> objects are:
+ * <p> Asynchronous <code>LSParser</code> objects are expected to also
+ * implement the <code>events::EventTarget</code> interface so that event
+ * listeners can be registered on asynchronous <code>LSParser</code>
+ * objects.
+ * <p> Events supported by asynchronous <code>LSParser</code> objects are:
* <dl>
* <dt>load</dt>
* <dd>
- * The <code>LSParser</code> finishes to load the document. See also the
+ * The <code>LSParser</code> finishes to load the document. See also the
* definition of the <code>LSLoadEvent</code> interface. </dd>
* <dt>progress</dt>
- * <dd> The
- * <code>LSParser</code> signals progress as data is parsed. This
- * specification does not attempt to define exactly when progress events
- * should be dispatched. That is intentionally left as
- * implementation-dependent. Here is one example of how an application might
- * dispatch progress events: Once the parser starts receiving data, a
- * progress event is dispatched to indicate that the parsing starts. From
- * there on, a progress event is dispatched for every 4096 bytes of data
- * that is received and processed. This is only one example, though, and
- * implementations can choose to dispatch progress events at any time while
- * parsing, or not dispatch them at all. See also the definition of the
+ * <dd> The
+ * <code>LSParser</code> signals progress as data is parsed. This
+ * specification does not attempt to define exactly when progress events
+ * should be dispatched. That is intentionally left as
+ * implementation-dependent. Here is one example of how an application might
+ * dispatch progress events: Once the parser starts receiving data, a
+ * progress event is dispatched to indicate that the parsing starts. From
+ * there on, a progress event is dispatched for every 4096 bytes of data
+ * that is received and processed. This is only one example, though, and
+ * implementations can choose to dispatch progress events at any time while
+ * parsing, or not dispatch them at all. See also the definition of the
* <code>LSProgressEvent</code> interface. </dd>
* </dl>
- * <p ><b>Note:</b> All events defined in this specification use the
- * namespace URI <code>"http://www.w3.org/2002/DOMLS"</code>.
- * <p> While parsing an input source, errors are reported to the application
+ * <p ><b>Note:</b> All events defined in this specification use the
+ * namespace URI <code>"http://www.w3.org/2002/DOMLS"</code>.
+ * <p> While parsing an input source, errors are reported to the application
* through the error handler (<code>LSParser.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter). This specification does in no way try to define all possible
- * errors that can occur while parsing XML, or any other markup, but some
- * common error cases are defined. The types (<code>DOMError.type</code>) of
- * errors and warnings defined by this specification are:
+ * error-handler</a>" parameter). This specification does in no way try to define all possible
+ * errors that can occur while parsing XML, or any other markup, but some
+ * common error cases are defined. The types (<code>DOMError.type</code>) of
+ * errors and warnings defined by this specification are:
* <dl>
- * <dt>
+ * <dt>
* <code>"check-character-normalization-failure" [error]</code> </dt>
- * <dd> Raised if
+ * <dd> Raised if
* the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-check-character-normalization'>
- * check-character-normalization</a>" is set to true and a string is encountered that fails normalization
+ * check-character-normalization</a>" is set to true and a string is encountered that fails normalization
* checking. </dd>
* <dt><code>"doctype-not-allowed" [fatal]</code></dt>
- * <dd> Raised if the
- * configuration parameter "disallow-doctype" is set to <code>true</code>
+ * <dd> Raised if the
+ * configuration parameter "disallow-doctype" is set to <code>true</code>
* and a doctype is encountered. </dd>
* <dt><code>"no-input-specified" [fatal]</code></dt>
- * <dd>
- * Raised when loading a document and no input is specified in the
+ * <dd>
+ * Raised when loading a document and no input is specified in the
* <code>LSInput</code> object. </dd>
* <dt>
* <code>"pi-base-uri-not-preserved" [warning]</code></dt>
- * <dd> Raised if a processing
- * instruction is encountered in a location where the base URI of the
- * processing instruction can not be preserved. One example of a case where
+ * <dd> Raised if a processing
+ * instruction is encountered in a location where the base URI of the
+ * processing instruction can not be preserved. One example of a case where
* this warning will be raised is if the configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>false</code> and the following XML file is parsed:
+ * entities</a>" is set to <code>false</code> and the following XML file is parsed:
* <pre>
- * <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]>
+ * <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]>
* <root> &e; </root></pre>
- * And <code>subdir/myentity.ent</code>
- * contains:
- * <pre><one> <two/> </one> <?pi 3.14159?>
+ * And <code>subdir/myentity.ent</code>
+ * contains:
+ * <pre><one> <two/> </one> <?pi 3.14159?>
* <more/></pre>
* </dd>
* <dt><code>"unbound-prefix-in-entity" [warning]</code></dt>
- * <dd> An
- * implementation dependent warning that may be raised if the configuration
+ * <dd> An
+ * implementation dependent warning that may be raised if the configuration
* parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
- * namespaces</a>" is set to <code>true</code> and an unbound namespace prefix is
- * encountered in an entity's replacement text. Raising this warning is not
- * enforced since some existing parsers may not recognize unbound namespace
+ * namespaces</a>" is set to <code>true</code> and an unbound namespace prefix is
+ * encountered in an entity's replacement text. Raising this warning is not
+ * enforced since some existing parsers may not recognize unbound namespace
* prefixes in the replacement text of entities. </dd>
* <dt>
* <code>"unknown-character-denormalization" [fatal]</code></dt>
- * <dd> Raised if the
- * configuration parameter "ignore-unknown-character-denormalizations" is
- * set to <code>false</code> and a character is encountered for which the
+ * <dd> Raised if the
+ * configuration parameter "ignore-unknown-character-denormalizations" is
+ * set to <code>false</code> and a character is encountered for which the
* processor cannot determine the normalization properties. </dd>
* <dt>
* <code>"unsupported-encoding" [fatal]</code></dt>
- * <dd> Raised if an unsupported
+ * <dd> Raised if an unsupported
* encoding is encountered. </dd>
* <dt><code>"unsupported-media-type" [fatal]</code></dt>
- * <dd>
- * Raised if the configuration parameter "supported-media-types-only" is set
+ * <dd>
+ * Raised if the configuration parameter "supported-media-types-only" is set
* to <code>true</code> and an unsupported media type is encountered. </dd>
- * </dl>
- * <p> In addition to raising the defined errors and warnings, implementations
- * are expected to raise implementation specific errors and warnings for any
- * other error and warning cases such as IO errors (file not found,
- * permission denied,...), XML well-formedness errors, and so on.
+ * </dl>
+ * <p> In addition to raising the defined errors and warnings, implementations
+ * are expected to raise implementation specific errors and warnings for any
+ * other error and warning cases such as IO errors (file not found,
+ * permission denied,...), XML well-formedness errors, and so on.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSParser {
/**
- * The <code>DOMConfiguration</code> object used when parsing an input
- * source. This <code>DOMConfiguration</code> is specific to the parse
+ * The <code>DOMConfiguration</code> object used when parsing an input
+ * source. This <code>DOMConfiguration</code> is specific to the parse
* operation. No parameter values from this <code>DOMConfiguration</code>
- * object are passed automatically to the <code>DOMConfiguration</code>
- * object on the <code>Document</code> that is created, or used, by the
- * parse operation. The DOM application is responsible for passing any
- * needed parameter values from this <code>DOMConfiguration</code>
- * object to the <code>DOMConfiguration</code> object referenced by the
- * <code>Document</code> object.
+ * object are passed automatically to the <code>DOMConfiguration</code>
+ * object on the <code>Document</code> that is created, or used, by the
+ * parse operation. The DOM application is responsible for passing any
+ * needed parameter values from this <code>DOMConfiguration</code>
+ * object to the <code>DOMConfiguration</code> object referenced by the
+ * <code>Document</code> object.
* <br> In addition to the parameters recognized in on the <a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
* DOMConfiguration</a> interface defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , the <code>DOMConfiguration</code> objects for <code>LSParser</code>
- * add or modify the following parameters:
+ * , the <code>DOMConfiguration</code> objects for <code>LSParser</code>
+ * add or modify the following parameters:
* <dl>
* <dt>
* <code>"charset-overrides-xml-encoding"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] (<em>default</em>) If a higher level protocol such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] provides an
- * indication of the character encoding of the input stream being
- * processed, that will override any encoding specified in the XML
- * declaration or the Text declaration (see also section 4.3.3,
- * "Character Encoding in Entities", in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]).
- * Explicitly setting an encoding in the <code>LSInput</code> overrides
+ * <dd>[<em>optional</em>] (<em>default</em>) If a higher level protocol such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] provides an
+ * indication of the character encoding of the input stream being
+ * processed, that will override any encoding specified in the XML
+ * declaration or the Text declaration (see also section 4.3.3,
+ * "Character Encoding in Entities", in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]).
+ * Explicitly setting an encoding in the <code>LSInput</code> overrides
* any encoding from the protocol. </dd>
* <dt><code>false</code></dt>
- * <dd>[<em>required</em>] The parser ignores any character set encoding information from
+ * <dd>[<em>required</em>] The parser ignores any character set encoding information from
* higher-level protocols. </dd>
* </dl></dd>
* <dt><code>"disallow-doctype"</code></dt>
@@ -175,8 +175,8 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>optional</em>] Throw a fatal <b>"doctype-not-allowed"</b> error if a doctype node is found while parsing the document. This is
- * useful when dealing with things like SOAP envelopes where doctype
+ * <dd>[<em>optional</em>] Throw a fatal <b>"doctype-not-allowed"</b> error if a doctype node is found while parsing the document. This is
+ * useful when dealing with things like SOAP envelopes where doctype
* nodes are not allowed. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Allow doctype nodes in the document. </dd>
@@ -187,21 +187,21 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is
- * supported, a processor encounters characters for which it cannot
- * determine the normalization properties, then the processor will
- * ignore any possible denormalizations caused by these characters.
+ * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is
+ * supported, a processor encounters characters for which it cannot
+ * determine the normalization properties, then the processor will
+ * ignore any possible denormalizations caused by these characters.
* This parameter is ignored for [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. </dd>
* <dt>
* <code>false</code></dt>
- * <dd>[<em>optional</em>] Report an fatal <b>"unknown-character-denormalization"</b> error if a character is encountered for which the processor cannot
+ * <dd>[<em>optional</em>] Report an fatal <b>"unknown-character-denormalization"</b> error if a character is encountered for which the processor cannot
* determine the normalization properties. </dd>
* </dl></dd>
* <dt><code>"infoset"</code></dt>
- * <dd> See
- * the definition of <code>DOMConfiguration</code> for a description of
+ * <dd> See
+ * the definition of <code>DOMConfiguration</code> for a description of
* this parameter. Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , this parameter will default to <code>true</code> for
+ * , this parameter will default to <code>true</code> for
* <code>LSParser</code>. </dd>
* <dt><code>"namespaces"</code></dt>
* <dd>
@@ -215,41 +215,41 @@
* </dl></dd>
* <dt>
* <code>"resource-resolver"</code></dt>
- * <dd>[<em>required</em>] A reference to a <code>LSResourceResolver</code> object, or null. If
- * the value of this parameter is not null when an external resource
- * (such as an external XML entity or an XML schema location) is
- * encountered, the implementation will request that the
- * <code>LSResourceResolver</code> referenced in this parameter resolves
+ * <dd>[<em>required</em>] A reference to a <code>LSResourceResolver</code> object, or null. If
+ * the value of this parameter is not null when an external resource
+ * (such as an external XML entity or an XML schema location) is
+ * encountered, the implementation will request that the
+ * <code>LSResourceResolver</code> referenced in this parameter resolves
* the resource. </dd>
* <dt><code>"supported-media-types-only"</code></dt>
* <dd>
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>optional</em>] Check that the media type of the parsed resource is a supported media
- * type. If an unsupported media type is encountered, a fatal error of
- * type <b>"unsupported-media-type"</b> will be raised. The media types defined in [<a href='http://www.ietf.org/rfc/rfc3023.txt'>IETF RFC 3023</a>] must always
+ * <dd>[<em>optional</em>] Check that the media type of the parsed resource is a supported media
+ * type. If an unsupported media type is encountered, a fatal error of
+ * type <b>"unsupported-media-type"</b> will be raised. The media types defined in [<a href='http://www.ietf.org/rfc/rfc3023.txt'>IETF RFC 3023</a>] must always
* be accepted. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Accept any media type. </dd>
* </dl></dd>
* <dt><code>"validate"</code></dt>
- * <dd> See the definition of
- * <code>DOMConfiguration</code> for a description of this parameter.
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
* Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , the processing of the internal subset is always accomplished, even
+ * , the processing of the internal subset is always accomplished, even
* if this parameter is set to <code>false</code>. </dd>
* <dt>
* <code>"validate-if-schema"</code></dt>
- * <dd> See the definition of
- * <code>DOMConfiguration</code> for a description of this parameter.
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
* Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , the processing of the internal subset is always accomplished, even
+ * , the processing of the internal subset is always accomplished, even
* if this parameter is set to <code>false</code>. </dd>
* <dt>
* <code>"well-formed"</code></dt>
- * <dd> See the definition of
- * <code>DOMConfiguration</code> for a description of this parameter.
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
* Unlike in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , this parameter cannot be set to <code>false</code>. </dd>
* </dl>
@@ -257,209 +257,209 @@
public DOMConfiguration getDomConfig();
/**
- * When a filter is provided, the implementation will call out to the
- * filter as it is constructing the DOM tree structure. The filter can
- * choose to remove elements from the document being constructed, or to
- * terminate the parsing early.
- * <br> The filter is invoked after the operations requested by the
- * <code>DOMConfiguration</code> parameters have been applied. For
+ * When a filter is provided, the implementation will call out to the
+ * filter as it is constructing the DOM tree structure. The filter can
+ * choose to remove elements from the document being constructed, or to
+ * terminate the parsing early.
+ * <br> The filter is invoked after the operations requested by the
+ * <code>DOMConfiguration</code> parameters have been applied. For
* example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
- * validate</a>" is set to <code>true</code>, the validation is done before invoking the
- * filter.
+ * validate</a>" is set to <code>true</code>, the validation is done before invoking the
+ * filter.
*/
public LSParserFilter getFilter();
/**
- * When a filter is provided, the implementation will call out to the
- * filter as it is constructing the DOM tree structure. The filter can
- * choose to remove elements from the document being constructed, or to
- * terminate the parsing early.
- * <br> The filter is invoked after the operations requested by the
- * <code>DOMConfiguration</code> parameters have been applied. For
+ * When a filter is provided, the implementation will call out to the
+ * filter as it is constructing the DOM tree structure. The filter can
+ * choose to remove elements from the document being constructed, or to
+ * terminate the parsing early.
+ * <br> The filter is invoked after the operations requested by the
+ * <code>DOMConfiguration</code> parameters have been applied. For
* example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
- * validate</a>" is set to <code>true</code>, the validation is done before invoking the
- * filter.
+ * validate</a>" is set to <code>true</code>, the validation is done before invoking the
+ * filter.
*/
public void setFilter(LSParserFilter filter);
/**
- * <code>true</code> if the <code>LSParser</code> is asynchronous,
- * <code>false</code> if it is synchronous.
+ * <code>true</code> if the <code>LSParser</code> is asynchronous,
+ * <code>false</code> if it is synchronous.
*/
public boolean getAsync();
/**
- * <code>true</code> if the <code>LSParser</code> is currently busy
- * loading a document, otherwise <code>false</code>.
+ * <code>true</code> if the <code>LSParser</code> is currently busy
+ * loading a document, otherwise <code>false</code>.
*/
public boolean getBusy();
/**
- * Parse an XML document from a resource identified by a
+ * Parse an XML document from a resource identified by a
* <code>LSInput</code>.
- * @param input The <code>LSInput</code> from which the source of the
- * document is to be read.
- * @return If the <code>LSParser</code> is a synchronous
- * <code>LSParser</code>, the newly created and populated
- * <code>Document</code> is returned. If the <code>LSParser</code> is
- * asynchronous, <code>null</code> is returned since the document
- * object may not yet be constructed when this method returns.
+ * @param input The <code>LSInput</code> from which the source of the
+ * document is to be read.
+ * @return If the <code>LSParser</code> is a synchronous
+ * <code>LSParser</code>, the newly created and populated
+ * <code>Document</code> is returned. If the <code>LSParser</code> is
+ * asynchronous, <code>null</code> is returned since the document
+ * object may not yet be constructed when this method returns.
* @exception DOMException
- * INVALID_STATE_ERR: Raised if the <code>LSParser</code>'s
- * <code>LSParser.busy</code> attribute is <code>true</code>.
+ * INVALID_STATE_ERR: Raised if the <code>LSParser</code>'s
+ * <code>LSParser.busy</code> attribute is <code>true</code>.
* @exception LSException
- * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
- * the XML document. DOM applications should attach a
+ * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
+ * the XML document. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
public Document parse(LSInput input)
throws DOMException, LSException;
/**
- * Parse an XML document from a location identified by a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. If the URI
- * contains a fragment identifier (see section 4.1 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
- * behavior is not defined by this specification, future versions of
- * this specification may define the behavior.
+ * Parse an XML document from a location identified by a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. If the URI
+ * contains a fragment identifier (see section 4.1 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
+ * behavior is not defined by this specification, future versions of
+ * this specification may define the behavior.
* @param uri The location of the XML document to be read.
- * @return If the <code>LSParser</code> is a synchronous
- * <code>LSParser</code>, the newly created and populated
- * <code>Document</code> is returned, or <code>null</code> if an error
- * occured. If the <code>LSParser</code> is asynchronous,
- * <code>null</code> is returned since the document object may not yet
- * be constructed when this method returns.
+ * @return If the <code>LSParser</code> is a synchronous
+ * <code>LSParser</code>, the newly created and populated
+ * <code>Document</code> is returned, or <code>null</code> if an error
+ * occured. If the <code>LSParser</code> is asynchronous,
+ * <code>null</code> is returned since the document object may not yet
+ * be constructed when this method returns.
* @exception DOMException
- * INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code>
- * attribute is <code>true</code>.
+ * INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code>
+ * attribute is <code>true</code>.
* @exception LSException
- * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
- * the XML document. DOM applications should attach a
+ * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
+ * the XML document. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
public Document parseURI(String uri)
throws DOMException, LSException;
// ACTION_TYPES
/**
- * Append the result of the parse operation as children of the context
- * node. For this action to work, the context node must be an
- * <code>Element</code> or a <code>DocumentFragment</code>.
+ * Append the result of the parse operation as children of the context
+ * node. For this action to work, the context node must be an
+ * <code>Element</code> or a <code>DocumentFragment</code>.
*/
public static final short ACTION_APPEND_AS_CHILDREN = 1;
/**
- * Replace all the children of the context node with the result of the
- * parse operation. For this action to work, the context node must be an
- * <code>Element</code>, a <code>Document</code>, or a
- * <code>DocumentFragment</code>.
+ * Replace all the children of the context node with the result of the
+ * parse operation. For this action to work, the context node must be an
+ * <code>Element</code>, a <code>Document</code>, or a
+ * <code>DocumentFragment</code>.
*/
public static final short ACTION_REPLACE_CHILDREN = 2;
/**
- * Insert the result of the parse operation as the immediately preceding
- * sibling of the context node. For this action to work the context
- * node's parent must be an <code>Element</code> or a
- * <code>DocumentFragment</code>.
+ * Insert the result of the parse operation as the immediately preceding
+ * sibling of the context node. For this action to work the context
+ * node's parent must be an <code>Element</code> or a
+ * <code>DocumentFragment</code>.
*/
public static final short ACTION_INSERT_BEFORE = 3;
/**
- * Insert the result of the parse operation as the immediately following
- * sibling of the context node. For this action to work the context
- * node's parent must be an <code>Element</code> or a
- * <code>DocumentFragment</code>.
+ * Insert the result of the parse operation as the immediately following
+ * sibling of the context node. For this action to work the context
+ * node's parent must be an <code>Element</code> or a
+ * <code>DocumentFragment</code>.
*/
public static final short ACTION_INSERT_AFTER = 4;
/**
- * Replace the context node with the result of the parse operation. For
- * this action to work, the context node must have a parent, and the
- * parent must be an <code>Element</code> or a
- * <code>DocumentFragment</code>.
+ * Replace the context node with the result of the parse operation. For
+ * this action to work, the context node must have a parent, and the
+ * parent must be an <code>Element</code> or a
+ * <code>DocumentFragment</code>.
*/
public static final short ACTION_REPLACE = 5;
/**
- * Parse an XML fragment from a resource identified by a
- * <code>LSInput</code> and insert the content into an existing document
- * at the position specified with the <code>context</code> and
- * <code>action</code> arguments. When parsing the input stream, the
- * context node (or its parent, depending on where the result will be
- * inserted) is used for resolving unbound namespace prefixes. The
- * context node's <code>ownerDocument</code> node (or the node itself if
- * the node of type <code>DOCUMENT_NODE</code>) is used to resolve
- * default attributes and entity references.
- * <br> As the new data is inserted into the document, at least one
- * mutation event is fired per new immediate child or sibling of the
- * context node.
- * <br> If the context node is a <code>Document</code> node and the action
- * is <code>ACTION_REPLACE_CHILDREN</code>, then the document that is
- * passed as the context node will be changed such that its
- * <code>xmlEncoding</code>, <code>documentURI</code>,
- * <code>xmlVersion</code>, <code>inputEncoding</code>,
- * <code>xmlStandalone</code>, and all other such attributes are set to
- * what they would be set to if the input source was parsed using
- * <code>LSParser.parse()</code>.
- * <br> This method is always synchronous, even if the
- * <code>LSParser</code> is asynchronous (<code>LSParser.async</code> is
- * <code>true</code>).
- * <br> If an error occurs while parsing, the caller is notified through
+ * Parse an XML fragment from a resource identified by a
+ * <code>LSInput</code> and insert the content into an existing document
+ * at the position specified with the <code>context</code> and
+ * <code>action</code> arguments. When parsing the input stream, the
+ * context node (or its parent, depending on where the result will be
+ * inserted) is used for resolving unbound namespace prefixes. The
+ * context node's <code>ownerDocument</code> node (or the node itself if
+ * the node of type <code>DOCUMENT_NODE</code>) is used to resolve
+ * default attributes and entity references.
+ * <br> As the new data is inserted into the document, at least one
+ * mutation event is fired per new immediate child or sibling of the
+ * context node.
+ * <br> If the context node is a <code>Document</code> node and the action
+ * is <code>ACTION_REPLACE_CHILDREN</code>, then the document that is
+ * passed as the context node will be changed such that its
+ * <code>xmlEncoding</code>, <code>documentURI</code>,
+ * <code>xmlVersion</code>, <code>inputEncoding</code>,
+ * <code>xmlStandalone</code>, and all other such attributes are set to
+ * what they would be set to if the input source was parsed using
+ * <code>LSParser.parse()</code>.
+ * <br> This method is always synchronous, even if the
+ * <code>LSParser</code> is asynchronous (<code>LSParser.async</code> is
+ * <code>true</code>).
+ * <br> If an error occurs while parsing, the caller is notified through
* the <code>ErrorHandler</code> instance associated with the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter of the <code>DOMConfiguration</code>.
- * <br> When calling <code>parseWithContext</code>, the values of the
- * following configuration parameters will be ignored and their default
+ * error-handler</a>" parameter of the <code>DOMConfiguration</code>.
+ * <br> When calling <code>parseWithContext</code>, the values of the
+ * following configuration parameters will be ignored and their default
* values will always be used instead: "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
* validate</a>", "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate-if-schema'>
* validate-if-schema</a>", and "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-element-content-whitespace'>
- * element-content-whitespace</a>". Other parameters will be treated normally, and the parser is expected
- * to call the <code>LSParserFilter</code> just as if a whole document
- * was parsed.
- * @param input The <code>LSInput</code> from which the source document
- * is to be read. The source document must be an XML fragment, i.e.
- * anything except a complete XML document (except in the case where
- * the context node of type <code>DOCUMENT_NODE</code>, and the action
- * is <code>ACTION_REPLACE_CHILDREN</code>), a DOCTYPE (internal
- * subset), entity declaration(s), notation declaration(s), or XML or
- * text declaration(s).
- * @param contextArg The node that is used as the context for the data
- * that is being parsed. This node must be a <code>Document</code>
- * node, a <code>DocumentFragment</code> node, or a node of a type
- * that is allowed as a child of an <code>Element</code> node, e.g. it
- * cannot be an <code>Attribute</code> node.
- * @param action This parameter describes which action should be taken
- * between the new set of nodes being inserted and the existing
- * children of the context node. The set of possible actions is
- * defined in <code>ACTION_TYPES</code> above.
- * @return Return the node that is the result of the parse operation. If
- * the result is more than one top-level node, the first one is
- * returned.
+ * element-content-whitespace</a>". Other parameters will be treated normally, and the parser is expected
+ * to call the <code>LSParserFilter</code> just as if a whole document
+ * was parsed.
+ * @param input The <code>LSInput</code> from which the source document
+ * is to be read. The source document must be an XML fragment, i.e.
+ * anything except a complete XML document (except in the case where
+ * the context node of type <code>DOCUMENT_NODE</code>, and the action
+ * is <code>ACTION_REPLACE_CHILDREN</code>), a DOCTYPE (internal
+ * subset), entity declaration(s), notation declaration(s), or XML or
+ * text declaration(s).
+ * @param contextArg The node that is used as the context for the data
+ * that is being parsed. This node must be a <code>Document</code>
+ * node, a <code>DocumentFragment</code> node, or a node of a type
+ * that is allowed as a child of an <code>Element</code> node, e.g. it
+ * cannot be an <code>Attribute</code> node.
+ * @param action This parameter describes which action should be taken
+ * between the new set of nodes being inserted and the existing
+ * children of the context node. The set of possible actions is
+ * defined in <code>ACTION_TYPES</code> above.
+ * @return Return the node that is the result of the parse operation. If
+ * the result is more than one top-level node, the first one is
+ * returned.
* @exception DOMException
- * HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be
- * inserted before, after, or as a child of the context node (see also
+ * HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be
+ * inserted before, after, or as a child of the context node (see also
* <code>Node.insertBefore</code> or <code>Node.replaceChild</code> in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* ).
- * <br> NOT_SUPPORTED_ERR: Raised if the <code>LSParser</code> doesn't
- * support this method, or if the context node is of type
- * <code>Document</code> and the DOM implementation doesn't support
- * the replacement of the <code>DocumentType</code> child or
- * <code>Element</code> child.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a
- * read only node and the content is being appended to its child list,
- * or if the parent node of the context node is read only node and the
+ * <br> NOT_SUPPORTED_ERR: Raised if the <code>LSParser</code> doesn't
+ * support this method, or if the context node is of type
+ * <code>Document</code> and the DOM implementation doesn't support
+ * the replacement of the <code>DocumentType</code> child or
+ * <code>Element</code> child.
+ * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a
+ * read only node and the content is being appended to its child list,
+ * or if the parent node of the context node is read only node and the
* content is being inserted in its child list.
- * <br> INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code>
- * attribute is <code>true</code>.
+ * <br> INVALID_STATE_ERR: Raised if the <code>LSParser.busy</code>
+ * attribute is <code>true</code>.
* @exception LSException
- * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
- * the XML fragment. DOM applications should attach a
+ * PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
+ * the XML fragment. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
- public Node parseWithContext(LSInput input,
- Node contextArg,
+ public Node parseWithContext(LSInput input,
+ Node contextArg,
short action)
throws DOMException, LSException;
/**
- * Abort the loading of the document that is currently being loaded by
- * the <code>LSParser</code>. If the <code>LSParser</code> is currently
- * not busy, a call to this method does nothing.
+ * Abort the loading of the document that is currently being loaded by
+ * the <code>LSParser</code>. If the <code>LSParser</code> is currently
+ * not busy, a call to this method does nothing.
*/
public void abort();
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSParserFilter.java b/luni/src/main/java/org/w3c/dom/ls/LSParserFilter.java
index 4e61294..00db4d3 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSParserFilter.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSParserFilter.java
@@ -16,32 +16,32 @@
import org.w3c.dom.Element;
/**
- * <code>LSParserFilter</code>s provide applications the ability to examine
- * nodes as they are being constructed while parsing. As each node is
- * examined, it may be modified or removed, or the entire parse may be
- * terminated early.
- * <p> At the time any of the filter methods are called by the parser, the
- * owner Document and DOMImplementation objects exist and are accessible.
- * The document element is never passed to the <code>LSParserFilter</code>
- * methods, i.e. it is not possible to filter out the document element.
- * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>,
- * <code>Entity</code>, and <code>Attr</code> nodes are never passed to the
- * <code>acceptNode</code> method on the filter. The child nodes of an
- * <code>EntityReference</code> node are passed to the filter if the
+ * <code>LSParserFilter</code>s provide applications the ability to examine
+ * nodes as they are being constructed while parsing. As each node is
+ * examined, it may be modified or removed, or the entire parse may be
+ * terminated early.
+ * <p> At the time any of the filter methods are called by the parser, the
+ * owner Document and DOMImplementation objects exist and are accessible.
+ * The document element is never passed to the <code>LSParserFilter</code>
+ * methods, i.e. it is not possible to filter out the document element.
+ * <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>,
+ * <code>Entity</code>, and <code>Attr</code> nodes are never passed to the
+ * <code>acceptNode</code> method on the filter. The child nodes of an
+ * <code>EntityReference</code> node are passed to the filter if the
* parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
* entities</a>" is set to <code>false</code>. Note that, as described by the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>", unexpanded entity reference nodes are never discarded and are always
- * passed to the filter.
- * <p> All validity checking while parsing a document occurs on the source
- * document as it appears on the input stream, not on the DOM document as it
- * is built in memory. With filters, the document in memory may be a subset
- * of the document on the stream, and its validity may have been affected by
- * the filtering.
- * <p> All default attributes must be present on elements when the elements
- * are passed to the filter methods. All other default content must be
- * passed to the filter methods.
- * <p> DOM applications must not raise exceptions in a filter. The effect of
- * throwing exceptions from a filter is DOM implementation dependent.
+ * entities</a>", unexpanded entity reference nodes are never discarded and are always
+ * passed to the filter.
+ * <p> All validity checking while parsing a document occurs on the source
+ * document as it appears on the input stream, not on the DOM document as it
+ * is built in memory. With filters, the document in memory may be a subset
+ * of the document on the stream, and its validity may have been affected by
+ * the filtering.
+ * <p> All default attributes must be present on elements when the elements
+ * are passed to the filter methods. All other default content must be
+ * passed to the filter methods.
+ * <p> DOM applications must not raise exceptions in a filter. The effect of
+ * throwing exceptions from a filter is DOM implementation dependent.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
@@ -56,116 +56,116 @@
*/
public static final short FILTER_REJECT = 2;
/**
- * Skip this single node. The children of this node will still be
- * considered.
+ * Skip this single node. The children of this node will still be
+ * considered.
*/
public static final short FILTER_SKIP = 3;
/**
- * Interrupt the normal processing of the document.
+ * Interrupt the normal processing of the document.
*/
public static final short FILTER_INTERRUPT = 4;
/**
- * The parser will call this method after each <code>Element</code> start
- * tag has been scanned, but before the remainder of the
- * <code>Element</code> is processed. The intent is to allow the
- * element, including any children, to be efficiently skipped. Note that
- * only element nodes are passed to the <code>startElement</code>
- * function.
- * <br>The element node passed to <code>startElement</code> for filtering
- * will include all of the Element's attributes, but none of the
- * children nodes. The Element may not yet be in place in the document
- * being constructed (it may not have a parent node.)
- * <br>A <code>startElement</code> filter function may access or change
- * the attributes for the Element. Changing Namespace declarations will
+ * The parser will call this method after each <code>Element</code> start
+ * tag has been scanned, but before the remainder of the
+ * <code>Element</code> is processed. The intent is to allow the
+ * element, including any children, to be efficiently skipped. Note that
+ * only element nodes are passed to the <code>startElement</code>
+ * function.
+ * <br>The element node passed to <code>startElement</code> for filtering
+ * will include all of the Element's attributes, but none of the
+ * children nodes. The Element may not yet be in place in the document
+ * being constructed (it may not have a parent node.)
+ * <br>A <code>startElement</code> filter function may access or change
+ * the attributes for the Element. Changing Namespace declarations will
* have no effect on namespace resolution by the parser.
- * <br>For efficiency, the Element node passed to the filter may not be
- * the same one as is actually placed in the tree if the node is
- * accepted. And the actual node (node object identity) may be reused
+ * <br>For efficiency, the Element node passed to the filter may not be
+ * the same one as is actually placed in the tree if the node is
+ * accepted. And the actual node (node object identity) may be reused
* during the process of reading in and filtering a document.
- * @param elementArg The newly encountered element. At the time this
- * method is called, the element is incomplete - it will have its
- * attributes, but no children.
- * @return
+ * @param elementArg The newly encountered element. At the time this
+ * method is called, the element is incomplete - it will have its
+ * attributes, but no children.
+ * @return
* <ul>
- * <li> <code>FILTER_ACCEPT</code> if the <code>Element</code> should
- * be included in the DOM document being built.
+ * <li> <code>FILTER_ACCEPT</code> if the <code>Element</code> should
+ * be included in the DOM document being built.
* </li>
- * <li>
- * <code>FILTER_REJECT</code> if the <code>Element</code> and all of
- * its children should be rejected.
+ * <li>
+ * <code>FILTER_REJECT</code> if the <code>Element</code> and all of
+ * its children should be rejected.
* </li>
- * <li> <code>FILTER_SKIP</code> if the
- * <code>Element</code> should be skipped. All of its children are
- * inserted in place of the skipped <code>Element</code> node.
+ * <li> <code>FILTER_SKIP</code> if the
+ * <code>Element</code> should be skipped. All of its children are
+ * inserted in place of the skipped <code>Element</code> node.
* </li>
- * <li>
- * <code>FILTER_INTERRUPT</code> if the filter wants to stop the
- * processing of the document. Interrupting the processing of the
- * document does no longer guarantee that the resulting DOM tree is
- * XML well-formed. The <code>Element</code> is rejected.
+ * <li>
+ * <code>FILTER_INTERRUPT</code> if the filter wants to stop the
+ * processing of the document. Interrupting the processing of the
+ * document does no longer guarantee that the resulting DOM tree is
+ * XML well-formed. The <code>Element</code> is rejected.
* </li>
- * </ul> Returning
- * any other values will result in unspecified behavior.
+ * </ul> Returning
+ * any other values will result in unspecified behavior.
*/
public short startElement(Element elementArg);
/**
- * This method will be called by the parser at the completion of the
- * parsing of each node. The node and all of its descendants will exist
- * and be complete. The parent node will also exist, although it may be
- * incomplete, i.e. it may have additional children that have not yet
+ * This method will be called by the parser at the completion of the
+ * parsing of each node. The node and all of its descendants will exist
+ * and be complete. The parent node will also exist, although it may be
+ * incomplete, i.e. it may have additional children that have not yet
* been parsed. Attribute nodes are never passed to this function.
- * <br>From within this method, the new node may be freely modified -
- * children may be added or removed, text nodes modified, etc. The state
- * of the rest of the document outside this node is not defined, and the
- * affect of any attempt to navigate to, or to modify any other part of
- * the document is undefined.
- * <br>For validating parsers, the checks are made on the original
- * document, before any modification by the filter. No validity checks
+ * <br>From within this method, the new node may be freely modified -
+ * children may be added or removed, text nodes modified, etc. The state
+ * of the rest of the document outside this node is not defined, and the
+ * affect of any attempt to navigate to, or to modify any other part of
+ * the document is undefined.
+ * <br>For validating parsers, the checks are made on the original
+ * document, before any modification by the filter. No validity checks
* are made on any document modifications made by the filter.
- * <br>If this new node is rejected, the parser might reuse the new node
+ * <br>If this new node is rejected, the parser might reuse the new node
* and any of its descendants.
- * @param nodeArg The newly constructed element. At the time this method
- * is called, the element is complete - it has all of its children
- * (and their children, recursively) and attributes, and is attached
- * as a child to its parent.
- * @return
+ * @param nodeArg The newly constructed element. At the time this method
+ * is called, the element is complete - it has all of its children
+ * (and their children, recursively) and attributes, and is attached
+ * as a child to its parent.
+ * @return
* <ul>
- * <li> <code>FILTER_ACCEPT</code> if this <code>Node</code> should
- * be included in the DOM document being built.
+ * <li> <code>FILTER_ACCEPT</code> if this <code>Node</code> should
+ * be included in the DOM document being built.
* </li>
- * <li>
- * <code>FILTER_REJECT</code> if the <code>Node</code> and all of its
- * children should be rejected.
+ * <li>
+ * <code>FILTER_REJECT</code> if the <code>Node</code> and all of its
+ * children should be rejected.
* </li>
- * <li> <code>FILTER_SKIP</code> if the
- * <code>Node</code> should be skipped and the <code>Node</code>
- * should be replaced by all the children of the <code>Node</code>.
+ * <li> <code>FILTER_SKIP</code> if the
+ * <code>Node</code> should be skipped and the <code>Node</code>
+ * should be replaced by all the children of the <code>Node</code>.
* </li>
- * <li>
- * <code>FILTER_INTERRUPT</code> if the filter wants to stop the
- * processing of the document. Interrupting the processing of the
- * document does no longer guarantee that the resulting DOM tree is
- * XML well-formed. The <code>Node</code> is accepted and will be the
- * last completely parsed node.
+ * <li>
+ * <code>FILTER_INTERRUPT</code> if the filter wants to stop the
+ * processing of the document. Interrupting the processing of the
+ * document does no longer guarantee that the resulting DOM tree is
+ * XML well-formed. The <code>Node</code> is accepted and will be the
+ * last completely parsed node.
* </li>
* </ul>
*/
public short acceptNode(Node nodeArg);
/**
- * Tells the <code>LSParser</code> what types of nodes to show to the
- * method <code>LSParserFilter.acceptNode</code>. If a node is not shown
- * to the filter using this attribute, it is automatically included in
- * the DOM document being built. See <code>NodeFilter</code> for
+ * Tells the <code>LSParser</code> what types of nodes to show to the
+ * method <code>LSParserFilter.acceptNode</code>. If a node is not shown
+ * to the filter using this attribute, it is automatically included in
+ * the DOM document being built. See <code>NodeFilter</code> for
* definition of the constants. The constants <code>SHOW_ATTRIBUTE</code>
- * , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>,
- * <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
- * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes
- * will never be passed to <code>LSParserFilter.acceptNode</code>.
+ * , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>,
+ * <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
+ * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes
+ * will never be passed to <code>LSParserFilter.acceptNode</code>.
* <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and Range</a>]
- * .
+ * .
*/
public int getWhatToShow();
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSResourceResolver.java b/luni/src/main/java/org/w3c/dom/ls/LSResourceResolver.java
index c0c523c..5301beb 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSResourceResolver.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSResourceResolver.java
@@ -13,69 +13,69 @@
package org.w3c.dom.ls;
/**
- * <code>LSResourceResolver</code> provides a way for applications to
- * redirect references to external resources.
- * <p> Applications needing to implement custom handling for external
- * resources can implement this interface and register their implementation
- * by setting the "resource-resolver" parameter of
- * <code>DOMConfiguration</code> objects attached to <code>LSParser</code>
- * and <code>LSSerializer</code>. It can also be register on
- * <code>DOMConfiguration</code> objects attached to <code>Document</code>
- * if the "LS" feature is supported.
- * <p> The <code>LSParser</code> will then allow the application to intercept
- * any external entities, including the external DTD subset and external
- * parameter entities, before including them. The top-level document entity
- * is never passed to the <code>resolveResource</code> method.
- * <p> Many DOM applications will not need to implement this interface, but it
- * will be especially useful for applications that build XML documents from
- * databases or other specialized input sources, or for applications that
- * use URNs.
- * <p ><b>Note:</b> <code>LSResourceResolver</code> is based on the SAX2 [<a href='http://www.saxproject.org/'>SAX</a>] <code>EntityResolver</code>
- * interface.
+ * <code>LSResourceResolver</code> provides a way for applications to
+ * redirect references to external resources.
+ * <p> Applications needing to implement custom handling for external
+ * resources can implement this interface and register their implementation
+ * by setting the "resource-resolver" parameter of
+ * <code>DOMConfiguration</code> objects attached to <code>LSParser</code>
+ * and <code>LSSerializer</code>. It can also be register on
+ * <code>DOMConfiguration</code> objects attached to <code>Document</code>
+ * if the "LS" feature is supported.
+ * <p> The <code>LSParser</code> will then allow the application to intercept
+ * any external entities, including the external DTD subset and external
+ * parameter entities, before including them. The top-level document entity
+ * is never passed to the <code>resolveResource</code> method.
+ * <p> Many DOM applications will not need to implement this interface, but it
+ * will be especially useful for applications that build XML documents from
+ * databases or other specialized input sources, or for applications that
+ * use URNs.
+ * <p ><b>Note:</b> <code>LSResourceResolver</code> is based on the SAX2 [<a href='http://www.saxproject.org/'>SAX</a>] <code>EntityResolver</code>
+ * interface.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSResourceResolver {
/**
- * Allow the application to resolve external resources.
- * <br> The <code>LSParser</code> will call this method before opening any
- * external resource, including the external DTD subset, external
- * entities referenced within the DTD, and external entities referenced
- * within the document element (however, the top-level document entity
- * is not passed to this method). The application may then request that
- * the <code>LSParser</code> resolve the external resource itself, that
- * it use an alternative URI, or that it use an entirely different input
- * source.
- * <br> Application writers can use this method to redirect external
- * system identifiers to secure and/or local URI, to look up public
- * identifiers in a catalogue, or to read an entity from a database or
- * other input source (including, for example, a dialog box).
- * @param type The type of the resource being resolved. For XML [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] resources
- * (i.e. entities), applications must use the value
+ * Allow the application to resolve external resources.
+ * <br> The <code>LSParser</code> will call this method before opening any
+ * external resource, including the external DTD subset, external
+ * entities referenced within the DTD, and external entities referenced
+ * within the document element (however, the top-level document entity
+ * is not passed to this method). The application may then request that
+ * the <code>LSParser</code> resolve the external resource itself, that
+ * it use an alternative URI, or that it use an entirely different input
+ * source.
+ * <br> Application writers can use this method to redirect external
+ * system identifiers to secure and/or local URI, to look up public
+ * identifiers in a catalogue, or to read an entity from a database or
+ * other input source (including, for example, a dialog box).
+ * @param type The type of the resource being resolved. For XML [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] resources
+ * (i.e. entities), applications must use the value
* <code>"http://www.w3.org/TR/REC-xml"</code>. For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * , applications must use the value
- * <code>"http://www.w3.org/2001/XMLSchema"</code>. Other types of
- * resources are outside the scope of this specification and therefore
- * should recommend an absolute URI in order to use this method.
- * @param namespaceURI The namespace of the resource being resolved,
+ * , applications must use the value
+ * <code>"http://www.w3.org/2001/XMLSchema"</code>. Other types of
+ * resources are outside the scope of this specification and therefore
+ * should recommend an absolute URI in order to use this method.
+ * @param namespaceURI The namespace of the resource being resolved,
* e.g. the target namespace of the XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
- * when resolving XML Schema resources.
- * @param publicId The public identifier of the external entity being
- * referenced, or <code>null</code> if no public identifier was
- * supplied or if the resource is not an entity.
- * @param systemId The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], of the
- * external resource being referenced, or <code>null</code> if no
- * system identifier was supplied.
- * @param baseURI The absolute base URI of the resource being parsed, or
- * <code>null</code> if there is no base URI.
- * @return A <code>LSInput</code> object describing the new input
- * source, or <code>null</code> to request that the parser open a
- * regular URI connection to the resource.
+ * when resolving XML Schema resources.
+ * @param publicId The public identifier of the external entity being
+ * referenced, or <code>null</code> if no public identifier was
+ * supplied or if the resource is not an entity.
+ * @param systemId The system identifier, a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], of the
+ * external resource being referenced, or <code>null</code> if no
+ * system identifier was supplied.
+ * @param baseURI The absolute base URI of the resource being parsed, or
+ * <code>null</code> if there is no base URI.
+ * @return A <code>LSInput</code> object describing the new input
+ * source, or <code>null</code> to request that the parser open a
+ * regular URI connection to the resource.
*/
- public LSInput resolveResource(String type,
- String namespaceURI,
- String publicId,
- String systemId,
+ public LSInput resolveResource(String type,
+ String namespaceURI,
+ String publicId,
+ String systemId,
String baseURI);
}
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSSerializer.java b/luni/src/main/java/org/w3c/dom/ls/LSSerializer.java
index 33b094a..b4f4424 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSSerializer.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSSerializer.java
@@ -17,187 +17,187 @@
import org.w3c.dom.DOMException;
/**
- * A <code>LSSerializer</code> provides an API for serializing (writing) a
- * DOM document out into XML. The XML data is written to a string or an
- * output stream. Any changes or fixups made during the serialization affect
- * only the serialized data. The <code>Document</code> object and its
- * children are never altered by the serialization operation.
+ * A <code>LSSerializer</code> provides an API for serializing (writing) a
+ * DOM document out into XML. The XML data is written to a string or an
+ * output stream. Any changes or fixups made during the serialization affect
+ * only the serialized data. The <code>Document</code> object and its
+ * children are never altered by the serialization operation.
* <p> During serialization of XML data, namespace fixup is done as defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , Appendix B. [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>DOM Level 2 Core</a>]
- * allows empty strings as a real namespace URI. If the
- * <code>namespaceURI</code> of a <code>Node</code> is empty string, the
- * serialization will treat them as <code>null</code>, ignoring the prefix
- * if any.
- * <p> <code>LSSerializer</code> accepts any node type for serialization. For
- * nodes of type <code>Document</code> or <code>Entity</code>, well-formed
- * XML will be created when possible (well-formedness is guaranteed if the
- * document or entity comes from a parse operation and is unchanged since it
- * was created). The serialized output for these node types is either as a
- * XML document or an External XML Entity, respectively, and is acceptable
- * input for an XML parser. For all other types of nodes the serialized form
- * is implementation dependent.
- * <p>Within a <code>Document</code>, <code>DocumentFragment</code>, or
- * <code>Entity</code> being serialized, <code>Nodes</code> are processed as
+ * allows empty strings as a real namespace URI. If the
+ * <code>namespaceURI</code> of a <code>Node</code> is empty string, the
+ * serialization will treat them as <code>null</code>, ignoring the prefix
+ * if any.
+ * <p> <code>LSSerializer</code> accepts any node type for serialization. For
+ * nodes of type <code>Document</code> or <code>Entity</code>, well-formed
+ * XML will be created when possible (well-formedness is guaranteed if the
+ * document or entity comes from a parse operation and is unchanged since it
+ * was created). The serialized output for these node types is either as a
+ * XML document or an External XML Entity, respectively, and is acceptable
+ * input for an XML parser. For all other types of nodes the serialized form
+ * is implementation dependent.
+ * <p>Within a <code>Document</code>, <code>DocumentFragment</code>, or
+ * <code>Entity</code> being serialized, <code>Nodes</code> are processed as
* follows
* <ul>
- * <li> <code>Document</code> nodes are written, including the XML
- * declaration (unless the parameter "xml-declaration" is set to
- * <code>false</code>) and a DTD subset, if one exists in the DOM. Writing a
- * <code>Document</code> node serializes the entire document.
+ * <li> <code>Document</code> nodes are written, including the XML
+ * declaration (unless the parameter "xml-declaration" is set to
+ * <code>false</code>) and a DTD subset, if one exists in the DOM. Writing a
+ * <code>Document</code> node serializes the entire document.
* </li>
- * <li>
- * <code>Entity</code> nodes, when written directly by
- * <code>LSSerializer.write</code>, outputs the entity expansion but no
- * namespace fixup is done. The resulting output will be valid as an
- * external entity.
+ * <li>
+ * <code>Entity</code> nodes, when written directly by
+ * <code>LSSerializer.write</code>, outputs the entity expansion but no
+ * namespace fixup is done. The resulting output will be valid as an
+ * external entity.
* </li>
* <li> If the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>true</code>, <code>EntityReference</code> nodes are
+ * entities</a>" is set to <code>true</code>, <code>EntityReference</code> nodes are
* serialized as an entity reference of the form "
- * <code>&entityName;</code>" in the output. Child nodes (the expansion)
+ * <code>&entityName;</code>" in the output. Child nodes (the expansion)
* of the entity reference are ignored. If the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>false</code>, only the children of the entity reference
- * are serialized. <code>EntityReference</code> nodes with no children (no
- * corresponding <code>Entity</code> node or the corresponding
- * <code>Entity</code> nodes have no children) are always serialized.
+ * entities</a>" is set to <code>false</code>, only the children of the entity reference
+ * are serialized. <code>EntityReference</code> nodes with no children (no
+ * corresponding <code>Entity</code> node or the corresponding
+ * <code>Entity</code> nodes have no children) are always serialized.
* </li>
- * <li>
- * <code>CDATAsections</code> containing content characters that cannot be
- * represented in the specified output encoding are handled according to the
+ * <li>
+ * <code>CDATAsections</code> containing content characters that cannot be
+ * represented in the specified output encoding are handled according to the
* "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-split-cdata-sections'>
- * split-cdata-sections</a>" parameter. If the parameter is set to <code>true</code>,
- * <code>CDATAsections</code> are split, and the unrepresentable characters
- * are serialized as numeric character references in ordinary content. The
- * exact position and number of splits is not specified. If the parameter
- * is set to <code>false</code>, unrepresentable characters in a
- * <code>CDATAsection</code> are reported as
+ * split-cdata-sections</a>" parameter. If the parameter is set to <code>true</code>,
+ * <code>CDATAsections</code> are split, and the unrepresentable characters
+ * are serialized as numeric character references in ordinary content. The
+ * exact position and number of splits is not specified. If the parameter
+ * is set to <code>false</code>, unrepresentable characters in a
+ * <code>CDATAsection</code> are reported as
* <code>"wf-invalid-character"</code> errors if the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
- * well-formed</a>" is set to <code>true</code>. The error is not recoverable - there is no
- * mechanism for supplying alternative characters and continuing with the
- * serialization.
+ * well-formed</a>" is set to <code>true</code>. The error is not recoverable - there is no
+ * mechanism for supplying alternative characters and continuing with the
+ * serialization.
* </li>
- * <li> <code>DocumentFragment</code> nodes are serialized by
- * serializing the children of the document fragment in the order they
- * appear in the document fragment.
+ * <li> <code>DocumentFragment</code> nodes are serialized by
+ * serializing the children of the document fragment in the order they
+ * appear in the document fragment.
* </li>
- * <li> All other node types (Element, Text,
- * etc.) are serialized to their corresponding XML source form.
+ * <li> All other node types (Element, Text,
+ * etc.) are serialized to their corresponding XML source form.
* </li>
* </ul>
- * <p ><b>Note:</b> The serialization of a <code>Node</code> does not always
- * generate a well-formed XML document, i.e. a <code>LSParser</code> might
- * throw fatal errors when parsing the resulting serialization.
- * <p> Within the character data of a document (outside of markup), any
- * characters that cannot be represented directly are replaced with
- * character references. Occurrences of '<' and '&' are replaced by
- * the predefined entities &lt; and &amp;. The other predefined
- * entities (&gt;, &apos;, and &quot;) might not be used, except
- * where needed (e.g. using &gt; in cases such as ']]>'). Any
- * characters that cannot be represented directly in the output character
- * encoding are serialized as numeric character references (and since
- * character encoding standards commonly use hexadecimal representations of
- * characters, using the hexadecimal representation when serializing
- * character references is encouraged).
- * <p> To allow attribute values to contain both single and double quotes, the
- * apostrophe or single-quote character (') may be represented as
- * "&apos;", and the double-quote character (") as "&quot;". New
- * line characters and other characters that cannot be represented directly
- * in attribute values in the output character encoding are serialized as a
- * numeric character reference.
- * <p> Within markup, but outside of attributes, any occurrence of a character
- * that cannot be represented in the output character encoding is reported
- * as a <code>DOMError</code> fatal error. An example would be serializing
- * the element <LaCa\u00f1ada/> with <code>encoding="us-ascii"</code>.
- * This will result with a generation of a <code>DOMError</code>
+ * <p ><b>Note:</b> The serialization of a <code>Node</code> does not always
+ * generate a well-formed XML document, i.e. a <code>LSParser</code> might
+ * throw fatal errors when parsing the resulting serialization.
+ * <p> Within the character data of a document (outside of markup), any
+ * characters that cannot be represented directly are replaced with
+ * character references. Occurrences of '<' and '&' are replaced by
+ * the predefined entities &lt; and &amp;. The other predefined
+ * entities (&gt;, &apos;, and &quot;) might not be used, except
+ * where needed (e.g. using &gt; in cases such as ']]>'). Any
+ * characters that cannot be represented directly in the output character
+ * encoding are serialized as numeric character references (and since
+ * character encoding standards commonly use hexadecimal representations of
+ * characters, using the hexadecimal representation when serializing
+ * character references is encouraged).
+ * <p> To allow attribute values to contain both single and double quotes, the
+ * apostrophe or single-quote character (') may be represented as
+ * "&apos;", and the double-quote character (") as "&quot;". New
+ * line characters and other characters that cannot be represented directly
+ * in attribute values in the output character encoding are serialized as a
+ * numeric character reference.
+ * <p> Within markup, but outside of attributes, any occurrence of a character
+ * that cannot be represented in the output character encoding is reported
+ * as a <code>DOMError</code> fatal error. An example would be serializing
+ * the element <LaCa\u00f1ada/> with <code>encoding="us-ascii"</code>.
+ * This will result with a generation of a <code>DOMError</code>
* "wf-invalid-character-in-node-name" (as proposed in "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
- * well-formed</a>").
+ * well-formed</a>").
* <p> When requested by setting the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-normalize-characters'>
- * normalize-characters</a>" on <code>LSSerializer</code> to true, character normalization is
- * performed according to the definition of <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
- * normalized</a> characters included in appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] on all
- * data to be serialized, both markup and character data. The character
- * normalization process affects only the data as it is being written; it
- * does not alter the DOM's view of the document after serialization has
- * completed.
- * <p> Implementations are required to support the encodings "UTF-8",
- * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is
- * serializable in all encodings that are required to be supported by all
- * XML parsers. When the encoding is UTF-8, whether or not a byte order mark
- * is serialized, or if the output is big-endian or little-endian, is
- * implementation dependent. When the encoding is UTF-16, whether or not the
- * output is big-endian or little-endian is implementation dependent, but a
- * Byte Order Mark must be generated for non-character outputs, such as
- * <code>LSOutput.byteStream</code> or <code>LSOutput.systemId</code>. If
- * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning
- * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is
- * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark
- * is not be generated. In all cases, the encoding declaration, if
- * generated, will correspond to the encoding used during the serialization
- * (e.g. <code>encoding="UTF-16"</code> will appear if UTF-16 was
- * requested).
- * <p> Namespaces are fixed up during serialization, the serialization process
- * will verify that namespace declarations, namespace prefixes and the
- * namespace URI associated with elements and attributes are consistent. If
- * inconsistencies are found, the serialized form of the document will be
- * altered to remove them. The method used for doing the namespace fixup
- * while serializing a document is the algorithm defined in Appendix B.1,
+ * normalize-characters</a>" on <code>LSSerializer</code> to true, character normalization is
+ * performed according to the definition of <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
+ * normalized</a> characters included in appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] on all
+ * data to be serialized, both markup and character data. The character
+ * normalization process affects only the data as it is being written; it
+ * does not alter the DOM's view of the document after serialization has
+ * completed.
+ * <p> Implementations are required to support the encodings "UTF-8",
+ * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is
+ * serializable in all encodings that are required to be supported by all
+ * XML parsers. When the encoding is UTF-8, whether or not a byte order mark
+ * is serialized, or if the output is big-endian or little-endian, is
+ * implementation dependent. When the encoding is UTF-16, whether or not the
+ * output is big-endian or little-endian is implementation dependent, but a
+ * Byte Order Mark must be generated for non-character outputs, such as
+ * <code>LSOutput.byteStream</code> or <code>LSOutput.systemId</code>. If
+ * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning
+ * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is
+ * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark
+ * is not be generated. In all cases, the encoding declaration, if
+ * generated, will correspond to the encoding used during the serialization
+ * (e.g. <code>encoding="UTF-16"</code> will appear if UTF-16 was
+ * requested).
+ * <p> Namespaces are fixed up during serialization, the serialization process
+ * will verify that namespace declarations, namespace prefixes and the
+ * namespace URI associated with elements and attributes are consistent. If
+ * inconsistencies are found, the serialized form of the document will be
+ * altered to remove them. The method used for doing the namespace fixup
+ * while serializing a document is the algorithm defined in Appendix B.1,
* "Namespace normalization", of [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * .
- * <p> While serializing a document, the parameter "discard-default-content"
- * controls whether or not non-specified data is serialized.
- * <p> While serializing, errors and warnings are reported to the application
+ * .
+ * <p> While serializing a document, the parameter "discard-default-content"
+ * controls whether or not non-specified data is serialized.
+ * <p> While serializing, errors and warnings are reported to the application
* through the error handler (<code>LSSerializer.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter). This specification does in no way try to define all possible
- * errors and warnings that can occur while serializing a DOM node, but some
+ * error-handler</a>" parameter). This specification does in no way try to define all possible
+ * errors and warnings that can occur while serializing a DOM node, but some
* common error and warning cases are defined. The types (
- * <code>DOMError.type</code>) of errors and warnings defined by this
- * specification are:
+ * <code>DOMError.type</code>) of errors and warnings defined by this
+ * specification are:
* <dl>
* <dt><code>"no-output-specified" [fatal]</code></dt>
- * <dd> Raised when
- * writing to a <code>LSOutput</code> if no output is specified in the
+ * <dd> Raised when
+ * writing to a <code>LSOutput</code> if no output is specified in the
* <code>LSOutput</code>. </dd>
- * <dt>
+ * <dt>
* <code>"unbound-prefix-in-entity-reference" [fatal]</code> </dt>
- * <dd> Raised if the
+ * <dd> Raised if the
* configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
- * namespaces</a>" is set to <code>true</code> and an entity whose replacement text
- * contains unbound namespace prefixes is referenced in a location where
+ * namespaces</a>" is set to <code>true</code> and an entity whose replacement text
+ * contains unbound namespace prefixes is referenced in a location where
* there are no bindings for the namespace prefixes. </dd>
* <dt>
* <code>"unsupported-encoding" [fatal]</code></dt>
- * <dd> Raised if an unsupported
+ * <dd> Raised if an unsupported
* encoding is encountered. </dd>
- * </dl>
- * <p> In addition to raising the defined errors and warnings, implementations
- * are expected to raise implementation specific errors and warnings for any
- * other error and warning cases such as IO errors (file not found,
- * permission denied,...) and so on.
+ * </dl>
+ * <p> In addition to raising the defined errors and warnings, implementations
+ * are expected to raise implementation specific errors and warnings for any
+ * other error and warning cases such as IO errors (file not found,
+ * permission denied,...) and so on.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSSerializer {
/**
- * The <code>DOMConfiguration</code> object used by the
- * <code>LSSerializer</code> when serializing a DOM node.
+ * The <code>DOMConfiguration</code> object used by the
+ * <code>LSSerializer</code> when serializing a DOM node.
* <br> In addition to the parameters recognized by the <a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
* DOMConfiguration</a> interface defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , the <code>DOMConfiguration</code> objects for
- * <code>LSSerializer</code> adds, or modifies, the following
- * parameters:
+ * , the <code>DOMConfiguration</code> objects for
+ * <code>LSSerializer</code> adds, or modifies, the following
+ * parameters:
* <dl>
* <dt><code>"canonical-form"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] Writes the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>].
+ * <dd>[<em>optional</em>] Writes the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>].
* In addition to the behavior described in "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-canonical-form'>
* canonical-form</a>" [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * , setting this parameter to <code>true</code> will set the parameters
+ * , setting this parameter to <code>true</code> will set the parameters
* "format-pretty-print", "discard-default-content", and "xml-declaration
- * ", to <code>false</code>. Setting one of those parameters to
- * <code>true</code> will set this parameter to <code>false</code>.
- * Serializing an XML 1.1 document when "canonical-form" is
+ * ", to <code>false</code>. Setting one of those parameters to
+ * <code>true</code> will set this parameter to <code>false</code>.
+ * Serializing an XML 1.1 document when "canonical-form" is
* <code>true</code> will generate a fatal error. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Do not canonicalize the output. </dd>
@@ -207,11 +207,11 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) Use the <code>Attr.specified</code> attribute to decide what attributes
- * should be discarded. Note that some implementations might use
- * whatever information available to the implementation (i.e. XML
- * schema, DTD, the <code>Attr.specified</code> attribute, and so on) to
- * determine what attributes and content to discard if this parameter is
+ * <dd>[<em>required</em>] (<em>default</em>) Use the <code>Attr.specified</code> attribute to decide what attributes
+ * should be discarded. Note that some implementations might use
+ * whatever information available to the implementation (i.e. XML
+ * schema, DTD, the <code>Attr.specified</code> attribute, and so on) to
+ * determine what attributes and content to discard if this parameter is
* set to <code>true</code>. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>]Keep all attributes and all content.</dd>
@@ -221,40 +221,40 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>optional</em>] Formatting the output by adding whitespace to produce a pretty-printed,
- * indented, human-readable form. The exact form of the transformations
- * is not specified by this specification. Pretty-printing changes the
- * content of the document and may affect the validity of the document,
+ * <dd>[<em>optional</em>] Formatting the output by adding whitespace to produce a pretty-printed,
+ * indented, human-readable form. The exact form of the transformations
+ * is not specified by this specification. Pretty-printing changes the
+ * content of the document and may affect the validity of the document,
* validating implementations should preserve validity. </dd>
* <dt>
* <code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Don't pretty-print the result. </dd>
* </dl></dd>
- * <dt>
+ * <dt>
* <code>"ignore-unknown-character-denormalizations"</code> </dt>
* <dd>
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is
- * supported, a character is encountered for which the normalization
- * properties cannot be determined, then raise a
- * <code>"unknown-character-denormalization"</code> warning (instead of
- * raising an error, if this parameter is not set) and ignore any
+ * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] is
+ * supported, a character is encountered for which the normalization
+ * properties cannot be determined, then raise a
+ * <code>"unknown-character-denormalization"</code> warning (instead of
+ * raising an error, if this parameter is not set) and ignore any
* possible denormalizations caused by these characters. </dd>
* <dt>
* <code>false</code></dt>
- * <dd>[<em>optional</em>] Report a fatal error if a character is encountered for which the
+ * <dd>[<em>optional</em>] Report a fatal error if a character is encountered for which the
* processor cannot determine the normalization properties. </dd>
* </dl></dd>
* <dt>
* <code>"normalize-characters"</code></dt>
- * <dd> This parameter is equivalent to
+ * <dd> This parameter is equivalent to
* the one defined by <code>DOMConfiguration</code> in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
- * . Unlike in the Core, the default value for this parameter is
- * <code>true</code>. While DOM implementations are not required to
- * support <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
- * normalizing</a> the characters in the document according to appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], this
+ * . Unlike in the Core, the default value for this parameter is
+ * <code>true</code>. While DOM implementations are not required to
+ * support <a href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
+ * normalizing</a> the characters in the document according to appendix E of [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], this
* parameter must be activated by default if supported. </dd>
* <dt>
* <code>"xml-declaration"</code></dt>
@@ -262,17 +262,17 @@
* <dl>
* <dt><code>true</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) If a <code>Document</code>, <code>Element</code>, or <code>Entity</code>
- * node is serialized, the XML declaration, or text declaration, should
- * be included. The version (<code>Document.xmlVersion</code> if the
- * document is a Level 3 document and the version is non-null, otherwise
- * use the value "1.0"), and the output encoding (see
- * <code>LSSerializer.write</code> for details on how to find the output
+ * node is serialized, the XML declaration, or text declaration, should
+ * be included. The version (<code>Document.xmlVersion</code> if the
+ * document is a Level 3 document and the version is non-null, otherwise
+ * use the value "1.0"), and the output encoding (see
+ * <code>LSSerializer.write</code> for details on how to find the output
* encoding) are specified in the serialized XML declaration. </dd>
* <dt>
* <code>false</code></dt>
- * <dd>[<em>required</em>] Do not serialize the XML and text declarations. Report a
- * <code>"xml-declaration-needed"</code> warning if this will cause
- * problems (i.e. the serialized data is of an XML version other than [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], or an
+ * <dd>[<em>required</em>] Do not serialize the XML and text declarations. Report a
+ * <code>"xml-declaration-needed"</code> warning if this will cause
+ * problems (i.e. the serialized data is of an XML version other than [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], or an
* encoding would be needed to be able to re-parse the serialized data). </dd>
* </dl></dd>
* </dl>
@@ -280,55 +280,55 @@
public DOMConfiguration getDomConfig();
/**
- * The end-of-line sequence of characters to be used in the XML being
- * written out. Any string is supported, but XML treats only a certain
- * set of characters sequence as end-of-line (See section 2.11,
- * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
- * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
- * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
- * serialized content is XML 1.1). Using other character sequences than
- * the recommended ones can result in a document that is either not
- * serializable or not well-formed).
- * <br> On retrieval, the default value of this attribute is the
- * implementation specific default end-of-line sequence. DOM
- * implementations should choose the default to match the usual
- * convention for text files in the environment being used.
- * Implementations must choose a default sequence that matches one of
- * those allowed by XML 1.0 or XML 1.1, depending on the serialized
- * content. Setting this attribute to <code>null</code> will reset its
- * value to the default value.
- * <br>
+ * The end-of-line sequence of characters to be used in the XML being
+ * written out. Any string is supported, but XML treats only a certain
+ * set of characters sequence as end-of-line (See section 2.11,
+ * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
+ * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
+ * serialized content is XML 1.1). Using other character sequences than
+ * the recommended ones can result in a document that is either not
+ * serializable or not well-formed).
+ * <br> On retrieval, the default value of this attribute is the
+ * implementation specific default end-of-line sequence. DOM
+ * implementations should choose the default to match the usual
+ * convention for text files in the environment being used.
+ * Implementations must choose a default sequence that matches one of
+ * those allowed by XML 1.0 or XML 1.1, depending on the serialized
+ * content. Setting this attribute to <code>null</code> will reset its
+ * value to the default value.
+ * <br>
*/
public String getNewLine();
/**
- * The end-of-line sequence of characters to be used in the XML being
- * written out. Any string is supported, but XML treats only a certain
- * set of characters sequence as end-of-line (See section 2.11,
- * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
- * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
- * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
- * serialized content is XML 1.1). Using other character sequences than
- * the recommended ones can result in a document that is either not
- * serializable or not well-formed).
- * <br> On retrieval, the default value of this attribute is the
- * implementation specific default end-of-line sequence. DOM
- * implementations should choose the default to match the usual
- * convention for text files in the environment being used.
- * Implementations must choose a default sequence that matches one of
- * those allowed by XML 1.0 or XML 1.1, depending on the serialized
- * content. Setting this attribute to <code>null</code> will reset its
- * value to the default value.
- * <br>
+ * The end-of-line sequence of characters to be used in the XML being
+ * written out. Any string is supported, but XML treats only a certain
+ * set of characters sequence as end-of-line (See section 2.11,
+ * "End-of-Line Handling" in [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
+ * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if the
+ * serialized content is XML 1.1). Using other character sequences than
+ * the recommended ones can result in a document that is either not
+ * serializable or not well-formed).
+ * <br> On retrieval, the default value of this attribute is the
+ * implementation specific default end-of-line sequence. DOM
+ * implementations should choose the default to match the usual
+ * convention for text files in the environment being used.
+ * Implementations must choose a default sequence that matches one of
+ * those allowed by XML 1.0 or XML 1.1, depending on the serialized
+ * content. Setting this attribute to <code>null</code> will reset its
+ * value to the default value.
+ * <br>
*/
public void setNewLine(String newLine);
/**
- * When the application provides a filter, the serializer will call out
- * to the filter before serializing each Node. The filter implementation
- * can choose to remove the node from the stream or to terminate the
- * serialization early.
- * <br> The filter is invoked after the operations requested by the
- * <code>DOMConfiguration</code> parameters have been applied. For
+ * When the application provides a filter, the serializer will call out
+ * to the filter before serializing each Node. The filter implementation
+ * can choose to remove the node from the stream or to terminate the
+ * serialization early.
+ * <br> The filter is invoked after the operations requested by the
+ * <code>DOMConfiguration</code> parameters have been applied. For
* example, CDATA sections won't be passed to the filter if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
* cdata-sections</a>" is set to <code>false</code>.
*
@@ -336,103 +336,103 @@
*/
public LSSerializerFilter getFilter();
/**
- * When the application provides a filter, the serializer will call out
- * to the filter before serializing each Node. The filter implementation
- * can choose to remove the node from the stream or to terminate the
- * serialization early.
- * <br> The filter is invoked after the operations requested by the
- * <code>DOMConfiguration</code> parameters have been applied. For
+ * When the application provides a filter, the serializer will call out
+ * to the filter before serializing each Node. The filter implementation
+ * can choose to remove the node from the stream or to terminate the
+ * serialization early.
+ * <br> The filter is invoked after the operations requested by the
+ * <code>DOMConfiguration</code> parameters have been applied. For
* example, CDATA sections won't be passed to the filter if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
* cdata-sections</a>" is set to <code>false</code>.
*
- * @hide
+ * @hide
*/
public void setFilter(LSSerializerFilter filter);
/**
- * Serialize the specified node as described above in the general
- * description of the <code>LSSerializer</code> interface. The output is
- * written to the supplied <code>LSOutput</code>.
- * <br> When writing to a <code>LSOutput</code>, the encoding is found by
- * looking at the encoding information that is reachable through the
- * <code>LSOutput</code> and the item to be written (or its owner
- * document) in this order:
+ * Serialize the specified node as described above in the general
+ * description of the <code>LSSerializer</code> interface. The output is
+ * written to the supplied <code>LSOutput</code>.
+ * <br> When writing to a <code>LSOutput</code>, the encoding is found by
+ * looking at the encoding information that is reachable through the
+ * <code>LSOutput</code> and the item to be written (or its owner
+ * document) in this order:
* <ol>
- * <li> <code>LSOutput.encoding</code>,
+ * <li> <code>LSOutput.encoding</code>,
* </li>
- * <li>
- * <code>Document.inputEncoding</code>,
+ * <li>
+ * <code>Document.inputEncoding</code>,
* </li>
- * <li>
- * <code>Document.xmlEncoding</code>.
+ * <li>
+ * <code>Document.xmlEncoding</code>.
* </li>
* </ol>
- * <br> If no encoding is reachable through the above properties, a
- * default encoding of "UTF-8" will be used. If the specified encoding
- * is not supported an "unsupported-encoding" fatal error is raised.
- * <br> If no output is specified in the <code>LSOutput</code>, a
- * "no-output-specified" fatal error is raised.
- * <br> The implementation is responsible of associating the appropriate
- * media type with the serialized data.
- * <br> When writing to a HTTP URI, a HTTP PUT is performed. When writing
- * to other types of URIs, the mechanism for writing the data to the URI
- * is implementation dependent.
- * @param nodeArg The node to serialize.
+ * <br> If no encoding is reachable through the above properties, a
+ * default encoding of "UTF-8" will be used. If the specified encoding
+ * is not supported an "unsupported-encoding" fatal error is raised.
+ * <br> If no output is specified in the <code>LSOutput</code>, a
+ * "no-output-specified" fatal error is raised.
+ * <br> The implementation is responsible of associating the appropriate
+ * media type with the serialized data.
+ * <br> When writing to a HTTP URI, a HTTP PUT is performed. When writing
+ * to other types of URIs, the mechanism for writing the data to the URI
+ * is implementation dependent.
+ * @param nodeArg The node to serialize.
* @param destination The destination for the serialized DOM.
- * @return Returns <code>true</code> if <code>node</code> was
- * successfully serialized. Return <code>false</code> in case the
- * normal processing stopped but the implementation kept serializing
- * the document; the result of the serialization being implementation
- * dependent then.
+ * @return Returns <code>true</code> if <code>node</code> was
+ * successfully serialized. Return <code>false</code> in case the
+ * normal processing stopped but the implementation kept serializing
+ * the document; the result of the serialization being implementation
+ * dependent then.
* @exception LSException
- * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
- * serialize the node. DOM applications should attach a
+ * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
+ * serialize the node. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
- public boolean write(Node nodeArg,
+ public boolean write(Node nodeArg,
LSOutput destination)
throws LSException;
/**
- * A convenience method that acts as if <code>LSSerializer.write</code>
- * was called with a <code>LSOutput</code> with no encoding specified
- * and <code>LSOutput.systemId</code> set to the <code>uri</code>
- * argument.
- * @param nodeArg The node to serialize.
+ * A convenience method that acts as if <code>LSSerializer.write</code>
+ * was called with a <code>LSOutput</code> with no encoding specified
+ * and <code>LSOutput.systemId</code> set to the <code>uri</code>
+ * argument.
+ * @param nodeArg The node to serialize.
* @param uri The URI to write to.
- * @return Returns <code>true</code> if <code>node</code> was
- * successfully serialized. Return <code>false</code> in case the
- * normal processing stopped but the implementation kept serializing
- * the document; the result of the serialization being implementation
- * dependent then.
+ * @return Returns <code>true</code> if <code>node</code> was
+ * successfully serialized. Return <code>false</code> in case the
+ * normal processing stopped but the implementation kept serializing
+ * the document; the result of the serialization being implementation
+ * dependent then.
* @exception LSException
- * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
- * serialize the node. DOM applications should attach a
+ * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
+ * serialize the node. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
- public boolean writeToURI(Node nodeArg,
+ public boolean writeToURI(Node nodeArg,
String uri)
throws LSException;
/**
- * Serialize the specified node as described above in the general
- * description of the <code>LSSerializer</code> interface. The output is
- * written to a <code>DOMString</code> that is returned to the caller.
- * The encoding used is the encoding of the <code>DOMString</code> type,
- * i.e. UTF-16. Note that no Byte Order Mark is generated in a
- * <code>DOMString</code> object.
- * @param nodeArg The node to serialize.
- * @return Returns the serialized data.
+ * Serialize the specified node as described above in the general
+ * description of the <code>LSSerializer</code> interface. The output is
+ * written to a <code>DOMString</code> that is returned to the caller.
+ * The encoding used is the encoding of the <code>DOMString</code> type,
+ * i.e. UTF-16. Note that no Byte Order Mark is generated in a
+ * <code>DOMString</code> object.
+ * @param nodeArg The node to serialize.
+ * @return Returns the serialized data.
* @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to
- * fit in a <code>DOMString</code>.
+ * DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to
+ * fit in a <code>DOMString</code>.
* @exception LSException
- * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
- * serialize the node. DOM applications should attach a
+ * SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
+ * serialize the node. DOM applications should attach a
* <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * error-handler</a>" if they wish to get details on the error.
*/
public String writeToString(Node nodeArg)
throws DOMException, LSException;
diff --git a/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java b/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
index 9e76b37..0a03810 100644
--- a/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
+++ b/luni/src/main/java/org/w3c/dom/ls/LSSerializerFilter.java
@@ -15,30 +15,30 @@
import org.w3c.dom.traversal.NodeFilter;
/**
- * <code>LSSerializerFilter</code>s provide applications the ability to
- * examine nodes as they are being serialized and decide what nodes should
- * be serialized or not. The <code>LSSerializerFilter</code> interface is
+ * <code>LSSerializerFilter</code>s provide applications the ability to
+ * examine nodes as they are being serialized and decide what nodes should
+ * be serialized or not. The <code>LSSerializerFilter</code> interface is
* based on the <code>NodeFilter</code> interface defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and Range</a>]
- * .
- * <p> <code>Document</code>, <code>DocumentType</code>,
+ * .
+ * <p> <code>Document</code>, <code>DocumentType</code>,
* <code>DocumentFragment</code>, <code>Notation</code>, <code>Entity</code>
- * , and children of <code>Attr</code> nodes are not passed to the filter.
- * The child nodes of an <code>EntityReference</code> node are only passed
- * to the filter if the <code>EntityReference</code> node is skipped by the
- * method <code>LSParserFilter.acceptNode()</code>.
- * <p> When serializing an <code>Element</code>, the element is passed to the
- * filter before any of its attributes are passed to the filter. Namespace
+ * , and children of <code>Attr</code> nodes are not passed to the filter.
+ * The child nodes of an <code>EntityReference</code> node are only passed
+ * to the filter if the <code>EntityReference</code> node is skipped by the
+ * method <code>LSParserFilter.acceptNode()</code>.
+ * <p> When serializing an <code>Element</code>, the element is passed to the
+ * filter before any of its attributes are passed to the filter. Namespace
* declaration attributes, and default attributes (except in the case when "
- * discard-default-content" is set to <code>false</code>), are never passed
- * to the filter.
- * <p> The result of any attempt to modify a node passed to a
- * <code>LSSerializerFilter</code> is implementation dependent.
- * <p> DOM applications must not raise exceptions in a filter. The effect of
- * throwing exceptions from a filter is DOM implementation dependent.
- * <p> For efficiency, a node passed to the filter may not be the same as the
- * one that is actually in the tree. And the actual node (node object
- * identity) may be reused during the process of filtering and serializing a
- * document.
+ * discard-default-content" is set to <code>false</code>), are never passed
+ * to the filter.
+ * <p> The result of any attempt to modify a node passed to a
+ * <code>LSSerializerFilter</code> is implementation dependent.
+ * <p> DOM applications must not raise exceptions in a filter. The effect of
+ * throwing exceptions from a filter is DOM implementation dependent.
+ * <p> For efficiency, a node passed to the filter may not be the same as the
+ * one that is actually in the tree. And the actual node (node object
+ * identity) may be reused during the process of filtering and serializing a
+ * document.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
and Save Specification</a>.
*
@@ -46,19 +46,19 @@
*/
public interface LSSerializerFilter extends NodeFilter {
/**
- * Tells the <code>LSSerializer</code> what types of nodes to show to the
- * filter. If a node is not shown to the filter using this attribute, it
- * is automatically serialized. See <code>NodeFilter</code> for
+ * Tells the <code>LSSerializer</code> what types of nodes to show to the
+ * filter. If a node is not shown to the filter using this attribute, it
+ * is automatically serialized. See <code>NodeFilter</code> for
* definition of the constants. The constants <code>SHOW_DOCUMENT</code>
* , <code>SHOW_DOCUMENT_TYPE</code>, <code>SHOW_DOCUMENT_FRAGMENT</code>
- * , <code>SHOW_NOTATION</code>, and <code>SHOW_ENTITY</code> are
- * meaningless here, such nodes will never be passed to a
- * <code>LSSerializerFilter</code>.
+ * , <code>SHOW_NOTATION</code>, and <code>SHOW_ENTITY</code> are
+ * meaningless here, such nodes will never be passed to a
+ * <code>LSSerializerFilter</code>.
* <br> Unlike [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and Range</a>]
- * , the <code>SHOW_ATTRIBUTE</code> constant indicates that the
- * <code>Attr</code> nodes are shown and passed to the filter.
+ * , the <code>SHOW_ATTRIBUTE</code> constant indicates that the
+ * <code>Attr</code> nodes are shown and passed to the filter.
* <br> The constants used here are defined in [<a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2 Traversal and Range</a>]
- * .
+ * .
*/
public int getWhatToShow();
diff --git a/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java b/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
index 4d179e7..12f6377 100644
--- a/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
+++ b/luni/src/main/java/org/w3c/dom/traversal/NodeFilter.java
@@ -15,19 +15,19 @@
import org.w3c.dom.Node;
/**
- * Filters are objects that know how to "filter out" nodes. If a
- * <code>NodeIterator</code> or <code>TreeWalker</code> is given a
- * <code>NodeFilter</code>, it applies the filter before it returns the next
- * node. If the filter says to accept the node, the traversal logic returns
- * it; otherwise, traversal looks for the next node and pretends that the
+ * Filters are objects that know how to "filter out" nodes. If a
+ * <code>NodeIterator</code> or <code>TreeWalker</code> is given a
+ * <code>NodeFilter</code>, it applies the filter before it returns the next
+ * node. If the filter says to accept the node, the traversal logic returns
+ * it; otherwise, traversal looks for the next node and pretends that the
* node that was rejected was not there.
- * <p>The DOM does not provide any filters. <code>NodeFilter</code> is just an
- * interface that users can implement to provide their own filters.
- * <p><code>NodeFilters</code> do not need to know how to traverse from node
- * to node, nor do they need to know anything about the data structure that
- * is being traversed. This makes it very easy to write filters, since the
- * only thing they have to know how to do is evaluate a single node. One
- * filter may be used with a number of different kinds of traversals,
+ * <p>The DOM does not provide any filters. <code>NodeFilter</code> is just an
+ * interface that users can implement to provide their own filters.
+ * <p><code>NodeFilters</code> do not need to know how to traverse from node
+ * to node, nor do they need to know anything about the data structure that
+ * is being traversed. This makes it very easy to write filters, since the
+ * only thing they have to know how to do is evaluate a single node. One
+ * filter may be used with a number of different kinds of traversals,
* encouraging code reuse.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2
@@ -37,25 +37,25 @@
public interface NodeFilter {
// Constants returned by acceptNode
/**
- * Accept the node. Navigation methods defined for
- * <code>NodeIterator</code> or <code>TreeWalker</code> will return this
+ * Accept the node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will return this
* node.
*/
public static final short FILTER_ACCEPT = 1;
/**
- * Reject the node. Navigation methods defined for
- * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
- * this node. For <code>TreeWalker</code>, the children of this node
- * will also be rejected. <code>NodeIterators</code> treat this as a
+ * Reject the node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
+ * this node. For <code>TreeWalker</code>, the children of this node
+ * will also be rejected. <code>NodeIterators</code> treat this as a
* synonym for <code>FILTER_SKIP</code>.
*/
public static final short FILTER_REJECT = 2;
/**
- * Skip this single node. Navigation methods defined for
- * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
- * this node. For both <code>NodeIterator</code> and
- * <code>TreeWalker</code>, the children of this node will still be
- * considered.
+ * Skip this single node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
+ * this node. For both <code>NodeIterator</code> and
+ * <code>TreeWalker</code>, the children of this node will still be
+ * considered.
*/
public static final short FILTER_SKIP = 3;
@@ -69,11 +69,11 @@
*/
public static final int SHOW_ELEMENT = 0x00000001;
/**
- * Show <code>Attr</code> nodes. This is meaningful only when creating an
- * <code>NodeIterator</code> or <code>TreeWalker</code> with an
- * attribute node as its <code>root</code>; in this case, it means that
- * the attribute node will appear in the first position of the iteration
- * or traversal. Since attributes are never children of other nodes,
+ * Show <code>Attr</code> nodes. This is meaningful only when creating an
+ * <code>NodeIterator</code> or <code>TreeWalker</code> with an
+ * attribute node as its <code>root</code>; in this case, it means that
+ * the attribute node will appear in the first position of the iteration
+ * or traversal. Since attributes are never children of other nodes,
* they do not appear when traversing over the document tree.
*/
public static final int SHOW_ATTRIBUTE = 0x00000002;
@@ -90,12 +90,12 @@
*/
public static final int SHOW_ENTITY_REFERENCE = 0x00000010;
/**
- * Show <code>Entity</code> nodes. This is meaningful only when creating
- * an <code>NodeIterator</code> or <code>TreeWalker</code> with an
- * <code>Entity</code> node as its <code>root</code>; in this case, it
- * means that the <code>Entity</code> node will appear in the first
- * position of the traversal. Since entities are not part of the
- * document tree, they do not appear when traversing over the document
+ * Show <code>Entity</code> nodes. This is meaningful only when creating
+ * an <code>NodeIterator</code> or <code>TreeWalker</code> with an
+ * <code>Entity</code> node as its <code>root</code>; in this case, it
+ * means that the <code>Entity</code> node will appear in the first
+ * position of the traversal. Since entities are not part of the
+ * document tree, they do not appear when traversing over the document
* tree.
*/
public static final int SHOW_ENTITY = 0x00000020;
@@ -120,25 +120,25 @@
*/
public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
/**
- * Show <code>Notation</code> nodes. This is meaningful only when creating
- * an <code>NodeIterator</code> or <code>TreeWalker</code> with a
- * <code>Notation</code> node as its <code>root</code>; in this case, it
- * means that the <code>Notation</code> node will appear in the first
- * position of the traversal. Since notations are not part of the
- * document tree, they do not appear when traversing over the document
+ * Show <code>Notation</code> nodes. This is meaningful only when creating
+ * an <code>NodeIterator</code> or <code>TreeWalker</code> with a
+ * <code>Notation</code> node as its <code>root</code>; in this case, it
+ * means that the <code>Notation</code> node will appear in the first
+ * position of the traversal. Since notations are not part of the
+ * document tree, they do not appear when traversing over the document
* tree.
*/
public static final int SHOW_NOTATION = 0x00000800;
/**
- * Test whether a specified node is visible in the logical view of a
- * <code>TreeWalker</code> or <code>NodeIterator</code>. This function
- * will be called by the implementation of <code>TreeWalker</code> and
- * <code>NodeIterator</code>; it is not normally called directly from
- * user code. (Though you could do so if you wanted to use the same
+ * Test whether a specified node is visible in the logical view of a
+ * <code>TreeWalker</code> or <code>NodeIterator</code>. This function
+ * will be called by the implementation of <code>TreeWalker</code> and
+ * <code>NodeIterator</code>; it is not normally called directly from
+ * user code. (Though you could do so if you wanted to use the same
* filter to guide your own application logic.)
* @param n The node to check to see if it passes the filter or not.
- * @return A constant to determine whether the node is accepted,
+ * @return A constant to determine whether the node is accepted,
* rejected, or skipped, as defined above.
*/
public short acceptNode(Node n);
diff --git a/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java b/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
index e55cd9f..cbf2390 100644
--- a/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
+++ b/luni/src/main/java/org/w3c/dom/traversal/NodeIterator.java
@@ -16,14 +16,14 @@
import org.w3c.dom.DOMException;
/**
- * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
- * the set of nodes in a <code>NodeList</code>, the document subtree
- * governed by a particular <code>Node</code>, the results of a query, or
- * any other set of nodes. The set of nodes to be iterated is determined by
- * the implementation of the <code>NodeIterator</code>. DOM Level 2
- * specifies a single <code>NodeIterator</code> implementation for
- * document-order traversal of a document subtree. Instances of these
- * <code>NodeIterators</code> are created by calling
+ * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
+ * the set of nodes in a <code>NodeList</code>, the document subtree
+ * governed by a particular <code>Node</code>, the results of a query, or
+ * any other set of nodes. The set of nodes to be iterated is determined by
+ * the implementation of the <code>NodeIterator</code>. DOM Level 2
+ * specifies a single <code>NodeIterator</code> implementation for
+ * document-order traversal of a document subtree. Instances of these
+ * <code>NodeIterators</code> are created by calling
* <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2
@@ -32,18 +32,18 @@
*/
public interface NodeIterator {
/**
- * The root node of the <code>NodeIterator</code>, as specified when it
+ * The root node of the <code>NodeIterator</code>, as specified when it
* was created.
*/
public Node getRoot();
/**
- * This attribute determines which node types are presented via the
- * <code>NodeIterator</code>. The available set of constants is defined
- * in the <code>NodeFilter</code> interface. Nodes not accepted by
- * <code>whatToShow</code> will be skipped, but their children may still
- * be considered. Note that this skip takes precedence over the filter,
- * if any.
+ * This attribute determines which node types are presented via the
+ * <code>NodeIterator</code>. The available set of constants is defined
+ * in the <code>NodeFilter</code> interface. Nodes not accepted by
+ * <code>whatToShow</code> will be skipped, but their children may still
+ * be considered. Note that this skip takes precedence over the filter,
+ * if any.
*/
public int getWhatToShow();
@@ -53,57 +53,57 @@
public NodeFilter getFilter();
/**
- * The value of this flag determines whether the children of entity
- * reference nodes are visible to the <code>NodeIterator</code>. If
- * false, these children and their descendants will be rejected. Note
- * that this rejection takes precedence over <code>whatToShow</code> and
- * the filter. Also note that this is currently the only situation where
- * <code>NodeIterators</code> may reject a complete subtree rather than
- * skipping individual nodes.
+ * The value of this flag determines whether the children of entity
+ * reference nodes are visible to the <code>NodeIterator</code>. If
+ * false, these children and their descendants will be rejected. Note
+ * that this rejection takes precedence over <code>whatToShow</code> and
+ * the filter. Also note that this is currently the only situation where
+ * <code>NodeIterators</code> may reject a complete subtree rather than
+ * skipping individual nodes.
* <br>
- * <br> To produce a view of the document that has entity references
- * expanded and does not expose the entity reference node itself, use
- * the <code>whatToShow</code> flags to hide the entity reference node
- * and set <code>expandEntityReferences</code> to true when creating the
- * <code>NodeIterator</code>. To produce a view of the document that has
- * entity reference nodes but no entity expansion, use the
- * <code>whatToShow</code> flags to show the entity reference node and
+ * <br> To produce a view of the document that has entity references
+ * expanded and does not expose the entity reference node itself, use
+ * the <code>whatToShow</code> flags to hide the entity reference node
+ * and set <code>expandEntityReferences</code> to true when creating the
+ * <code>NodeIterator</code>. To produce a view of the document that has
+ * entity reference nodes but no entity expansion, use the
+ * <code>whatToShow</code> flags to show the entity reference node and
* set <code>expandEntityReferences</code> to false.
*/
public boolean getExpandEntityReferences();
/**
- * Returns the next node in the set and advances the position of the
- * <code>NodeIterator</code> in the set. After a
- * <code>NodeIterator</code> is created, the first call to
+ * Returns the next node in the set and advances the position of the
+ * <code>NodeIterator</code> in the set. After a
+ * <code>NodeIterator</code> is created, the first call to
* <code>nextNode()</code> returns the first node in the set.
- * @return The next <code>Node</code> in the set being iterated over, or
+ * @return The next <code>Node</code> in the set being iterated over, or
* <code>null</code> if there are no more members in that set.
* @exception DOMException
- * INVALID_STATE_ERR: Raised if this method is called after the
+ * INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
public Node nextNode()
throws DOMException;
/**
- * Returns the previous node in the set and moves the position of the
+ * Returns the previous node in the set and moves the position of the
* <code>NodeIterator</code> backwards in the set.
- * @return The previous <code>Node</code> in the set being iterated over,
- * or <code>null</code> if there are no more members in that set.
+ * @return The previous <code>Node</code> in the set being iterated over,
+ * or <code>null</code> if there are no more members in that set.
* @exception DOMException
- * INVALID_STATE_ERR: Raised if this method is called after the
+ * INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
public Node previousNode()
throws DOMException;
/**
- * Detaches the <code>NodeIterator</code> from the set which it iterated
- * over, releasing any computational resources and placing the
- * <code>NodeIterator</code> in the INVALID state. After
- * <code>detach</code> has been invoked, calls to <code>nextNode</code>
- * or <code>previousNode</code> will raise the exception
+ * Detaches the <code>NodeIterator</code> from the set which it iterated
+ * over, releasing any computational resources and placing the
+ * <code>NodeIterator</code> in the INVALID state. After
+ * <code>detach</code> has been invoked, calls to <code>nextNode</code>
+ * or <code>previousNode</code> will raise the exception
* INVALID_STATE_ERR.
*/
public void detach();
diff --git a/luni/src/main/java/org/xml/sax/AttributeList.java b/luni/src/main/java/org/xml/sax/AttributeList.java
index 9285eac..253664c 100644
--- a/luni/src/main/java/org/xml/sax/AttributeList.java
+++ b/luni/src/main/java/org/xml/sax/AttributeList.java
@@ -75,7 +75,7 @@
////////////////////////////////////////////////////////////////////
// Iteration methods.
////////////////////////////////////////////////////////////////////
-
+
/**
* Return the number of attributes in this list.
@@ -85,11 +85,11 @@
* declared or specified. The number of attributes may be
* zero.</p>
*
- * @return The number of attributes in the list.
+ * @return The number of attributes in the list.
*/
public abstract int getLength ();
-
-
+
+
/**
* Return the name of an attribute in this list (by position).
*
@@ -104,11 +104,11 @@
* @param i The index of the attribute in the list (starting at 0).
* @return The name of the indexed attribute, or null
* if the index is out of range.
- * @see #getLength
+ * @see #getLength
*/
public abstract String getName (int i);
-
-
+
+
/**
* Return the type of an attribute in the list (by position).
*
@@ -127,12 +127,12 @@
* @param i The index of the attribute in the list (starting at 0).
* @return The attribute type as a string, or
* null if the index is out of range.
- * @see #getLength
+ * @see #getLength
* @see #getType(java.lang.String)
*/
public abstract String getType (int i);
-
-
+
+
/**
* Return the value of an attribute in the list (by position).
*
@@ -153,8 +153,8 @@
////////////////////////////////////////////////////////////////////
// Lookup methods.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Return the type of an attribute in the list (by name).
*
@@ -170,8 +170,8 @@
* @see #getType(int)
*/
public abstract String getType (String name);
-
-
+
+
/**
* Return the value of an attribute in the list (by name).
*
@@ -187,7 +187,7 @@
* @see #getValue(int)
*/
public abstract String getValue (String name);
-
+
}
// end of AttributeList.java
diff --git a/luni/src/main/java/org/xml/sax/Attributes.java b/luni/src/main/java/org/xml/sax/Attributes.java
index b25432d..9997d6b 100644
--- a/luni/src/main/java/org/xml/sax/Attributes.java
+++ b/luni/src/main/java/org/xml/sax/Attributes.java
@@ -29,8 +29,8 @@
* <p>The list will not contain attributes that were declared
* #IMPLIED but not specified in the start tag. It will also not
* contain attributes used as Namespace declarations (xmlns*) unless
- * the <code>http://xml.org/sax/features/namespace-prefixes</code>
- * feature is set to <var>true</var> (it is <var>false</var> by
+ * the <code>http://xml.org/sax/features/namespace-prefixes</code>
+ * feature is set to <var>true</var> (it is <var>false</var> by
* default).
* Because SAX2 conforms to the original "Namespaces in XML"
* recommendation, it normally does not
@@ -53,8 +53,8 @@
* available.</p>
*
* <p>This interface replaces the now-deprecated SAX1 {@link
- * org.xml.sax.AttributeList AttributeList} interface, which does not
- * contain Namespace support. In addition to Namespace support, it
+ * org.xml.sax.AttributeList AttributeList} interface, which does not
+ * contain Namespace support. In addition to Namespace support, it
* adds the <var>getIndex</var> methods (below).</p>
*
* <p>The order of attributes in the list is unspecified, and will
diff --git a/luni/src/main/java/org/xml/sax/ContentHandler.java b/luni/src/main/java/org/xml/sax/ContentHandler.java
index db66c0d..513d187 100644
--- a/luni/src/main/java/org/xml/sax/ContentHandler.java
+++ b/luni/src/main/java/org/xml/sax/ContentHandler.java
@@ -18,11 +18,11 @@
* </blockquote>
*
* <p>This is the main interface that most SAX applications
- * implement: if the application needs to be informed of basic parsing
- * events, it implements this interface and registers an instance with
- * the SAX parser using the {@link org.xml.sax.XMLReader#setContentHandler
- * setContentHandler} method. The parser uses the instance to report
- * basic document-related events like the start and end of elements
+ * implement: if the application needs to be informed of basic parsing
+ * events, it implements this interface and registers an instance with
+ * the SAX parser using the {@link org.xml.sax.XMLReader#setContentHandler
+ * setContentHandler} method. The parser uses the instance to report
+ * basic document-related events like the start and end of elements
* and character data.</p>
*
* <p>The order of events in this interface is very important, and
@@ -36,7 +36,7 @@
* and for reporting skipped entities (in non-validating XML
* processors).</p>
*
- * <p>Implementors should note that there is also a
+ * <p>Implementors should note that there is also a
* <code>ContentHandler</code> class in the <code>java.net</code>
* package; that means that it's probably a bad idea to do</p>
*
@@ -92,7 +92,7 @@
* Receive notification of the beginning of a document.
*
* <p>The SAX parser will invoke this method only once, before any
- * other event callbacks (except for {@link #setDocumentLocator
+ * other event callbacks (except for {@link #setDocumentLocator
* setDocumentLocator}).</p>
*
* @throws org.xml.sax.SAXException any SAX exception, possibly
@@ -132,7 +132,7 @@
* Begin the scope of a prefix-URI Namespace mapping.
*
* <p>The information from this event is not necessary for
- * normal Namespace processing: the SAX XML reader will
+ * normal Namespace processing: the SAX XML reader will
* automatically replace prefixes for element and attribute
* names when the <code>http://xml.org/sax/features/namespaces</code>
* feature is <var>true</var> (the default).</p>
@@ -147,11 +147,11 @@
* <p>Note that start/endPrefixMapping events are not
* guaranteed to be properly nested relative to each other:
* all startPrefixMapping events will occur immediately before the
- * corresponding {@link #startElement startElement} event,
+ * corresponding {@link #startElement startElement} event,
* and all {@link #endPrefixMapping endPrefixMapping}
* events will occur immediately after the corresponding
* {@link #endElement endElement} event,
- * but their order is not otherwise
+ * but their order is not otherwise
* guaranteed.</p>
*
* <p>There should never be start/endPrefixMapping events for the
@@ -173,9 +173,9 @@
/**
* End the scope of a prefix-URI mapping.
*
- * <p>See {@link #startPrefixMapping startPrefixMapping} for
+ * <p>See {@link #startPrefixMapping startPrefixMapping} for
* details. These events will always occur immediately after the
- * corresponding {@link #endElement endElement} event, but the order of
+ * corresponding {@link #endElement endElement} event, but the order of
* {@link #endPrefixMapping endPrefixMapping} events is not otherwise
* guaranteed.</p>
*
@@ -215,7 +215,7 @@
* properties:</p>
*
* <ul>
- * <li>the Namespace URI and local name are required when
+ * <li>the Namespace URI and local name are required when
* the namespaces property is <var>true</var> (the default), and are
* optional when the namespaces property is <var>false</var> (if one is
* specified, both must be);</li>
@@ -230,7 +230,7 @@
* will contain attributes used for Namespace declarations
* (xmlns* attributes) only if the
* <code>http://xml.org/sax/features/namespace-prefixes</code>
- * property is true (it is false by default, and support for a
+ * property is true (it is false by default, and support for a
* true value is optional).</p>
*
* <p>Like {@link #characters characters()}, attribute values may have
@@ -264,7 +264,7 @@
*
* <p>The SAX parser will invoke this method at the end of every
* element in the XML document; there will be a corresponding
- * {@link #startElement startElement} event for every endElement
+ * {@link #startElement startElement} event for every endElement
* event (even when the element is empty).</p>
*
* <p>For information on the names, see startElement.</p>
@@ -317,7 +317,7 @@
*
* <p>Note that some parsers will report whitespace in element
* content using the {@link #ignorableWhitespace ignorableWhitespace}
- * method rather than this one (validating parsers <em>must</em>
+ * method rather than this one (validating parsers <em>must</em>
* do so).</p>
*
* @param ch the characters from the XML document
@@ -325,7 +325,7 @@
* @param length the number of characters to read from the array
* @throws org.xml.sax.SAXException any SAX exception, possibly
* wrapping another exception
- * @see #ignorableWhitespace
+ * @see #ignorableWhitespace
* @see org.xml.sax.Locator
*/
public void characters (char ch[], int start, int length)
@@ -405,7 +405,7 @@
* <code>http://xml.org/sax/features/external-parameter-entities</code>
* properties.</p>
*
- * @param name the name of the skipped entity. If it is a
+ * @param name the name of the skipped entity. If it is a
* parameter entity, the name will begin with '%', and if
* it is the external DTD subset, it will be the string
* "[dtd]"
diff --git a/luni/src/main/java/org/xml/sax/DTDHandler.java b/luni/src/main/java/org/xml/sax/DTDHandler.java
index 13d5eee..f102792 100644
--- a/luni/src/main/java/org/xml/sax/DTDHandler.java
+++ b/luni/src/main/java/org/xml/sax/DTDHandler.java
@@ -16,10 +16,10 @@
* </blockquote>
*
* <p>If a SAX application needs information about notations and
- * unparsed entities, then the application implements this
- * interface and registers an instance with the SAX parser using
- * the parser's setDTDHandler method. The parser uses the
- * instance to report notation and unparsed entity declarations to
+ * unparsed entities, then the application implements this
+ * interface and registers an instance with the SAX parser using
+ * the parser's setDTDHandler method. The parser uses the
+ * instance to report notation and unparsed entity declarations to
* the application.</p>
*
* <p>Note that this interface includes only those DTD events that
@@ -35,7 +35,7 @@
* used, these events must also be reported before the endDTD event.)
* </p>
*
- * <p>It is up to the application to store the information for
+ * <p>It is up to the application to store the information for
* future use (perhaps in a hash table or object tree).
* If the application encounters attributes of type "NOTATION",
* "ENTITY", or "ENTITIES", it can use the information that it
@@ -48,8 +48,8 @@
* @see org.xml.sax.XMLReader#setDTDHandler
*/
public interface DTDHandler {
-
-
+
+
/**
* Receive notification of a notation declaration event.
*
@@ -81,16 +81,16 @@
String publicId,
String systemId)
throws SAXException;
-
-
+
+
/**
* Receive notification of an unparsed entity declaration event.
*
* <p>Note that the notation name corresponds to a notation
- * reported by the {@link #notationDecl notationDecl} event.
- * It is up to the application to record the entity for later
+ * reported by the {@link #notationDecl notationDecl} event.
+ * It is up to the application to record the entity for later
* reference, if necessary;
- * unparsed entities may appear as attribute values.
+ * unparsed entities may appear as attribute values.
* </p>
*
* <p>If the system identifier is a URL, the parser must resolve it
@@ -111,7 +111,7 @@
String systemId,
String notationName)
throws SAXException;
-
+
}
// end of DTDHandler.java
diff --git a/luni/src/main/java/org/xml/sax/DocumentHandler.java b/luni/src/main/java/org/xml/sax/DocumentHandler.java
index 500fe4c..651da78 100644
--- a/luni/src/main/java/org/xml/sax/DocumentHandler.java
+++ b/luni/src/main/java/org/xml/sax/DocumentHandler.java
@@ -45,8 +45,8 @@
* @see org.xml.sax.HandlerBase
*/
public interface DocumentHandler {
-
-
+
+
/**
* Receive an object for locating the origin of SAX document events.
*
@@ -73,8 +73,8 @@
* @see org.xml.sax.Locator
*/
public abstract void setDocumentLocator (Locator locator);
-
-
+
+
/**
* Receive notification of the beginning of a document.
*
@@ -87,8 +87,8 @@
*/
public abstract void startDocument ()
throws SAXException;
-
-
+
+
/**
* Receive notification of the end of a document.
*
@@ -103,8 +103,8 @@
*/
public abstract void endDocument ()
throws SAXException;
-
-
+
+
/**
* Receive notification of the beginning of an element.
*
@@ -125,12 +125,12 @@
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
* @see #endElement
- * @see org.xml.sax.AttributeList
+ * @see org.xml.sax.AttributeList
*/
public abstract void startElement (String name, AttributeList atts)
throws SAXException;
-
-
+
+
/**
* Receive notification of the end of an element.
*
@@ -148,8 +148,8 @@
*/
public abstract void endElement (String name)
throws SAXException;
-
-
+
+
/**
* Receive notification of character data.
*
@@ -172,13 +172,13 @@
* @param length The number of characters to read from the array.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
- * @see #ignorableWhitespace
+ * @see #ignorableWhitespace
* @see org.xml.sax.Locator
*/
public abstract void characters (char ch[], int start, int length)
throws SAXException;
-
-
+
+
/**
* Receive notification of ignorable whitespace in element content.
*
@@ -205,8 +205,8 @@
*/
public abstract void ignorableWhitespace (char ch[], int start, int length)
throws SAXException;
-
-
+
+
/**
* Receive notification of a processing instruction.
*
@@ -226,7 +226,7 @@
*/
public abstract void processingInstruction (String target, String data)
throws SAXException;
-
+
}
// end of DocumentHandler.java
diff --git a/luni/src/main/java/org/xml/sax/EntityResolver.java b/luni/src/main/java/org/xml/sax/EntityResolver.java
index 06ac725..44ef8b8 100644
--- a/luni/src/main/java/org/xml/sax/EntityResolver.java
+++ b/luni/src/main/java/org/xml/sax/EntityResolver.java
@@ -67,8 +67,8 @@
* @see org.xml.sax.InputSource
*/
public interface EntityResolver {
-
-
+
+
/**
* Allow the application to resolve external entities.
*
@@ -113,7 +113,7 @@
public abstract InputSource resolveEntity (String publicId,
String systemId)
throws SAXException, IOException;
-
+
}
// end of EntityResolver.java
diff --git a/luni/src/main/java/org/xml/sax/ErrorHandler.java b/luni/src/main/java/org/xml/sax/ErrorHandler.java
index e4e4206..3898f03 100644
--- a/luni/src/main/java/org/xml/sax/ErrorHandler.java
+++ b/luni/src/main/java/org/xml/sax/ErrorHandler.java
@@ -29,12 +29,12 @@
* In order to detect validity errors, an ErrorHandler that does something
* with {@link #error error()} calls must be registered.</p>
*
- * <p>For XML processing errors, a SAX driver must use this interface
- * in preference to throwing an exception: it is up to the application
- * to decide whether to throw an exception for different types of
- * errors and warnings. Note, however, that there is no requirement that
- * the parser continue to report additional errors after a call to
- * {@link #fatalError fatalError}. In other words, a SAX driver class
+ * <p>For XML processing errors, a SAX driver must use this interface
+ * in preference to throwing an exception: it is up to the application
+ * to decide whether to throw an exception for different types of
+ * errors and warnings. Note, however, that there is no requirement that
+ * the parser continue to report additional errors after a call to
+ * {@link #fatalError fatalError}. In other words, a SAX driver class
* may throw an exception after reporting any fatalError.
* Also parsers may throw appropriate exceptions for non-XML errors.
* For example, {@link XMLReader#parse XMLReader.parse()} would throw
@@ -44,11 +44,11 @@
* @author David Megginson
* @version 2.0.1+ (sax2r3pre1)
* @see org.xml.sax.XMLReader#setErrorHandler
- * @see org.xml.sax.SAXParseException
+ * @see org.xml.sax.SAXParseException
*/
public interface ErrorHandler {
-
-
+
+
/**
* Receive notification of a warning.
*
@@ -68,12 +68,12 @@
* SAX parse exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
- * @see org.xml.sax.SAXParseException
+ * @see org.xml.sax.SAXParseException
*/
public abstract void warning (SAXParseException exception)
throws SAXException;
-
-
+
+
/**
* Receive notification of a recoverable error.
*
@@ -97,12 +97,12 @@
* SAX parse exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
- * @see org.xml.sax.SAXParseException
+ * @see org.xml.sax.SAXParseException
*/
public abstract void error (SAXParseException exception)
throws SAXException;
-
-
+
+
/**
* Receive notification of a non-recoverable error.
*
@@ -126,14 +126,14 @@
* other events once this method has been invoked.</p>
*
* @param exception The error information encapsulated in a
- * SAX parse exception.
+ * SAX parse exception.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
* @see org.xml.sax.SAXParseException
*/
public abstract void fatalError (SAXParseException exception)
throws SAXException;
-
+
}
// end of ErrorHandler.java
diff --git a/luni/src/main/java/org/xml/sax/HandlerBase.java b/luni/src/main/java/org/xml/sax/HandlerBase.java
index 15ea2d4..303468f 100644
--- a/luni/src/main/java/org/xml/sax/HandlerBase.java
+++ b/luni/src/main/java/org/xml/sax/HandlerBase.java
@@ -45,12 +45,12 @@
public class HandlerBase
implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
{
-
+
////////////////////////////////////////////////////////////////////
// Default implementation of the EntityResolver interface.
////////////////////////////////////////////////////////////////////
-
+
/**
* Resolve an external entity.
*
@@ -62,7 +62,7 @@
*
* @param publicId The public identifer, or null if none is
* available.
- * @param systemId The system identifier provided in the XML
+ * @param systemId The system identifier provided in the XML
* document.
* @return The new input source, or null to require the
* default behaviour.
@@ -75,14 +75,14 @@
{
return null;
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of DTDHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive notification of a notation declaration.
*
@@ -100,8 +100,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of an unparsed entity declaration.
*
@@ -121,14 +121,14 @@
{
// no op
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of DocumentHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive a Locator object for document events.
*
@@ -144,8 +144,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the beginning of the document.
*
@@ -163,8 +163,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the end of the document.
*
@@ -182,8 +182,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the start of an element.
*
@@ -203,8 +203,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the end of an element.
*
@@ -223,8 +223,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of character data inside an element.
*
@@ -246,8 +246,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of ignorable whitespace in element content.
*
@@ -269,8 +269,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of a processing instruction.
*
@@ -291,14 +291,14 @@
{
// no op
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of the ErrorHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive notification of a parser warning.
*
@@ -318,8 +318,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of a recoverable parser error.
*
@@ -339,8 +339,8 @@
{
// no op
}
-
-
+
+
/**
* Report a fatal XML parsing error.
*
@@ -363,7 +363,7 @@
{
throw e;
}
-
+
}
// end of HandlerBase.java
diff --git a/luni/src/main/java/org/xml/sax/InputSource.java b/luni/src/main/java/org/xml/sax/InputSource.java
index b1342ee..d886974 100644
--- a/luni/src/main/java/org/xml/sax/InputSource.java
+++ b/luni/src/main/java/org/xml/sax/InputSource.java
@@ -43,7 +43,7 @@
* identifier.</p>
*
* <p>An InputSource object belongs to the application: the SAX parser
- * shall never modify it in any way (it may modify a copy if
+ * shall never modify it in any way (it may modify a copy if
* necessary). However, standard processing of both byte and
* character streams is to close them on as part of end-of-parse cleanup,
* so applications should not attempt to re-use such streams after they
@@ -58,7 +58,7 @@
* @see java.io.Reader
*/
public class InputSource {
-
+
/**
* Zero-argument default constructor.
*
@@ -71,12 +71,12 @@
public InputSource ()
{
}
-
-
+
+
/**
* Create a new input source with a system identifier.
*
- * <p>Applications may use setPublicId to include a
+ * <p>Applications may use setPublicId to include a
* public identifier as well, or setEncoding to specify
* the character encoding, if known.</p>
*
@@ -94,13 +94,13 @@
{
setSystemId(systemId);
}
-
-
+
+
/**
* Create a new input source with a byte stream.
*
- * <p>Application writers should use setSystemId() to provide a base
- * for resolving relative URIs, may use setPublicId to include a
+ * <p>Application writers should use setSystemId() to provide a base
+ * for resolving relative URIs, may use setPublicId to include a
* public identifier, and may use setEncoding to specify the object's
* character encoding.</p>
*
@@ -115,13 +115,13 @@
{
setByteStream(byteStream);
}
-
-
+
+
/**
* Create a new input source with a character stream.
*
- * <p>Application writers should use setSystemId() to provide a base
- * for resolving relative URIs, and may use setPublicId to include a
+ * <p>Application writers should use setSystemId() to provide a base
+ * for resolving relative URIs, and may use setPublicId to include a
* public identifier.</p>
*
* <p>The character stream shall not include a byte order mark.</p>
@@ -136,8 +136,8 @@
{
setCharacterStream(characterStream);
}
-
-
+
+
/**
* Set the public identifier for this input source.
*
@@ -154,8 +154,8 @@
{
this.publicId = publicId;
}
-
-
+
+
/**
* Get the public identifier for this input source.
*
@@ -166,8 +166,8 @@
{
return publicId;
}
-
-
+
+
/**
* Set the system identifier for this input source.
*
@@ -195,8 +195,8 @@
{
this.systemId = systemId;
}
-
-
+
+
/**
* Get the system identifier for this input source.
*
@@ -213,8 +213,8 @@
{
return systemId;
}
-
-
+
+
/**
* Set the byte stream for this input source.
*
@@ -236,8 +236,8 @@
{
this.byteStream = byteStream;
}
-
-
+
+
/**
* Get the byte stream for this input source.
*
@@ -252,9 +252,9 @@
{
return byteStream;
}
-
-
- /**
+
+
+ /**
* Set the character encoding, if known.
*
* <p>The encoding must be a string acceptable for an
@@ -273,8 +273,8 @@
{
this.encoding = encoding;
}
-
-
+
+
/**
* Get the character encoding for a byte stream or URI.
* This value will be ignored when the application provides a
@@ -289,8 +289,8 @@
{
return encoding;
}
-
-
+
+
/**
* Set the character stream for this input source.
*
@@ -307,8 +307,8 @@
{
this.characterStream = characterStream;
}
-
-
+
+
/**
* Get the character stream for this input source.
*
@@ -319,19 +319,19 @@
{
return characterStream;
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////////
-
+
private String publicId;
private String systemId;
private InputStream byteStream;
private String encoding;
private Reader characterStream;
-
+
}
// end of InputSource.java
diff --git a/luni/src/main/java/org/xml/sax/Locator.java b/luni/src/main/java/org/xml/sax/Locator.java
index f8f3484..accfe51 100644
--- a/luni/src/main/java/org/xml/sax/Locator.java
+++ b/luni/src/main/java/org/xml/sax/Locator.java
@@ -34,17 +34,17 @@
* locator, it must do so before reporting any other document events.
* If no locator has been set by the time the application receives
* the {@link org.xml.sax.ContentHandler#startDocument startDocument}
- * event, the application should assume that a locator is not
+ * event, the application should assume that a locator is not
* available.</p>
*
* @since SAX 1.0
* @author David Megginson
* @version 2.0.1 (sax2r2)
- * @see org.xml.sax.ContentHandler#setDocumentLocator
+ * @see org.xml.sax.ContentHandler#setDocumentLocator
*/
public interface Locator {
-
-
+
+
/**
* Return the public identifier for the current document event.
*
@@ -57,8 +57,8 @@
* @see #getSystemId
*/
public abstract String getPublicId ();
-
-
+
+
/**
* Return the system identifier for the current document event.
*
@@ -76,8 +76,8 @@
* @see #getPublicId
*/
public abstract String getSystemId ();
-
-
+
+
/**
* Return the line number where the current document event ends.
* Lines are delimited by line ends, which are defined in
@@ -95,16 +95,16 @@
* in the document entity or external parsed entity where the
* markup triggering the event appears.</p>
*
- * <p>If possible, the SAX driver should provide the line position
- * of the first character after the text associated with the document
+ * <p>If possible, the SAX driver should provide the line position
+ * of the first character after the text associated with the document
* event. The first line is line 1.</p>
*
* @return The line number, or -1 if none is available.
* @see #getColumnNumber
*/
public abstract int getLineNumber ();
-
-
+
+
/**
* Return the column number where the current document event ends.
* This is one-based number of Java <code>char</code> values since
@@ -122,15 +122,15 @@
* in the document entity or external parsed entity where the
* markup triggering the event appears.</p>
*
- * <p>If possible, the SAX driver should provide the line position
- * of the first character after the text associated with the document
+ * <p>If possible, the SAX driver should provide the line position
+ * of the first character after the text associated with the document
* event. The first column in each line is column 1.</p>
*
* @return The column number, or -1 if none is available.
* @see #getLineNumber
*/
public abstract int getColumnNumber ();
-
+
}
// end of Locator.java
diff --git a/luni/src/main/java/org/xml/sax/Parser.java b/luni/src/main/java/org/xml/sax/Parser.java
index 67a5512..600caff 100644
--- a/luni/src/main/java/org/xml/sax/Parser.java
+++ b/luni/src/main/java/org/xml/sax/Parser.java
@@ -49,9 +49,9 @@
* @see org.xml.sax.HandlerBase
* @see org.xml.sax.InputSource
*/
-public interface Parser
+public interface Parser
{
-
+
/**
* Allow an application to request a locale for errors and warnings.
*
@@ -62,15 +62,15 @@
*
* @param locale A Java Locale object.
* @exception org.xml.sax.SAXException Throws an exception
- * (using the previous or default locale) if the
+ * (using the previous or default locale) if the
* requested locale is not supported.
* @see org.xml.sax.SAXException
* @see org.xml.sax.SAXParseException
*/
public abstract void setLocale (Locale locale)
throws SAXException;
-
-
+
+
/**
* Allow an application to register a custom entity resolver.
*
@@ -88,8 +88,8 @@
* @see HandlerBase
*/
public abstract void setEntityResolver (EntityResolver resolver);
-
-
+
+
/**
* Allow an application to register a DTD event handler.
*
@@ -107,8 +107,8 @@
* @see HandlerBase
*/
public abstract void setDTDHandler (DTDHandler handler);
-
-
+
+
/**
* Allow an application to register a document event handler.
*
@@ -126,8 +126,8 @@
* @see HandlerBase
*/
public abstract void setDocumentHandler (DocumentHandler handler);
-
-
+
+
/**
* Allow an application to register an error event handler.
*
@@ -146,8 +146,8 @@
* @see HandlerBase
*/
public abstract void setErrorHandler (ErrorHandler handler);
-
-
+
+
/**
* Parse an XML document.
*
@@ -177,8 +177,8 @@
*/
public abstract void parse (InputSource source)
throws SAXException, IOException;
-
-
+
+
/**
* Parse an XML document from a system identifier (URI).
*
@@ -203,7 +203,7 @@
*/
public abstract void parse (String systemId)
throws SAXException, IOException;
-
+
}
// end of Parser.java
diff --git a/luni/src/main/java/org/xml/sax/SAXException.java b/luni/src/main/java/org/xml/sax/SAXException.java
index 2e5b4cd..d4c02b3 100644
--- a/luni/src/main/java/org/xml/sax/SAXException.java
+++ b/luni/src/main/java/org/xml/sax/SAXException.java
@@ -45,8 +45,8 @@
super();
this.exception = null;
}
-
-
+
+
/**
* Create a new SAXException.
*
@@ -56,8 +56,8 @@
super(message);
this.exception = null;
}
-
-
+
+
/**
* Create a new SAXException wrapping an existing exception.
*
@@ -72,8 +72,8 @@
super();
this.exception = e;
}
-
-
+
+
/**
* Create a new SAXException from an existing exception.
*
@@ -88,8 +88,8 @@
super(message);
this.exception = e;
}
-
-
+
+
/**
* Return a detail message for this exception.
*
@@ -102,15 +102,15 @@
public String getMessage ()
{
String message = super.getMessage();
-
+
if (message == null && exception != null) {
return exception.getMessage();
} else {
return message;
}
}
-
-
+
+
/**
* Return the embedded exception, if any.
*
@@ -135,8 +135,8 @@
return super.toString();
}
}
-
-
+
+
//////////////////////////////////////////////////////////////////////
// Internal state.
@@ -145,9 +145,9 @@
/**
* @serial The embedded exception if tunnelling, or null.
- */
+ */
private Exception exception;
-
+
}
// end of SAXException.java
diff --git a/luni/src/main/java/org/xml/sax/SAXNotSupportedException.java b/luni/src/main/java/org/xml/sax/SAXNotSupportedException.java
index bd5b239..3b51da6 100644
--- a/luni/src/main/java/org/xml/sax/SAXNotSupportedException.java
+++ b/luni/src/main/java/org/xml/sax/SAXNotSupportedException.java
@@ -24,7 +24,7 @@
* @since SAX 2.0
* @author David Megginson
* @version 2.0.1 (sax2r2)
- * @see org.xml.sax.SAXNotRecognizedException
+ * @see org.xml.sax.SAXNotRecognizedException
*/
public class SAXNotSupportedException extends SAXException
{
diff --git a/luni/src/main/java/org/xml/sax/SAXParseException.java b/luni/src/main/java/org/xml/sax/SAXParseException.java
index a6a93e9..424f77b 100644
--- a/luni/src/main/java/org/xml/sax/SAXParseException.java
+++ b/luni/src/main/java/org/xml/sax/SAXParseException.java
@@ -19,12 +19,12 @@
* in the original XML document, as if it came from a {@link Locator}
* object. Note that although the application
* will receive a SAXParseException as the argument to the handlers
- * in the {@link org.xml.sax.ErrorHandler ErrorHandler} interface,
- * the application is not actually required to throw the exception;
- * instead, it can simply read the information in it and take a
+ * in the {@link org.xml.sax.ErrorHandler ErrorHandler} interface,
+ * the application is not actually required to throw the exception;
+ * instead, it can simply read the information in it and take a
* different action.</p>
*
- * <p>Since this exception is a subclass of {@link org.xml.sax.SAXException
+ * <p>Since this exception is a subclass of {@link org.xml.sax.SAXException
* SAXException}, it inherits the ability to wrap another exception.</p>
*
* @since SAX 1.0
@@ -35,7 +35,7 @@
* @see org.xml.sax.ErrorHandler
*/
public class SAXParseException extends SAXException {
-
+
//////////////////////////////////////////////////////////////////////
// Constructors.
@@ -63,8 +63,8 @@
init(null, null, -1, -1);
}
}
-
-
+
+
/**
* Wrap an existing exception in a SAXParseException.
*
@@ -90,8 +90,8 @@
init(null, null, -1, -1);
}
}
-
-
+
+
/**
* Create a new SAXParseException.
*
@@ -119,8 +119,8 @@
super(message);
init(publicId, systemId, lineNumber, columnNumber);
}
-
-
+
+
/**
* Create a new SAXParseException with an embedded exception.
*
@@ -171,8 +171,8 @@
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}
-
-
+
+
/**
* Get the public identifier of the entity where the exception occurred.
*
@@ -184,8 +184,8 @@
{
return this.publicId;
}
-
-
+
+
/**
* Get the system identifier of the entity where the exception occurred.
*
@@ -200,8 +200,8 @@
{
return this.systemId;
}
-
-
+
+
/**
* The line number of the end of the text where the exception occurred.
*
@@ -215,8 +215,8 @@
{
return this.lineNumber;
}
-
-
+
+
/**
* The column number of the end of the text where the exception occurred.
*
@@ -230,7 +230,7 @@
{
return this.columnNumber;
}
-
+
//////////////////////////////////////////////////////////////////////
// Internal state.
@@ -240,7 +240,7 @@
/**
* @serial The public identifier, or null.
* @see #getPublicId
- */
+ */
private String publicId;
@@ -263,7 +263,7 @@
* @see #getColumnNumber
*/
private int columnNumber;
-
+
}
// end of SAXParseException.java
diff --git a/luni/src/main/java/org/xml/sax/XMLReader.java b/luni/src/main/java/org/xml/sax/XMLReader.java
index d58a4bd..6cfd021 100644
--- a/luni/src/main/java/org/xml/sax/XMLReader.java
+++ b/luni/src/main/java/org/xml/sax/XMLReader.java
@@ -19,9 +19,9 @@
* for further information.
* </blockquote>
*
- * <p><strong>Note:</strong> despite its name, this interface does
- * <em>not</em> extend the standard Java {@link java.io.Reader Reader}
- * interface, because reading XML is a fundamentally different activity
+ * <p><strong>Note:</strong> despite its name, this interface does
+ * <em>not</em> extend the standard Java {@link java.io.Reader Reader}
+ * interface, because reading XML is a fundamentally different activity
* than reading character data.</p>
*
* <p>XMLReader is the interface that an XML parser's SAX2 driver must
@@ -41,7 +41,7 @@
* interface (as well as some minor ones):</p>
*
* <ol>
- * <li>it adds a standard way to query and set features and
+ * <li>it adds a standard way to query and set features and
* properties; and</li>
* <li>it adds Namespace support, which is required for many
* higher-level XML standards.</li>
@@ -55,7 +55,7 @@
* @version 2.0.1+ (sax2r3pre1)
* @see org.xml.sax.XMLFilter
* @see org.xml.sax.helpers.ParserAdapter
- * @see org.xml.sax.helpers.XMLReaderAdapter
+ * @see org.xml.sax.helpers.XMLReaderAdapter
*/
public interface XMLReader
{
@@ -93,7 +93,7 @@
* try {
* r.setFeature("http://xml.org/sax/features/validation", true);
* } catch (SAXException e) {
- * System.err.println("Cannot activate validation.");
+ * System.err.println("Cannot activate validation.");
* }
*
* // register event handlers
@@ -118,7 +118,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the feature name but
+ * XMLReader recognizes the feature name but
* cannot determine its value at this time.
* @see #setFeature
*/
@@ -132,8 +132,8 @@
* <p>The feature name is any fully-qualified URI. It is
* possible for an XMLReader to expose a feature value but
* to be unable to change the current value.
- * Some feature values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some feature values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a parse.</p>
*
* <p>All XMLReaders are required to support setting
@@ -145,7 +145,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the feature name but
+ * XMLReader recognizes the feature name but
* cannot set the requested value.
* @see #getFeature
*/
@@ -174,7 +174,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
+ * XMLReader recognizes the property name but
* cannot determine its value at this time.
* @see #setProperty
*/
@@ -188,12 +188,12 @@
* <p>The property name is any fully-qualified URI. It is
* possible for an XMLReader to recognize a property name but
* to be unable to change the current value.
- * Some property values may be immutable or mutable only
- * in specific contexts, such as before, during, or after
+ * Some property values may be immutable or mutable only
+ * in specific contexts, such as before, during, or after
* a parse.</p>
*
* <p>XMLReaders are not required to recognize setting
- * any specific property names, though a core set is defined by
+ * any specific property names, though a core set is defined by
* SAX2.</p>
*
* <p>This method is also the standard mechanism for setting
@@ -204,7 +204,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved.
* @exception org.xml.sax.SAXNotSupportedException When the
- * XMLReader recognizes the property name but
+ * XMLReader recognizes the property name but
* cannot set the requested value.
*/
public void setProperty (String name, Object value)
@@ -355,7 +355,7 @@
* handlers.</p>
*
* <p>This method is synchronous: it will not return until parsing
- * has ended. If a client application wants to terminate
+ * has ended. If a client application wants to terminate
* parsing early, it should throw an exception.</p>
*
* @param input The input source for the top-level of the
@@ -370,7 +370,7 @@
* @see #setEntityResolver
* @see #setDTDHandler
* @see #setContentHandler
- * @see #setErrorHandler
+ * @see #setErrorHandler
*/
public void parse (InputSource input)
throws IOException, SAXException;
diff --git a/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java b/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
index fc36805..83cee5b 100644
--- a/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
+++ b/luni/src/main/java/org/xml/sax/ext/Attributes2Impl.java
@@ -28,7 +28,7 @@
* is false), non-CDATA attributes, or when it is set to true using
* {@link #setDeclared}.
* If you change an attribute's type by hand, you may need to modify
- * its <em>declared</em> flag to match.
+ * its <em>declared</em> flag to match.
* </p>
*
* @since SAX 2.0 (extensions 1.1 alpha)
@@ -192,7 +192,7 @@
* In that case those flag values are all copied.
*
* @param atts The attributes to copy.
- *
+ *
* @see AttributesImpl#setAttributes
*/
public void setAttributes (Attributes atts)
@@ -236,7 +236,7 @@
* if qualified names are not available.
* @param type The attribute type as a string.
* @param value The attribute value.
- *
+ *
* @see AttributesImpl#addAttribute
*/
public void addAttribute (String uri, String localName, String qName,
diff --git a/luni/src/main/java/org/xml/sax/ext/DeclHandler.java b/luni/src/main/java/org/xml/sax/ext/DeclHandler.java
index 26471f3..71b724b 100644
--- a/luni/src/main/java/org/xml/sax/ext/DeclHandler.java
+++ b/luni/src/main/java/org/xml/sax/ext/DeclHandler.java
@@ -54,9 +54,9 @@
* <p>The content model will consist of the string "EMPTY", the
* string "ANY", or a parenthesised group, optionally followed
* by an occurrence indicator. The model will be normalized so
- * that all parameter entities are fully resolved and all whitespace
+ * that all parameter entities are fully resolved and all whitespace
* is removed,and will include the enclosing parentheses. Other
- * normalization (such as removing redundant parentheses or
+ * normalization (such as removing redundant parentheses or
* simplifying occurrence indicators) is at the discretion of the
* parser.</p>
*
@@ -74,7 +74,7 @@
* <p>Only the effective (first) declaration for an attribute will
* be reported. The type will be one of the strings "CDATA",
* "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY",
- * "ENTITIES", a parenthesized token group with
+ * "ENTITIES", a parenthesized token group with
* the separator "|" and all whitespace removed, or the word
* "NOTATION" followed by a space followed by a parenthesized
* token group with all whitespace removed.</p>
diff --git a/luni/src/main/java/org/xml/sax/ext/DefaultHandler2.java b/luni/src/main/java/org/xml/sax/ext/DefaultHandler2.java
index f26564f..5f80194 100644
--- a/luni/src/main/java/org/xml/sax/ext/DefaultHandler2.java
+++ b/luni/src/main/java/org/xml/sax/ext/DefaultHandler2.java
@@ -97,7 +97,7 @@
/**
* Tells the parser that if no external subset has been declared
* in the document text, none should be used.
- *
+ *
* @param name Identifies the document root element. This name comes
* from a DOCTYPE declaration (where available) or from the actual
* root element. The parameter is ignored.
@@ -105,9 +105,9 @@
* hint for selecting the external subset. This is always an absolute
* URI, unless it is null because the XMLReader was given an InputSource
* without one. The parameter is ignored.
- *
+ *
* @return null (always).
- *
+ *
* @exception SAXException Any SAX exception, possibly wrapping
* another exception.
* @exception IOException Probably indicating a failure to create
@@ -122,10 +122,10 @@
* and read the entity text from that resulting absolute URI.
* Note that because the older
* {@link DefaultHandler#resolveEntity DefaultHandler.resolveEntity()},
- * method is overridden to call this one, this method may sometimes
+ * method is overridden to call this one, this method may sometimes
* be invoked with null <em>name</em> and <em>baseURI</em>, and
* with the <em>systemId</em> already absolutized.
- *
+ *
* @param name Identifies the external entity being resolved.
* Either "[dtd]" for the external subset, or a name starting
* with "%" to indicate a parameter entity, or else the name of
@@ -145,7 +145,7 @@
* entities, and any external subset, are resolved by such parsers.
*
* @return An InputSource object describing the new input source.
- *
+ *
* @exception SAXException Any SAX exception, possibly wrapping
* another exception.
* @exception IOException Probably indicating a failure to create
@@ -155,7 +155,7 @@
String baseURI, String systemId)
throws SAXException, IOException
{ return null; }
-
+
// SAX1 EntityResolver
/**
@@ -163,7 +163,7 @@
* {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()}
* with null entity name and base URI.
* You only need to override that method to use this class.
- *
+ *
* @param publicId The public identifier of the external entity being
* referenced (normalized as required by the XML specification), or
* null if none was supplied.
@@ -173,7 +173,7 @@
* entities, and any external subset, are resolved by such parsers.
*
* @return An InputSource object describing the new input source.
- *
+ *
* @exception SAXException Any SAX exception, possibly wrapping
* another exception.
* @exception IOException Probably indicating a failure to create
diff --git a/luni/src/main/java/org/xml/sax/ext/EntityResolver2.java b/luni/src/main/java/org/xml/sax/ext/EntityResolver2.java
index 5437a9b..5b2e7a6 100644
--- a/luni/src/main/java/org/xml/sax/ext/EntityResolver2.java
+++ b/luni/src/main/java/org/xml/sax/ext/EntityResolver2.java
@@ -108,7 +108,7 @@
* that attributes are handled consistently.
* For example, an XPath processor needs to know which attibutes have
* type "ID" before it can process a widely used type of reference.</p>
- *
+ *
* <p><strong>Warning:</strong> Returning an external subset modifies
* the input document. By providing definitions for general entities,
* it can make a malformed document appear to be well formed.
@@ -116,7 +116,7 @@
*
* @param name Identifies the document root element. This name comes
* from a DOCTYPE declaration (where available) or from the actual
- * root element.
+ * root element.
* @param baseURI The document's base URI, serving as an additional
* hint for selecting the external subset. This is always an absolute
* URI, unless it is null because the XMLReader was given an InputSource
diff --git a/luni/src/main/java/org/xml/sax/ext/LexicalHandler.java b/luni/src/main/java/org/xml/sax/ext/LexicalHandler.java
index e551b61..83ac6e3 100644
--- a/luni/src/main/java/org/xml/sax/ext/LexicalHandler.java
+++ b/luni/src/main/java/org/xml/sax/ext/LexicalHandler.java
@@ -51,7 +51,7 @@
* DOCTYPE declaration; if the document has no DOCTYPE declaration,
* this method will not be invoked.</p>
*
- * <p>All declarations reported through
+ * <p>All declarations reported through
* {@link org.xml.sax.DTDHandler DTDHandler} or
* {@link org.xml.sax.ext.DeclHandler DeclHandler} events must appear
* between the startDTD and {@link #endDTD endDTD} events.
@@ -59,14 +59,14 @@
* unless they appear between {@link #startEntity startEntity}
* and {@link #endEntity endEntity} events. Comments and
* processing instructions from the DTD should also be reported
- * between the startDTD and endDTD events, in their original
+ * between the startDTD and endDTD events, in their original
* order of (logical) occurrence; they are not required to
* appear in their correct locations relative to DTDHandler
* or DeclHandler events, however.</p>
*
* <p>Note that the start/endDTD events will appear within
* the start/endDocument events from ContentHandler and
- * before the first
+ * before the first
* {@link org.xml.sax.ContentHandler#startElement startElement}
* event.</p>
*
@@ -112,12 +112,12 @@
* feature to query or control the reporting of parameter entities.</p>
*
* <p>General entities are reported with their regular names,
- * parameter entities have '%' prepended to their names, and
+ * parameter entities have '%' prepended to their names, and
* the external DTD subset has the pseudo-entity name "[dtd]".</p>
*
- * <p>When a SAX2 driver is providing these events, all other
- * events must be properly nested within start/end entity
- * events. There is no additional requirement that events from
+ * <p>When a SAX2 driver is providing these events, all other
+ * events must be properly nested within start/end entity
+ * events. There is no additional requirement that events from
* {@link org.xml.sax.ext.DeclHandler DeclHandler} or
* {@link org.xml.sax.DTDHandler DTDHandler} be properly ordered.</p>
*
@@ -126,7 +126,7 @@
* event, which is part of the ContentHandler interface.</p>
*
* <p>Because of the streaming event model that SAX uses, some
- * entity boundaries cannot be reported under any
+ * entity boundaries cannot be reported under any
* circumstances:</p>
*
* <ul>
@@ -148,7 +148,7 @@
* @exception SAXException The application may raise an exception.
* @see #endEntity
* @see org.xml.sax.ext.DeclHandler#internalEntityDecl
- * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
+ * @see org.xml.sax.ext.DeclHandler#externalEntityDecl
*/
public abstract void startEntity (String name)
throws SAXException;
diff --git a/luni/src/main/java/org/xml/sax/ext/Locator2.java b/luni/src/main/java/org/xml/sax/ext/Locator2.java
index 6de9a16..9c212d0 100644
--- a/luni/src/main/java/org/xml/sax/ext/Locator2.java
+++ b/luni/src/main/java/org/xml/sax/ext/Locator2.java
@@ -9,7 +9,7 @@
/**
- * SAX2 extension to augment the entity information provided
+ * SAX2 extension to augment the entity information provided
* though a {@link Locator}.
* If an implementation supports this extension, the Locator
* provided in {@link org.xml.sax.ContentHandler#setDocumentLocator
diff --git a/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java b/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
index 91f912a..9274d58 100644
--- a/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
+++ b/luni/src/main/java/org/xml/sax/ext/Locator2Impl.java
@@ -41,7 +41,7 @@
* Copy an existing Locator or Locator2 object.
* If the object implements Locator2, values of the
* <em>encoding</em> and <em>version</em>strings are copied,
- * otherwise they set to <em>null</em>.
+ * otherwise they set to <em>null</em>.
*
* @param locator The existing Locator object.
*/
@@ -59,7 +59,7 @@
////////////////////////////////////////////////////////////////////
// Locator2 method implementations
////////////////////////////////////////////////////////////////////
-
+
/**
* Returns the current value of the version property.
*
@@ -72,7 +72,7 @@
/**
* Returns the current value of the encoding property.
- *
+ *
* @return the current value of the encoding property.
*
* @see #setEncoding
@@ -82,9 +82,9 @@
////////////////////////////////////////////////////////////////////
- // Setters
+ // Setters
////////////////////////////////////////////////////////////////////
-
+
/**
* Assigns the current value of the version property.
*
diff --git a/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java b/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java
index fb4aee3..c34538f 100644
--- a/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java
@@ -26,10 +26,10 @@
* AttributesImpl} interface.</p>
*
* <p>This class provides a convenience implementation of the SAX
- * {@link org.xml.sax.AttributeList AttributeList} interface. This
- * implementation is useful both for SAX parser writers, who can use
- * it to provide attributes to the application, and for SAX application
- * writers, who can use it to create a persistent copy of an element's
+ * {@link org.xml.sax.AttributeList AttributeList} interface. This
+ * implementation is useful both for SAX parser writers, who can use
+ * it to provide attributes to the application, and for SAX application
+ * writers, who can use it to create a persistent copy of an element's
* attribute specifications:</p>
*
* <pre>
@@ -46,7 +46,7 @@
*
* <p>Please note that SAX parsers are not required to use this
* class to provide an implementation of AttributeList; it is
- * supplied only as an optional convenience. In particular,
+ * supplied only as an optional convenience. In particular,
* parser writers are encouraged to invent more efficient
* implementations.</p>
*
@@ -55,17 +55,17 @@
* that interface has been replaced by
* {@link org.xml.sax.Attributes Attributes},
* which is implemented in the
- * {@link org.xml.sax.helpers.AttributesImpl
+ * {@link org.xml.sax.helpers.AttributesImpl
* AttributesImpl} helper class.
* @since SAX 1.0
* @author David Megginson
* @version 2.0.1 (sax2r2)
* @see org.xml.sax.AttributeList
- * @see org.xml.sax.DocumentHandler#startElement
+ * @see org.xml.sax.DocumentHandler#startElement
*/
public class AttributeListImpl implements AttributeList
{
-
+
/**
* Create an empty attribute list.
*
@@ -79,8 +79,8 @@
public AttributeListImpl ()
{
}
-
-
+
+
/**
* Construct a persistent copy of an existing attribute list.
*
@@ -95,14 +95,14 @@
{
setAttributeList(atts);
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Methods specific to this class.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Set the attribute list, discarding previous contents.
*
@@ -114,15 +114,15 @@
public void setAttributeList (AttributeList atts)
{
int count = atts.getLength();
-
+
clear();
-
+
for (int i = 0; i < count; i++) {
addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
}
}
-
-
+
+
/**
* Add an attribute to an attribute list.
*
@@ -142,8 +142,8 @@
types.addElement(type);
values.addElement(value);
}
-
-
+
+
/**
* Remove an attribute from the list.
*
@@ -161,15 +161,15 @@
public void removeAttribute (String name)
{
int i = names.indexOf(name);
-
+
if (i >= 0) {
names.removeElementAt(i);
types.removeElementAt(i);
values.removeElementAt(i);
}
}
-
-
+
+
/**
* Clear the attribute list.
*
@@ -186,14 +186,14 @@
types.removeAllElements();
values.removeAllElements();
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Implementation of org.xml.sax.AttributeList
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Return the number of attributes in the list.
*
@@ -204,8 +204,8 @@
{
return names.size();
}
-
-
+
+
/**
* Get the name of an attribute (by position).
*
@@ -225,8 +225,8 @@
return null;
}
}
-
-
+
+
/**
* Get the type of an attribute (by position).
*
@@ -248,8 +248,8 @@
return null;
}
}
-
-
+
+
/**
* Get the value of an attribute (by position).
*
@@ -269,8 +269,8 @@
return null;
}
}
-
-
+
+
/**
* Get the type of an attribute (by name).
*
@@ -284,8 +284,8 @@
{
return getType(names.indexOf(name));
}
-
-
+
+
/**
* Get the value of an attribute (by name).
*
@@ -298,8 +298,8 @@
{
return getValue(names.indexOf(name));
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Internal state.
diff --git a/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java b/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
index b740e23..f6d5f85 100644
--- a/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/AttributesImpl.java
@@ -20,8 +20,8 @@
* </blockquote>
*
* <p>This class provides a default implementation of the SAX2
- * {@link org.xml.sax.Attributes Attributes} interface, with the
- * addition of manipulators so that the list can be modified or
+ * {@link org.xml.sax.Attributes Attributes} interface, with the
+ * addition of manipulators so that the list can be modified or
* reused.</p>
*
* <p>There are two typical uses of this class:</p>
@@ -32,11 +32,11 @@
* <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li>
* </ol>
*
- * <p>This class replaces the now-deprecated SAX1 {@link
+ * <p>This class replaces the now-deprecated SAX1 {@link
* org.xml.sax.helpers.AttributeListImpl AttributeListImpl}
* class; in addition to supporting the updated Attributes
* interface rather than the deprecated {@link org.xml.sax.AttributeList
- * AttributeList} interface, it also includes a much more efficient
+ * AttributeList} interface, it also includes a much more efficient
* implementation using a single array rather than a set of Vectors.</p>
*
* @since SAX 2.0
@@ -116,7 +116,7 @@
* Return an attribute's local name.
*
* @param index The attribute's index (zero-based).
- * @return The attribute's local name, the empty string if
+ * @return The attribute's local name, the empty string if
* none is available, or null if the index if out of range.
* @see org.xml.sax.Attributes#getLocalName
*/
@@ -134,7 +134,7 @@
* Return an attribute's qualified (prefixed) name.
*
* @param index The attribute's index (zero-based).
- * @return The attribute's qualified name, the empty string if
+ * @return The attribute's qualified name, the empty string if
* none is available, or null if the index is out of bounds.
* @see org.xml.sax.Attributes#getQName
*/
@@ -203,7 +203,7 @@
if (data[i].equals(uri) && data[i+1].equals(localName)) {
return i / 5;
}
- }
+ }
return -1;
}
@@ -222,7 +222,7 @@
if (data[i+2].equals(qName)) {
return i / 5;
}
- }
+ }
return -1;
}
@@ -244,7 +244,7 @@
if (data[i].equals(uri) && data[i+1].equals(localName)) {
return data[i+3];
}
- }
+ }
return null;
}
@@ -321,7 +321,7 @@
* Clear the attribute list for reuse.
*
* <p>Note that little memory is freed by this call:
- * the current array is kept so it can be
+ * the current array is kept so it can be
* reused.</p>
*/
public void clear ()
@@ -339,7 +339,7 @@
*
* <p>It may be more efficient to reuse an existing object
* rather than constantly allocating new ones.</p>
- *
+ *
* @param atts The attributes to copy.
*/
public void setAttributes (Attributes atts)
diff --git a/luni/src/main/java/org/xml/sax/helpers/DefaultHandler.java b/luni/src/main/java/org/xml/sax/helpers/DefaultHandler.java
index 8308be7..3e068e7 100644
--- a/luni/src/main/java/org/xml/sax/helpers/DefaultHandler.java
+++ b/luni/src/main/java/org/xml/sax/helpers/DefaultHandler.java
@@ -59,12 +59,12 @@
public class DefaultHandler
implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler
{
-
+
////////////////////////////////////////////////////////////////////
// Default implementation of the EntityResolver interface.
////////////////////////////////////////////////////////////////////
-
+
/**
* Resolve an external entity.
*
@@ -76,7 +76,7 @@
*
* @param publicId The public identifer, or null if none is
* available.
- * @param systemId The system identifier provided in the XML
+ * @param systemId The system identifier provided in the XML
* document.
* @return The new input source, or null to require the
* default behaviour.
@@ -91,14 +91,14 @@
{
return null;
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of DTDHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive notification of a notation declaration.
*
@@ -119,8 +119,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of an unparsed entity declaration.
*
@@ -143,14 +143,14 @@
{
// no op
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of ContentHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive a Locator object for document events.
*
@@ -166,8 +166,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the beginning of the document.
*
@@ -185,8 +185,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the end of the document.
*
@@ -243,8 +243,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the start of an element.
*
@@ -274,8 +274,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of the end of an element.
*
@@ -301,8 +301,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of character data inside an element.
*
@@ -324,8 +324,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of ignorable whitespace in element content.
*
@@ -347,8 +347,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of a processing instruction.
*
@@ -389,14 +389,14 @@
{
// no op
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Default implementation of the ErrorHandler interface.
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Receive notification of a parser warning.
*
@@ -416,8 +416,8 @@
{
// no op
}
-
-
+
+
/**
* Receive notification of a recoverable parser error.
*
@@ -437,8 +437,8 @@
{
// no op
}
-
-
+
+
/**
* Report a fatal XML parsing error.
*
@@ -461,7 +461,7 @@
{
throw e;
}
-
+
}
// end of DefaultHandler.java
diff --git a/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java b/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
index 18445bc..e7ec76a 100644
--- a/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/LocatorImpl.java
@@ -51,8 +51,8 @@
*/
public class LocatorImpl implements Locator
{
-
-
+
+
/**
* Zero-argument constructor.
*
@@ -62,8 +62,8 @@
public LocatorImpl ()
{
}
-
-
+
+
/**
* Copy constructor.
*
@@ -81,14 +81,14 @@
setLineNumber(locator.getLineNumber());
setColumnNumber(locator.getColumnNumber());
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Implementation of org.xml.sax.Locator
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Return the saved public identifier.
*
@@ -101,8 +101,8 @@
{
return publicId;
}
-
-
+
+
/**
* Return the saved system identifier.
*
@@ -115,8 +115,8 @@
{
return systemId;
}
-
-
+
+
/**
* Return the saved line number (1-based).
*
@@ -128,8 +128,8 @@
{
return lineNumber;
}
-
-
+
+
/**
* Return the saved column number (1-based).
*
@@ -141,18 +141,18 @@
{
return columnNumber;
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Setters for the properties (not in org.xml.sax.Locator)
////////////////////////////////////////////////////////////////////
-
-
+
+
/**
* Set the public identifier for this locator.
*
- * @param publicId The new public identifier, or null
+ * @param publicId The new public identifier, or null
* if none is available.
* @see #getPublicId
*/
@@ -160,12 +160,12 @@
{
this.publicId = publicId;
}
-
-
+
+
/**
* Set the system identifier for this locator.
*
- * @param systemId The new system identifier, or null
+ * @param systemId The new system identifier, or null
* if none is available.
* @see #getSystemId
*/
@@ -173,8 +173,8 @@
{
this.systemId = systemId;
}
-
-
+
+
/**
* Set the line number for this locator (1-based).
*
@@ -185,8 +185,8 @@
{
this.lineNumber = lineNumber;
}
-
-
+
+
/**
* Set the column number for this locator (1-based).
*
@@ -197,18 +197,18 @@
{
this.columnNumber = columnNumber;
}
-
-
+
+
////////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////////
-
+
private String publicId;
private String systemId;
private int lineNumber;
private int columnNumber;
-
+
}
// end of LocatorImpl.java
diff --git a/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java b/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
index a737d1d..bff22b0 100644
--- a/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
+++ b/luni/src/main/java/org/xml/sax/helpers/NamespaceSupport.java
@@ -94,9 +94,9 @@
* The namespace declaration URI as a constant.
* The value is <code>http://www.w3.org/xmlns/2000/</code>, as defined
* in a backwards-incompatible erratum to the "Namespaces in XML"
- * recommendation. Because that erratum postdated SAX2, SAX2 defaults
+ * recommendation. Because that erratum postdated SAX2, SAX2 defaults
* to the original recommendation, and does not normally use this URI.
- *
+ *
*
* <p>This is the Namespace URI that is optionally applied to
* <em>xmlns</em> and <em>xmlns:*</em> attributes, which are used to
@@ -335,7 +335,7 @@
* holding at least three members.
* @param isAttribute A flag indicating whether this is an
* attribute name (true) or an element name (false).
- * @return The supplied array holding three internalized strings
+ * @return The supplied array holding three internalized strings
* representing the Namespace URI (or empty string), the
* local name, and the XML qualified name; or null if there
* is an undeclared prefix.
@@ -427,7 +427,7 @@
*
* <p>This method returns prefixes mapped to a specific Namespace
* URI. The xml: prefix will be included. If you want only one
- * prefix that's mapped to the Namespace URI, and you don't care
+ * prefix that's mapped to the Namespace URI, and you don't care
* which one you get, use the {@link #getPrefix getPrefix}
* method instead.</p>
*
@@ -459,7 +459,7 @@
/**
* Return an enumeration of all prefixes declared in this context.
*
- * <p>The empty (default) prefix will be included in this
+ * <p>The empty (default) prefix will be included in this
* enumeration; note that this behaviour differs from that of
* {@link #getPrefix} and {@link #getPrefixes}.</p>
*
@@ -478,7 +478,7 @@
* into the {@link #NSDECL NSDECL} namespace
* by {@link #processName processName()}. This may only be
* changed before any contexts have been pushed.
- *
+ *
* @param value the namespace declaration attribute state. A value of true
* enables this feature, a value of false disables it.
*
@@ -550,8 +550,8 @@
{
copyTables();
}
-
-
+
+
/**
* (Re)set the parent of this Namespace context.
* The context must either have been freshly constructed,
@@ -587,8 +587,8 @@
attributeNameTable = null;
defaultNS = null;
}
-
-
+
+
/**
* Declare a Namespace prefix for this context.
*
@@ -608,7 +608,7 @@
if (declarations == null) {
declarations = new Vector();
}
-
+
prefix = prefix.intern();
uri = uri.intern();
if ("".equals(prefix)) {
@@ -640,7 +640,7 @@
{
String name[];
Hashtable table;
-
+
// detect errors in call sequence
declsOK = false;
@@ -650,7 +650,7 @@
} else {
table = elementNameTable;
}
-
+
// Start by looking in the cache, and
// return immediately if the name
// is already known in this content
@@ -658,7 +658,7 @@
if (name != null) {
return name;
}
-
+
// We haven't seen this name in this
// context before. Maybe in the parent
// context, but we can't assume prefix
@@ -666,8 +666,8 @@
name = new String[3];
name[2] = qName.intern();
int index = qName.indexOf(':');
-
-
+
+
// No prefix.
if (index == -1) {
if (isAttribute) {
@@ -682,7 +682,7 @@
}
name[1] = name[2];
}
-
+
// Prefix
else {
String prefix = qName.substring(0, index);
@@ -700,20 +700,20 @@
name[0] = uri;
name[1] = local.intern();
}
-
+
// Save in the cache for future use.
// (Could be shared with parent context...)
table.put(name[2], name);
return name;
}
-
+
/**
* Look up the URI associated with a prefix in this context.
*
* @param prefix The prefix to look up.
* @return The associated Namespace URI, or null if none is
- * declared.
+ * declared.
* @see org.xml.sax.helpers.NamespaceSupport#getURI
*/
String getURI (String prefix)
@@ -746,8 +746,8 @@
return (String)uriTable.get(uri);
}
}
-
-
+
+
/**
* Return an enumeration of prefixes declared in this context.
*
@@ -762,8 +762,8 @@
return declarations.elements();
}
}
-
-
+
+
/**
* Return an enumeration of all prefixes currently in force.
*
@@ -781,8 +781,8 @@
return prefixTable.keys();
}
}
-
-
+
+
////////////////////////////////////////////////////////////////
// Internal methods.
@@ -794,7 +794,7 @@
*
* <p>This class is optimized for the normal case where most
* elements do not contain Namespace declarations.</p>
- */
+ */
private void copyTables ()
{
if (prefixTable != null) {
@@ -817,20 +817,20 @@
////////////////////////////////////////////////////////////////
// Protected state.
////////////////////////////////////////////////////////////////
-
+
Hashtable prefixTable;
Hashtable uriTable;
Hashtable elementNameTable;
Hashtable attributeNameTable;
String defaultNS = null;
boolean declsOK = true;
-
+
////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////
-
+
private Vector declarations = null;
private boolean declSeen = false;
private Context parent = null;
diff --git a/luni/src/main/java/org/xml/sax/helpers/NewInstance.java b/luni/src/main/java/org/xml/sax/helpers/NewInstance.java
index e590192..63013a8 100644
--- a/luni/src/main/java/org/xml/sax/helpers/NewInstance.java
+++ b/luni/src/main/java/org/xml/sax/helpers/NewInstance.java
@@ -54,7 +54,7 @@
/**
* Figure out which ClassLoader to use. For JDK 1.2 and later use
* the context ClassLoader.
- */
+ */
static ClassLoader getClassLoader ()
{
Method m = null;
diff --git a/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java b/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
index 7fc3813..33bc9a3 100644
--- a/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
+++ b/luni/src/main/java/org/xml/sax/helpers/ParserAdapter.java
@@ -102,7 +102,7 @@
driver +
" does not implement org.xml.sax.Parser");
} catch (NullPointerException e5) {
- throw new
+ throw new
SAXException("System property org.xml.sax.parser not specified");
}
}
@@ -164,7 +164,7 @@
/**
* Set a feature flag for the parser.
*
- * <p>The only features recognized are namespaces and
+ * <p>The only features recognized are namespaces and
* namespace-prefixes.</p>
*
* @param name The feature name, as a complete URI.
@@ -202,7 +202,7 @@
/**
* Check a parser feature flag.
*
- * <p>The only features recognized are namespaces and
+ * <p>The only features recognized are namespaces and
* namespace-prefixes.</p>
*
* @param name The feature name, as a complete URI.
@@ -501,7 +501,7 @@
// OK, we're doing Namespace processing.
nsSupport.pushContext();
int length = qAtts.getLength();
-
+
// First pass: handle NS decls
for (int i = 0; i < length; i++) {
String attQName = qAtts.getName(i);
@@ -530,7 +530,7 @@
if (contentHandler != null)
contentHandler.startPrefixMapping(prefix, value);
}
-
+
// Second pass: copy all relevant
// attributes into the SAX2 AttributeList
// using updated prefix bindings
@@ -569,7 +569,7 @@
}
continue;
}
- }
+ }
// Not a declaration -- report
try {
@@ -583,7 +583,7 @@
atts.addAttribute("", attQName, attQName, type, value);
}
}
-
+
// now handle the deferred exception reports
if (exceptions != null && errorHandler != null) {
for (int i = 0; i < exceptions.size(); i++)
@@ -771,7 +771,7 @@
errorHandler.error(makeException(message));
}
-
+
/**
* Construct an exception for the current context.
*
@@ -805,7 +805,7 @@
throw new SAXNotSupportedException("Cannot change " +
type + ' ' +
name + " while parsing");
-
+
}
}
@@ -855,7 +855,7 @@
*
* <p>This wrapper class is used only when Namespace support
* is disabled -- it provides pretty much a direct mapping
- * from SAX1 to SAX2, except that names and types are
+ * from SAX1 to SAX2, except that names and types are
* interned whenever requested.</p>
*/
final class AttributeListAdapter implements Attributes
diff --git a/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java b/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java
index ffe2a60..0af3084 100644
--- a/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java
+++ b/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java
@@ -47,22 +47,22 @@
* @version 2.0.1 (sax2r2)
*/
public class ParserFactory {
-
-
+
+
/**
* Private null constructor.
*/
private ParserFactory ()
{
}
-
-
+
+
/**
* Create a new SAX parser using the `org.xml.sax.parser' system property.
*
* <p>The named class must exist and must implement the
* {@link org.xml.sax.Parser Parser} interface.</p>
- *
+ *
* @return the newly created parser.
*
* @exception java.lang.NullPointerException There is no value
@@ -82,7 +82,7 @@
*/
public static Parser makeParser ()
throws ClassNotFoundException,
- IllegalAccessException,
+ IllegalAccessException,
InstantiationException,
NullPointerException,
ClassCastException
@@ -94,8 +94,8 @@
return makeParser(className);
}
}
-
-
+
+
/**
* Create a new SAX parser object using the class name provided.
*
@@ -121,13 +121,13 @@
*/
public static Parser makeParser (String className)
throws ClassNotFoundException,
- IllegalAccessException,
+ IllegalAccessException,
InstantiationException,
ClassCastException
{
return (Parser) NewInstance.newInstance (
NewInstance.getClassLoader (), className);
}
-
+
}
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java b/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
index 68e2579..c16700c 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLFilterImpl.java
@@ -80,8 +80,8 @@
/**
* Construct an XML filter with the specified parent.
- *
- * @param parent the XML reader from which this filter receives its events.
+ *
+ * @param parent the XML reader from which this filter receives its events.
*
* @see #setParent
* @see #getParent
@@ -102,8 +102,8 @@
/**
* Set the parent reader.
*
- * <p>This is the {@link org.xml.sax.XMLReader XMLReader} from which
- * this filter will obtain its events and to which it will pass its
+ * <p>This is the {@link org.xml.sax.XMLReader XMLReader} from which
+ * this filter will obtain its events and to which it will pass its
* configuration requests. The parent may itself be another filter.</p>
*
* <p>If there is no parent reader set, any attempt to parse
@@ -146,7 +146,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved from the parent.
* @exception org.xml.sax.SAXNotSupportedException When the
- * parent recognizes the feature name but
+ * parent recognizes the feature name but
* cannot set the requested value.
*/
public void setFeature (String name, boolean value)
@@ -170,7 +170,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the feature
* value can't be assigned or retrieved from the parent.
* @exception org.xml.sax.SAXNotSupportedException When the
- * parent recognizes the feature name but
+ * parent recognizes the feature name but
* cannot determine its value at this time.
*/
public boolean getFeature (String name)
@@ -194,7 +194,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved from the parent.
* @exception org.xml.sax.SAXNotSupportedException When the
- * parent recognizes the property name but
+ * parent recognizes the property name but
* cannot set the requested value.
*/
public void setProperty (String name, Object value)
@@ -216,7 +216,7 @@
* @exception org.xml.sax.SAXNotRecognizedException If the property
* value can't be assigned or retrieved from the parent.
* @exception org.xml.sax.SAXNotSupportedException When the
- * parent recognizes the property name but
+ * parent recognizes the property name but
* cannot determine its value at this time.
*/
public Object getProperty (String name)
@@ -387,7 +387,7 @@
// Implementation of org.xml.sax.DTDHandler.
////////////////////////////////////////////////////////////////////
-
+
/**
* Filter a notation declaration event.
*
@@ -405,7 +405,7 @@
}
}
-
+
/**
* Filter an unparsed entity declaration event.
*
@@ -683,7 +683,7 @@
* Set up before a parse.
*
* <p>Before every parse, check whether the parent is
- * non-null, and re-register the filter for all of the
+ * non-null, and re-register the filter for all of the
* events.</p>
*/
private void setupParse ()
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java b/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
index cc8f431..1845ad5 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java
@@ -36,11 +36,11 @@
* </blockquote>
*
* <p>This class wraps a SAX2 {@link org.xml.sax.XMLReader XMLReader}
- * and makes it act as a SAX1 {@link org.xml.sax.Parser Parser}. The XMLReader
- * must support a true value for the
+ * and makes it act as a SAX1 {@link org.xml.sax.Parser Parser}. The XMLReader
+ * must support a true value for the
* http://xml.org/sax/features/namespace-prefixes property or parsing will fail
- * with a {@link org.xml.sax.SAXException SAXException}; if the XMLReader
- * supports a false value for the http://xml.org/sax/features/namespaces
+ * with a {@link org.xml.sax.SAXException SAXException}; if the XMLReader
+ * supports a false value for the http://xml.org/sax/features/namespaces
* property, that will also be used to improve efficiency.</p>
*
* @since SAX 2.0
@@ -185,7 +185,7 @@
* Parse the document.
*
* <p>This method will throw an exception if the embedded
- * XMLReader does not support the
+ * XMLReader does not support the
* http://xml.org/sax/features/namespace-prefixes property.</p>
*
* @param systemId The absolute URL of the document.
@@ -207,7 +207,7 @@
* Parse the document.
*
* <p>This method will throw an exception if the embedded
- * XMLReader does not support the
+ * XMLReader does not support the
* http://xml.org/sax/features/namespace-prefixes property.</p>
*
* @param input An input source for the document.
@@ -452,7 +452,7 @@
* Set the embedded Attributes object.
*
* @param The embedded SAX2 Attributes.
- */
+ */
void setAttributes (Attributes attributes)
{
this.attributes = attributes;
diff --git a/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java b/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
index b761c34..e5a6e30 100644
--- a/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
+++ b/luni/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
@@ -106,7 +106,7 @@
{
String className = null;
ClassLoader loader = NewInstance.getClassLoader ();
-
+
// 1. try the JVM-instance-wide system property
try { className = System.getProperty (property); }
catch (RuntimeException e) { /* normally fails for applets */ }
@@ -142,7 +142,7 @@
// END DISTRIBUTION-SPECIFIC
}
-
+
// do we know the XMLReader implementation class yet?
if (className != null)
return loadClass (loader, className);
@@ -162,7 +162,7 @@
*
* <p>Given a class name, this method attempts to load
* and instantiate the class as an XML reader.</p>
- *
+ *
* @param className the name of the class that should be instantiated.
*
* <p>Note that this method will not be usable in environments where
diff --git a/luni/src/main/java/sun/misc/Unsafe.java b/luni/src/main/java/sun/misc/Unsafe.java
index 5c6aa01..6cd0519 100644
--- a/luni/src/main/java/sun/misc/Unsafe.java
+++ b/luni/src/main/java/sun/misc/Unsafe.java
@@ -33,7 +33,7 @@
/** non-null; the lang-access utility instance */
private final LangAccess lang;
-
+
/**
* This class is only privately instantiable.
*/
@@ -61,7 +61,7 @@
/**
* Gets the raw byte offset from the start of an object's memory to
* the memory used to store the indicated instance field.
- *
+ *
* @param field non-null; the field in question, which must be an
* instance field
* @return the offset to the field
@@ -78,7 +78,7 @@
/**
* Helper for {@link #objectFieldOffset}, which does all the work,
* assuming the parameter is deemed valid.
- *
+ *
* @param field non-null; the instance field
* @return the offset to the field
*/
@@ -87,7 +87,7 @@
/**
* Gets the offset from the start of an array object's memory to
* the memory used to store its initial (zeroeth) element.
- *
+ *
* @param clazz non-null; class in question; must be an array class
* @return the offset to the initial element
*/
@@ -103,14 +103,14 @@
/**
* Helper for {@link #arrayBaseOffset}, which does all the work,
* assuming the parameter is deemed valid.
- *
+ *
* @return the offset to the field
*/
private static native int arrayBaseOffset0(Class clazz);
/**
* Gets the size of each element of the given array class.
- *
+ *
* @param clazz non-null; class in question; must be an array class
* @return > 0; the size of each element of the array
*/
@@ -126,7 +126,7 @@
/**
* Helper for {@link #arrayIndexScale}, which does all the work,
* assuming the parameter is deemed valid.
- *
+ *
* @return the offset to the field
*/
private static native int arrayIndexScale0(Class clazz);
@@ -134,7 +134,7 @@
/**
* Performs a compare-and-set operation on an <code>int</code>
* field within the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @param expectedValue expected value of the field
@@ -145,11 +145,11 @@
*/
public native boolean compareAndSwapInt(Object obj, long offset,
int expectedValue, int newValue);
-
+
/**
* Performs a compare-and-set operation on a <code>long</code>
* field within the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @param expectedValue expected value of the field
@@ -160,11 +160,11 @@
*/
public native boolean compareAndSwapLong(Object obj, long offset,
long expectedValue, long newValue);
-
+
/**
* Performs a compare-and-set operation on an <code>Object</code>
* field (that is, a reference field) within the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @param expectedValue expected value of the field
@@ -179,7 +179,7 @@
/**
* Gets an <code>int</code> field from the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -189,17 +189,17 @@
/**
* Stores an <code>int</code> field into the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putIntVolatile(Object obj, long offset, int newValue);
-
+
/**
* Gets a <code>long</code> field from the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -209,17 +209,17 @@
/**
* Stores a <code>long</code> field into the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putLongVolatile(Object obj, long offset, long newValue);
/**
* Gets an <code>Object</code> field from the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -229,17 +229,17 @@
/**
* Stores an <code>Object</code> field into the given object,
* using <code>volatile</code> semantics.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putObjectVolatile(Object obj, long offset,
Object newValue);
/**
* Gets an <code>int</code> field from the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -248,10 +248,10 @@
/**
* Stores an <code>int</code> field into the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putInt(Object obj, long offset, int newValue);
@@ -265,7 +265,7 @@
/**
* Gets a <code>long</code> field from the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -274,10 +274,10 @@
/**
* Stores a <code>long</code> field into the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putLong(Object obj, long offset, long newValue);
@@ -291,7 +291,7 @@
/**
* Gets an <code>Object</code> field from the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
* @return the retrieved value
@@ -300,10 +300,10 @@
/**
* Stores an <code>Object</code> field into the given object.
- *
+ *
* @param obj non-null; object containing the field
* @param offset offset to the field within <code>obj</code>
- * @param newValue the value to store
+ * @param newValue the value to store
*/
public native void putObject(Object obj, long offset, Object newValue);
@@ -321,10 +321,10 @@
* a previous call to {@link #unpark}. This method may also return
* spuriously (that is, without the thread being told to unpark
* and without the indicated amount of time elapsing).
- *
+ *
* <p>See {@link java.util.concurrent.locks.LockSupport} for more
* in-depth information of the behavior of this method.</p>
- *
+ *
* @param absolute whether the given time value is absolute
* milliseconds-since-the-epoch (<code>true</code>) or relative
* nanoseconds-from-now (<code>false</code>)
@@ -340,7 +340,7 @@
/**
* Unparks the given object, which must be a {@link Thread}.
- *
+ *
* <p>See {@link java.util.concurrent.locks.LockSupport} for more
* in-depth information of the behavior of this method.</p>
*