Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f868ae43
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f868ae43
编写于
7月 31, 2009
作者:
T
tbell
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
fb547518
33f6b1d4
变更
55
展开全部
隐藏空白更改
内联
并排
Showing
55 changed file
with
4095 addition
and
649 deletion
+4095
-649
make/java/java/FILES_java.gmk
make/java/java/FILES_java.gmk
+2
-0
src/share/classes/java/nio/channels/DatagramChannel.java
src/share/classes/java/nio/channels/DatagramChannel.java
+1
-1
src/share/classes/java/nio/channels/package-info.java
src/share/classes/java/nio/channels/package-info.java
+2
-2
src/share/classes/java/nio/file/DirectoryStream.java
src/share/classes/java/nio/file/DirectoryStream.java
+1
-1
src/share/classes/java/nio/file/Path.java
src/share/classes/java/nio/file/Path.java
+1
-1
src/share/classes/java/nio/file/attribute/package-info.java
src/share/classes/java/nio/file/attribute/package-info.java
+2
-2
src/share/classes/java/util/Arrays.java
src/share/classes/java/util/Arrays.java
+221
-58
src/share/classes/java/util/Collections.java
src/share/classes/java/util/Collections.java
+76
-35
src/share/classes/java/util/ComparableTimSort.java
src/share/classes/java/util/ComparableTimSort.java
+895
-0
src/share/classes/java/util/Formatter.java
src/share/classes/java/util/Formatter.java
+7
-4
src/share/classes/java/util/TimSort.java
src/share/classes/java/util/TimSort.java
+928
-0
src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
...e/classes/java/util/concurrent/ConcurrentLinkedQueue.java
+295
-156
src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
...are/classes/java/util/concurrent/LinkedBlockingDeque.java
+256
-140
src/share/classes/java/util/concurrent/LinkedBlockingQueue.java
...are/classes/java/util/concurrent/LinkedBlockingQueue.java
+220
-186
src/solaris/native/java/lang/UNIXProcess_md.c
src/solaris/native/java/lang/UNIXProcess_md.c
+8
-6
src/windows/classes/sun/nio/fs/WindowsConstants.java
src/windows/classes/sun/nio/fs/WindowsConstants.java
+1
-0
src/windows/classes/sun/nio/fs/WindowsFileAttributes.java
src/windows/classes/sun/nio/fs/WindowsFileAttributes.java
+33
-0
test/java/nio/channels/DatagramChannel/BasicMulticastTests.java
...ava/nio/channels/DatagramChannel/BasicMulticastTests.java
+1
-0
test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
...o/channels/DatagramChannel/MulticastSendReceiveTests.java
+1
-0
test/java/nio/file/Files/ContentType.java
test/java/nio/file/Files/ContentType.java
+1
-0
test/java/nio/file/Path/Misc.java
test/java/nio/file/Path/Misc.java
+23
-1
test/java/util/Collection/MOAT.java
test/java/util/Collection/MOAT.java
+35
-0
test/java/util/Formatter/Basic-X.java
test/java/util/Formatter/Basic-X.java
+4
-0
test/java/util/Formatter/Basic.java
test/java/util/Formatter/Basic.java
+1
-1
test/java/util/Formatter/BasicBigDecimal.java
test/java/util/Formatter/BasicBigDecimal.java
+4
-0
test/java/util/Formatter/BasicBigInteger.java
test/java/util/Formatter/BasicBigInteger.java
+4
-0
test/java/util/Formatter/BasicBoolean.java
test/java/util/Formatter/BasicBoolean.java
+4
-0
test/java/util/Formatter/BasicBooleanObject.java
test/java/util/Formatter/BasicBooleanObject.java
+4
-0
test/java/util/Formatter/BasicByte.java
test/java/util/Formatter/BasicByte.java
+4
-0
test/java/util/Formatter/BasicByteObject.java
test/java/util/Formatter/BasicByteObject.java
+4
-0
test/java/util/Formatter/BasicChar.java
test/java/util/Formatter/BasicChar.java
+4
-0
test/java/util/Formatter/BasicCharObject.java
test/java/util/Formatter/BasicCharObject.java
+4
-0
test/java/util/Formatter/BasicDateTime.java
test/java/util/Formatter/BasicDateTime.java
+4
-0
test/java/util/Formatter/BasicDouble.java
test/java/util/Formatter/BasicDouble.java
+4
-0
test/java/util/Formatter/BasicDoubleObject.java
test/java/util/Formatter/BasicDoubleObject.java
+4
-0
test/java/util/Formatter/BasicFloat.java
test/java/util/Formatter/BasicFloat.java
+4
-0
test/java/util/Formatter/BasicFloatObject.java
test/java/util/Formatter/BasicFloatObject.java
+4
-0
test/java/util/Formatter/BasicInt.java
test/java/util/Formatter/BasicInt.java
+4
-0
test/java/util/Formatter/BasicIntObject.java
test/java/util/Formatter/BasicIntObject.java
+4
-0
test/java/util/Formatter/BasicLong.java
test/java/util/Formatter/BasicLong.java
+4
-0
test/java/util/Formatter/BasicLongObject.java
test/java/util/Formatter/BasicLongObject.java
+4
-0
test/java/util/Formatter/BasicShort.java
test/java/util/Formatter/BasicShort.java
+4
-0
test/java/util/Formatter/BasicShortObject.java
test/java/util/Formatter/BasicShortObject.java
+4
-0
test/java/util/TimSort/ArrayBuilder.java
test/java/util/TimSort/ArrayBuilder.java
+142
-0
test/java/util/TimSort/README
test/java/util/TimSort/README
+4
-0
test/java/util/TimSort/SortPerf.java
test/java/util/TimSort/SortPerf.java
+66
-0
test/java/util/TimSort/Sorter.java
test/java/util/TimSort/Sorter.java
+55
-0
test/java/util/concurrent/BlockingQueue/OfferDrainToLoops.java
...java/util/concurrent/BlockingQueue/OfferDrainToLoops.java
+130
-0
test/java/util/concurrent/ConcurrentQueues/ConcurrentQueueLoops.java
...til/concurrent/ConcurrentQueues/ConcurrentQueueLoops.java
+75
-23
test/java/util/concurrent/ConcurrentQueues/GCRetention.java
test/java/util/concurrent/ConcurrentQueues/GCRetention.java
+165
-0
test/java/util/concurrent/ConcurrentQueues/IteratorWeakConsistency.java
.../concurrent/ConcurrentQueues/IteratorWeakConsistency.java
+93
-0
test/java/util/concurrent/ConcurrentQueues/LoopHelpers.java
test/java/util/concurrent/ConcurrentQueues/LoopHelpers.java
+0
-0
test/java/util/concurrent/ConcurrentQueues/RemovePollRace.java
...java/util/concurrent/ConcurrentQueues/RemovePollRace.java
+230
-0
test/java/util/concurrent/LinkedBlockingQueue/OfferRemoveLoops.java
...util/concurrent/LinkedBlockingQueue/OfferRemoveLoops.java
+43
-31
test/sun/security/krb5/ConfPlusProp.java
test/sun/security/krb5/ConfPlusProp.java
+1
-1
未找到文件。
make/java/java/FILES_java.gmk
浏览文件 @
f868ae43
...
...
@@ -250,6 +250,8 @@ JAVA_JAVA_java = \
java/util/IdentityHashMap.java \
java/util/EnumMap.java \
java/util/Arrays.java \
java/util/TimSort.java \
java/util/ComparableTimSort.java \
java/util/ConcurrentModificationException.java \
java/util/ServiceLoader.java \
java/util/ServiceConfigurationError.java \
...
...
src/share/classes/java/nio/channels/DatagramChannel.java
浏览文件 @
f868ae43
...
...
@@ -421,7 +421,7 @@ public abstract class DatagramChannel
* invocation of this method will block until the first operation is
* complete. If this channel's socket is not bound then this method will
* first cause the socket to be bound to an address that is assigned
* automatically, as if by invoking the {@link #bind bind
)
method with a
* automatically, as if by invoking the {@link #bind bind
}
method with a
* parameter of {@code null}. </p>
*
* @param src
...
...
src/share/classes/java/nio/channels/package-info.java
浏览文件 @
f868ae43
...
...
@@ -115,8 +115,8 @@
* <td>Reads, writes, maps, and manipulates files</td></tr>
* <tr><td valign=top><tt>{@link java.nio.channels.FileLock}</tt></td>
* <td>A lock on a (region of a) file</td></tr>
* <tr><td valign=top><tt>{@link java.nio.MappedByteBuffer}
/{@link java.nio.MappedBigByteBuffer}
</tt></td>
* <td>A direct byte buffer
or big byte buffer
mapped to a region of a file</td></tr>
* <tr><td valign=top><tt>{@link java.nio.MappedByteBuffer} </tt></td>
* <td>A direct byte buffer mapped to a region of a file</td></tr>
* </table></blockquote>
*
* <p> The {@link java.nio.channels.FileChannel} class supports the usual
...
...
src/share/classes/java/nio/file/DirectoryStream.java
浏览文件 @
f868ae43
...
...
@@ -53,7 +53,7 @@ import java.io.IOException;
* invoking the {@link #close close} method. Closing the directory stream
* releases any resources associated with the stream. Once a directory stream
* is closed, all further method invocations on the iterator throw {@link
* java.util.
concurrent.
ConcurrentModificationException} with cause {@link
* java.util.ConcurrentModificationException} with cause {@link
* ClosedDirectoryStreamException}.
*
* <p> A directory stream is not required to be <i>asynchronously closeable</i>.
...
...
src/share/classes/java/nio/file/Path.java
浏览文件 @
f868ae43
...
...
@@ -987,7 +987,7 @@ public abstract class Path
* exception then it is propogated to the iterator's {@link Iterator#hasNext()
* hasNext} or {@link Iterator#next() next} method. Where an {@code
* IOException} is thrown, it is propogated as a {@link
* java.util.
concurrent.
ConcurrentModificationException} with the {@code
* java.util.ConcurrentModificationException} with the {@code
* IOException} as the cause.
*
* <p> When an implementation supports operations on entries in the
...
...
src/share/classes/java/nio/file/attribute/package-info.java
浏览文件 @
f868ae43
...
...
@@ -102,9 +102,9 @@
* <p><li> The {@link java.nio.file.attribute.UserPrincipalLookupService}
* interface defines methods to lookup user or group principals. </li>
*
* <p><li> The {@link java.nio.file.attribute.Attribute} interface
* <p><li> The {@link java.nio.file.attribute.
File
Attribute} interface
* represents the value of an attribute for cases where the attribute value is
* require to be set atomically when creating an object in the file system. </li>
* require
d
to be set atomically when creating an object in the file system. </li>
*
* </ul>
*
...
...
src/share/classes/java/util/Arrays.java
浏览文件 @
f868ae43
...
...
@@ -1065,29 +1065,103 @@ public class Arrays {
(
x
[
b
]
>
x
[
c
]
?
b
:
x
[
a
]
>
x
[
c
]
?
c
:
a
));
}
/**
* Sorts the specified array of objects into ascending order, according to
* the {@linkplain Comparable natural ordering}
* of its elements. All elements in the array
* must implement the {@link Comparable} interface. Furthermore, all
* elements in the array must be <i>mutually comparable</i> (that is,
* <tt>e1.compareTo(e2)</tt> must not throw a <tt>ClassCastException</tt>
* for any elements <tt>e1</tt> and <tt>e2</tt> in the array).<p>
* Old merge sort implementation can be selected (for
* compatibility with broken comparators) using a system property.
* Cannot be a static boolean in the enclosing class due to
* circular dependencies. To be removed in a future release.
*/
static
final
class
LegacyMergeSort
{
private
static
final
boolean
userRequested
=
java
.
security
.
AccessController
.
doPrivileged
(
new
sun
.
security
.
action
.
GetBooleanAction
(
"java.util.Arrays.useLegacyMergeSort"
)).
booleanValue
();
}
/*
* If this platform has an optimizing VM, check whether ComparableTimSort
* offers any performance benefit over TimSort in conjunction with a
* comparator that returns:
* {@code ((Comparable)first).compareTo(Second)}.
* If not, you are better off deleting ComparableTimSort to
* eliminate the code duplication. In other words, the commented
* out code below is the preferable implementation for sorting
* arrays of Comparables if it offers sufficient performance.
*/
// /**
// * A comparator that implements the natural ordering of a group of
// * mutually comparable elements. Using this comparator saves us
// * from duplicating most of the code in this file (one version for
// * Comparables, one for explicit Comparators).
// */
// private static final Comparator<Object> NATURAL_ORDER =
// new Comparator<Object>() {
// @SuppressWarnings("unchecked")
// public int compare(Object first, Object second) {
// return ((Comparable<Object>)first).compareTo(second);
// }
// };
//
// public static void sort(Object[] a) {
// sort(a, 0, a.length, NATURAL_ORDER);
// }
//
// public static void sort(Object[] a, int fromIndex, int toIndex) {
// sort(a, fromIndex, toIndex, NATURAL_ORDER);
// }
/**
* Sorts the specified array of objects into ascending order, according
* to the {@linkplain Comparable natural ordering} of its elements.
* All elements in the array must implement the {@link Comparable}
* interface. Furthermore, all elements in the array must be
* <i>mutually comparable</i> (that is, {@code e1.compareTo(e2)} must
* not throw a {@code ClassCastException} for any elements {@code e1}
* and {@code e2} in the array).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n*log(n) performance.
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* @param a the array to be sorted
* @throws ClassCastException if the array contains elements that are not
* <i>mutually comparable</i> (for example, strings and integers).
* @throws ClassCastException if the array contains elements that are not
* <i>mutually comparable</i> (for example, strings and integers)
* @throws IllegalArgumentException (optional) if the natural
* ordering of the array elements is found to violate the
* {@link Comparable} contract
*/
public
static
void
sort
(
Object
[]
a
)
{
if
(
LegacyMergeSort
.
userRequested
)
legacyMergeSort
(
a
);
else
ComparableTimSort
.
sort
(
a
);
}
/** To be removed in a future release. */
private
static
void
legacyMergeSort
(
Object
[]
a
)
{
Object
[]
aux
=
a
.
clone
();
mergeSort
(
aux
,
a
,
0
,
a
.
length
,
0
);
}
...
...
@@ -1097,34 +1171,63 @@ public class Arrays {
* ascending order, according to the
* {@linkplain Comparable natural ordering} of its
* elements. The range to be sorted extends from index
*
<tt>fromIndex</tt>, inclusive, to index <tt>toIndex</tt>
, exclusive.
* (If
<tt>fromIndex==toIndex</tt>
, the range to be sorted is empty.) All
*
{@code fromIndex}, inclusive, to index {@code toIndex}
, exclusive.
* (If
{@code fromIndex==toIndex}
, the range to be sorted is empty.) All
* elements in this range must implement the {@link Comparable}
* interface. Furthermore, all elements in this range must be <i>mutually
* comparable</i> (that is, <tt>e1.compareTo(e2)</tt> must not throw a
* <tt>ClassCastException</tt> for any elements <tt>e1</tt> and
* <tt>e2</tt> in the array).<p>
* comparable</i> (that is, {@code e1.compareTo(e2)} must not throw a
* {@code ClassCastException} for any elements {@code e1} and
* {@code e2} in the array).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n*log(n) performance.
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* @param a the array to be sorted
* @param fromIndex the index of the first element (inclusive) to be
* sorted
* @param toIndex the index of the last element (exclusive) to be sorted
* @throws IllegalArgumentException if <tt>fromIndex > toIndex</tt>
* @throws ArrayIndexOutOfBoundsException if <tt>fromIndex < 0</tt> or
* <tt>toIndex > a.length</tt>
* @throws ClassCastException if the array contains elements that are
* not <i>mutually comparable</i> (for example, strings and
* integers).
* @throws IllegalArgumentException if {@code fromIndex > toIndex} or
* (optional) if the natural ordering of the array elements is
* found to violate the {@link Comparable} contract
* @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
* {@code toIndex > a.length}
* @throws ClassCastException if the array contains elements that are
* not <i>mutually comparable</i> (for example, strings and
* integers).
*/
public
static
void
sort
(
Object
[]
a
,
int
fromIndex
,
int
toIndex
)
{
if
(
LegacyMergeSort
.
userRequested
)
legacyMergeSort
(
a
,
fromIndex
,
toIndex
);
else
ComparableTimSort
.
sort
(
a
,
fromIndex
,
toIndex
);
}
/** To be removed in a future release. */
private
static
void
legacyMergeSort
(
Object
[]
a
,
int
fromIndex
,
int
toIndex
)
{
rangeCheck
(
a
.
length
,
fromIndex
,
toIndex
);
Object
[]
aux
=
copyOfRange
(
a
,
fromIndex
,
toIndex
);
mergeSort
(
aux
,
a
,
fromIndex
,
toIndex
,
-
fromIndex
);
...
...
@@ -1133,6 +1236,7 @@ public class Arrays {
/**
* Tuning parameter: list size at or below which insertion sort will be
* used in preference to mergesort or quicksort.
* To be removed in a future release.
*/
private
static
final
int
INSERTIONSORT_THRESHOLD
=
7
;
...
...
@@ -1142,6 +1246,7 @@ public class Arrays {
* low is the index in dest to start sorting
* high is the end index in dest to end sorting
* off is the offset to generate corresponding low, high in src
* To be removed in a future release.
*/
private
static
void
mergeSort
(
Object
[]
src
,
Object
[]
dest
,
...
...
@@ -1197,25 +1302,53 @@ public class Arrays {
* Sorts the specified array of objects according to the order induced by
* the specified comparator. All elements in the array must be
* <i>mutually comparable</i> by the specified comparator (that is,
* <tt>c.compare(e1, e2)</tt> must not throw a <tt>ClassCastException</tt>
* for any elements <tt>e1</tt> and <tt>e2</tt> in the array).<p>
* {@code c.compare(e1, e2)} must not throw a {@code ClassCastException}
* for any elements {@code e1} and {@code e2} in the array).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n*log(n) performance.
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* @param a the array to be sorted
* @param c the comparator to determine the order of the array. A
*
<tt>null</tt>
value indicates that the elements'
*
{@code null}
value indicates that the elements'
* {@linkplain Comparable natural ordering} should be used.
* @throws ClassCastException if the array contains elements that are
* not <i>mutually comparable</i> using the specified comparator.
* @throws ClassCastException if the array contains elements that are
* not <i>mutually comparable</i> using the specified comparator
* @throws IllegalArgumentException (optional) if the comparator is
* found to violate the {@link Comparator} contract
*/
public
static
<
T
>
void
sort
(
T
[]
a
,
Comparator
<?
super
T
>
c
)
{
if
(
LegacyMergeSort
.
userRequested
)
legacyMergeSort
(
a
,
c
);
else
TimSort
.
sort
(
a
,
c
);
}
/** To be removed in a future release. */
private
static
<
T
>
void
legacyMergeSort
(
T
[]
a
,
Comparator
<?
super
T
>
c
)
{
T
[]
aux
=
a
.
clone
();
if
(
c
==
null
)
mergeSort
(
aux
,
a
,
0
,
a
.
length
,
0
);
...
...
@@ -1226,36 +1359,65 @@ public class Arrays {
/**
* Sorts the specified range of the specified array of objects according
* to the order induced by the specified comparator. The range to be
* sorted extends from index
<tt>fromIndex</tt>
, inclusive, to index
*
<tt>toIndex</tt>, exclusive. (If <tt>fromIndex==toIndex</tt>
, the
* sorted extends from index
{@code fromIndex}
, inclusive, to index
*
{@code toIndex}, exclusive. (If {@code fromIndex==toIndex}
, the
* range to be sorted is empty.) All elements in the range must be
* <i>mutually comparable</i> by the specified comparator (that is,
* <tt>c.compare(e1, e2)</tt> must not throw a <tt>ClassCastException</tt>
* for any elements <tt>e1</tt> and <tt>e2</tt> in the range).<p>
* {@code c.compare(e1, e2)} must not throw a {@code ClassCastException}
* for any elements {@code e1} and {@code e2} in the range).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n*log(n) performance.
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* @param a the array to be sorted
* @param fromIndex the index of the first element (inclusive) to be
* sorted
* @param toIndex the index of the last element (exclusive) to be sorted
* @param c the comparator to determine the order of the array. A
*
<tt>null</tt>
value indicates that the elements'
*
{@code null}
value indicates that the elements'
* {@linkplain Comparable natural ordering} should be used.
* @throws ClassCastException if the array contains elements that are not
* <i>mutually comparable</i> using the specified comparator.
* @throws IllegalArgumentException if <tt>fromIndex > toIndex</tt>
* @throws ArrayIndexOutOfBoundsException if <tt>fromIndex < 0</tt> or
* <tt>toIndex > a.length</tt>
* @throws IllegalArgumentException if {@code fromIndex > toIndex} or
* (optional) if the comparator is found to violate the
* {@link Comparator} contract
* @throws ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or
* {@code toIndex > a.length}
*/
public
static
<
T
>
void
sort
(
T
[]
a
,
int
fromIndex
,
int
toIndex
,
Comparator
<?
super
T
>
c
)
{
if
(
LegacyMergeSort
.
userRequested
)
legacyMergeSort
(
a
,
fromIndex
,
toIndex
,
c
);
else
TimSort
.
sort
(
a
,
fromIndex
,
toIndex
,
c
);
}
/** To be removed in a future release. */
private
static
<
T
>
void
legacyMergeSort
(
T
[]
a
,
int
fromIndex
,
int
toIndex
,
Comparator
<?
super
T
>
c
)
{
rangeCheck
(
a
.
length
,
fromIndex
,
toIndex
);
T
[]
aux
=
copyOfRange
(
a
,
fromIndex
,
toIndex
);
if
(
c
==
null
)
...
...
@@ -1270,6 +1432,7 @@ public class Arrays {
* low is the index in dest to start sorting
* high is the end index in dest to end sorting
* off is the offset into src corresponding to low in dest
* To be removed in a future release.
*/
private
static
void
mergeSort
(
Object
[]
src
,
Object
[]
dest
,
...
...
src/share/classes/java/util/Collections.java
浏览文件 @
f868ae43
...
...
@@ -100,23 +100,42 @@ public class Collections {
/**
* Sorts the specified list into ascending order, according to the
* <i>natural ordering</i> of its elements. All elements in the list must
* implement the <tt>Comparable</tt> interface. Furthermore, all elements
* in the list must be <i>mutually comparable</i> (that is,
* <tt>e1.compareTo(e2)</tt> must not throw a <tt>ClassCastException</tt>
* for any elements <tt>e1</tt> and <tt>e2</tt> in the list).<p>
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
*
* The specified list must be modifiable, but need not be resizable.<p>
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n log(n) performance.
*
* This implementation dumps the specified list into an array, sorts
* {@linkplain Comparable natural ordering} of its elements.
* All elements in the list must implement the {@link Comparable}
* interface. Furthermore, all elements in the list must be
* <i>mutually comparable</i> (that is, {@code e1.compareTo(e2)}
* must not throw a {@code ClassCastException} for any elements
* {@code e1} and {@code e2} in the list).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>The specified list must be modifiable, but need not be resizable.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* <p>This implementation dumps the specified list into an array, sorts
* the array, and iterates over the list resetting each element
* from the corresponding position in the array. This avoids the
* n<sup>2</sup> log(n) performance that would result from attempting
...
...
@@ -126,8 +145,10 @@ public class Collections {
* @throws ClassCastException if the list contains elements that are not
* <i>mutually comparable</i> (for example, strings and integers).
* @throws UnsupportedOperationException if the specified list's
* list-iterator does not support the <tt>set</tt> operation.
* @see Comparable
* list-iterator does not support the {@code set} operation.
* @throws IllegalArgumentException (optional) if the implementation
* detects that the natural ordering of the list elements is
* found to violate the {@link Comparable} contract
*/
public
static
<
T
extends
Comparable
<?
super
T
>>
void
sort
(
List
<
T
>
list
)
{
Object
[]
a
=
list
.
toArray
();
...
...
@@ -143,19 +164,38 @@ public class Collections {
* Sorts the specified list according to the order induced by the
* specified comparator. All elements in the list must be <i>mutually
* comparable</i> using the specified comparator (that is,
* <tt>c.compare(e1, e2)</tt> must not throw a <tt>ClassCastException</tt>
* for any elements <tt>e1</tt> and <tt>e2</tt> in the list).<p>
*
* This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.<p>
*
* The sorting algorithm is a modified mergesort (in which the merge is
* omitted if the highest element in the low sublist is less than the
* lowest element in the high sublist). This algorithm offers guaranteed
* n log(n) performance.
*
* The specified list must be modifiable, but need not be resizable.
* This implementation dumps the specified list into an array, sorts
* {@code c.compare(e1, e2)} must not throw a {@code ClassCastException}
* for any elements {@code e1} and {@code e2} in the list).
*
* <p>This sort is guaranteed to be <i>stable</i>: equal elements will
* not be reordered as a result of the sort.
*
* <p>The specified list must be modifiable, but need not be resizable.
*
* <p>Implementation note: This implementation is a stable, adaptive,
* iterative mergesort that requires far fewer than n lg(n) comparisons
* when the input array is partially sorted, while offering the
* performance of a traditional mergesort when the input array is
* randomly ordered. If the input array is nearly sorted, the
* implementation requires approximately n comparisons. Temporary
* storage requirements vary from a small constant for nearly sorted
* input arrays to n/2 object references for randomly ordered input
* arrays.
*
* <p>The implementation takes equal advantage of ascending and
* descending order in its input array, and can take advantage of
* ascending and descending order in different parts of the the same
* input array. It is well-suited to merging two or more sorted arrays:
* simply concatenate the arrays and sort the resulting array.
*
* <p>The implementation was adapted from Tim Peters's list sort for Python
* (<a href="http://svn.python.org/projects/python/trunk/Objects/listsort.txt">
* TimSort</a>). It uses techiques from Peter McIlroy's "Optimistic
* Sorting and Information Theoretic Complexity", in Proceedings of the
* Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474,
* January 1993.
*
* <p>This implementation dumps the specified list into an array, sorts
* the array, and iterates over the list resetting each element
* from the corresponding position in the array. This avoids the
* n<sup>2</sup> log(n) performance that would result from attempting
...
...
@@ -163,13 +203,14 @@ public class Collections {
*
* @param list the list to be sorted.
* @param c the comparator to determine the order of the list. A
*
<tt>null</tt>
value indicates that the elements' <i>natural
*
{@code null}
value indicates that the elements' <i>natural
* ordering</i> should be used.
* @throws ClassCastException if the list contains elements that are not
* <i>mutually comparable</i> using the specified comparator.
* @throws UnsupportedOperationException if the specified list's
* list-iterator does not support the <tt>set</tt> operation.
* @see Comparator
* list-iterator does not support the {@code set} operation.
* @throws IllegalArgumentException (optional) if the comparator is
* found to violate the {@link Comparator} contract
*/
public
static
<
T
>
void
sort
(
List
<
T
>
list
,
Comparator
<?
super
T
>
c
)
{
Object
[]
a
=
list
.
toArray
();
...
...
src/share/classes/java/util/ComparableTimSort.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
src/share/classes/java/util/Formatter.java
浏览文件 @
f868ae43
...
...
@@ -2818,15 +2818,18 @@ public final class Formatter implements Closeable, Flushable {
}
private
void
printString
(
Object
arg
,
Locale
l
)
throws
IOException
{
if
(
arg
==
null
)
{
print
(
"null"
);
}
else
if
(
arg
instanceof
Formattable
)
{
if
(
arg
instanceof
Formattable
)
{
Formatter
fmt
=
formatter
;
if
(
formatter
.
locale
()
!=
l
)
fmt
=
new
Formatter
(
formatter
.
out
(),
l
);
((
Formattable
)
arg
).
formatTo
(
fmt
,
f
.
valueOf
(),
width
,
precision
);
}
else
{
print
(
arg
.
toString
());
if
(
f
.
contains
(
Flags
.
ALTERNATE
))
failMismatch
(
Flags
.
ALTERNATE
,
's'
);
if
(
arg
==
null
)
print
(
"null"
);
else
print
(
arg
.
toString
());
}
}
...
...
src/share/classes/java/util/TimSort.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
src/share/classes/java/util/concurrent/LinkedBlockingQueue.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
src/solaris/native/java/lang/UNIXProcess_md.c
浏览文件 @
f868ae43
...
...
@@ -447,14 +447,16 @@ execve_with_shell_fallback(const char *file,
}
/**
* execvpe should have been included in the Unix standards.
* execvpe is identical to execvp, except that the child environment is
* 'execvpe' should have been included in the Unix standards,
* and is a GNU extension in glibc 2.10.
*
* JDK_execvpe is identical to execvp, except that the child environment is
* specified via the 3rd argument instead of being inherited from environ.
*/
static
void
execvpe
(
const
char
*
file
,
const
char
*
argv
[],
const
char
*
const
envp
[])
JDK_
execvpe
(
const
char
*
file
,
const
char
*
argv
[],
const
char
*
const
envp
[])
{
/* This is one of the rare times it's more portable to declare an
* external symbol explicitly, rather than via a system header.
...
...
@@ -644,7 +646,7 @@ childProcess(void *arg)
if
(
fcntl
(
FAIL_FILENO
,
F_SETFD
,
FD_CLOEXEC
)
==
-
1
)
goto
WhyCantJohnnyExec
;
execvpe
(
p
->
argv
[
0
],
p
->
argv
,
p
->
envv
);
JDK_
execvpe
(
p
->
argv
[
0
],
p
->
argv
,
p
->
envv
);
WhyCantJohnnyExec:
/* We used to go to an awful lot of trouble to predict whether the
...
...
src/windows/classes/sun/nio/fs/WindowsConstants.java
浏览文件 @
f868ae43
...
...
@@ -92,6 +92,7 @@ class WindowsConstants {
public
static
final
int
ERROR_INVALID_DATA
=
13
;
public
static
final
int
ERROR_NOT_SAME_DEVICE
=
17
;
public
static
final
int
ERROR_NOT_READY
=
21
;
public
static
final
int
ERROR_SHARING_VIOLATION
=
32
;
public
static
final
int
ERROR_FILE_EXISTS
=
80
;
public
static
final
int
ERROR_INVALID_PARAMATER
=
87
;
public
static
final
int
ERROR_DISK_FULL
=
112
;
...
...
src/windows/classes/sun/nio/fs/WindowsFileAttributes.java
浏览文件 @
f868ae43
...
...
@@ -299,6 +299,9 @@ class WindowsFileAttributes
throws
WindowsException
{
if
(!
ensureAccurateMetadata
)
{
WindowsException
firstException
=
null
;
// GetFileAttributesEx is the fastest way to read the attributes
NativeBuffer
buffer
=
NativeBuffers
.
getNativeBuffer
(
SIZEOF_FILE_ATTRIBUTE_DATA
);
try
{
...
...
@@ -310,9 +313,39 @@ class WindowsFileAttributes
.
getInt
(
address
+
OFFSETOF_FILE_ATTRIBUTE_DATA_ATTRIBUTES
);
if
((
fileAttrs
&
FILE_ATTRIBUTE_REPARSE_POINT
)
==
0
)
return
fromFileAttributeData
(
address
,
0
);
}
catch
(
WindowsException
x
)
{
if
(
x
.
lastError
()
!=
ERROR_SHARING_VIOLATION
)
throw
x
;
firstException
=
x
;
}
finally
{
buffer
.
release
();
}
// For sharing violations, fallback to FindFirstFile if the file
// is not a root directory.
if
(
firstException
!=
null
)
{
String
search
=
path
.
getPathForWin32Calls
();
char
last
=
search
.
charAt
(
search
.
length
()
-
1
);
if
(
last
==
':'
||
last
==
'\\'
)
throw
firstException
;
buffer
=
getBufferForFindData
();
try
{
long
handle
=
FindFirstFile
(
search
,
buffer
.
address
());
FindClose
(
handle
);
WindowsFileAttributes
attrs
=
fromFindData
(
buffer
.
address
());
// FindFirstFile does not follow sym links. Even if
// followLinks is false, there isn't sufficient information
// in the WIN32_FIND_DATA structure to know if the reparse
// point is a sym link.
if
(
attrs
.
isReparsePoint
())
throw
firstException
;
return
attrs
;
}
catch
(
WindowsException
ignore
)
{
throw
firstException
;
}
finally
{
buffer
.
release
();
}
}
}
// file is reparse point so need to open file to get attributes
...
...
test/java/nio/channels/DatagramChannel/BasicMulticastTests.java
浏览文件 @
f868ae43
...
...
@@ -25,6 +25,7 @@
* @bug 4527345
* @summary Unit test for DatagramChannel's multicast support
* @build BasicMulticastTests NetworkConfiguration
* @run main BasicMulticastTests
*/
import
java.nio.ByteBuffer
;
...
...
test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
浏览文件 @
f868ae43
...
...
@@ -25,6 +25,7 @@
* @bug 4527345
* @summary Unit test for DatagramChannel's multicast support
* @build MulticastSendReceiveTests NetworkConfiguration
* @run main MulticastSendReceiveTests
*/
import
java.nio.ByteBuffer
;
...
...
test/java/nio/file/Files/ContentType.java
浏览文件 @
f868ae43
...
...
@@ -26,6 +26,7 @@
* @summary Unit test for probeContentType method
* @library ..
* @build ContentType SimpleFileTypeDetector
* @run main ContentType
*/
import
java.nio.file.*
;
...
...
test/java/nio/file/Path/Misc.java
浏览文件 @
f868ae43
...
...
@@ -22,7 +22,7 @@
*/
/* @test
* @bug 4313887 6838333
* @bug 4313887 6838333
6866804
* @summary Unit test for java.nio.file.Path for miscellenous methods not
* covered by other tests
* @library ..
...
...
@@ -106,6 +106,28 @@ public class Misc {
dir
.
checkAccess
(
AccessMode
.
WRITE
);
dir
.
checkAccess
(
AccessMode
.
READ
,
AccessMode
.
WRITE
);
/**
* Test: Check access to all files in all root directories.
* (A useful test on Windows for special files such as pagefile.sys)
*/
for
(
Path
root:
FileSystems
.
getDefault
().
getRootDirectories
())
{
DirectoryStream
<
Path
>
stream
;
try
{
stream
=
root
.
newDirectoryStream
();
}
catch
(
IOException
x
)
{
continue
;
// skip root directories that aren't accessible
}
try
{
for
(
Path
entry:
stream
)
{
try
{
entry
.
checkAccess
();
}
catch
(
AccessDeniedException
ignore
)
{
}
}
}
finally
{
stream
.
close
();
}
}
/**
* Test: File does not exist
*/
...
...
test/java/util/Collection/MOAT.java
浏览文件 @
f868ae43
...
...
@@ -426,6 +426,36 @@ public class MOAT {
q
.
poll
();
equal
(
q
.
size
(),
4
);
checkFunctionalInvariants
(
q
);
if
((
q
instanceof
LinkedBlockingQueue
)
||
(
q
instanceof
LinkedBlockingDeque
)
||
(
q
instanceof
ConcurrentLinkedQueue
))
{
testQueueIteratorRemove
(
q
);
}
}
private
static
void
testQueueIteratorRemove
(
Queue
<
Integer
>
q
)
{
System
.
err
.
printf
(
"testQueueIteratorRemove %s%n"
,
q
.
getClass
().
getSimpleName
());
q
.
clear
();
for
(
int
i
=
0
;
i
<
5
;
i
++)
q
.
add
(
i
);
Iterator
<
Integer
>
it
=
q
.
iterator
();
check
(
it
.
hasNext
());
for
(
int
i
=
3
;
i
>=
0
;
i
--)
q
.
remove
(
i
);
equal
(
it
.
next
(),
0
);
equal
(
it
.
next
(),
4
);
q
.
clear
();
for
(
int
i
=
0
;
i
<
5
;
i
++)
q
.
add
(
i
);
it
=
q
.
iterator
();
equal
(
it
.
next
(),
0
);
check
(
it
.
hasNext
());
for
(
int
i
=
1
;
i
<
4
;
i
++)
q
.
remove
(
i
);
equal
(
it
.
next
(),
1
);
equal
(
it
.
next
(),
4
);
}
private
static
void
testList
(
final
List
<
Integer
>
l
)
{
...
...
@@ -451,6 +481,11 @@ public class MOAT {
}
private
static
void
testCollection
(
Collection
<
Integer
>
c
)
{
try
{
testCollection1
(
c
);
}
catch
(
Throwable
t
)
{
unexpected
(
t
);
}
}
private
static
void
testCollection1
(
Collection
<
Integer
>
c
)
{
System
.
out
.
println
(
"\n==> "
+
c
.
getClass
().
getName
());
...
...
test/java/util/Formatter/Basic-X.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class Basic$Type$ extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/Basic.java
浏览文件 @
f868ae43
...
...
@@ -25,7 +25,7 @@
* @summary Unit test for formatter
* @bug 4906370 4962433 4973103 4989961 5005818 5031150 4970931 4989491 5002937
* 5005104 5007745 5061412 5055180 5066788 5088703 6317248 6318369 6320122
* 6344623 6369500 6534606 6282094 6286592 6476425
* 6344623 6369500 6534606 6282094 6286592 6476425
5063507
*
* @run shell/timeout=240 Basic.sh
*/
...
...
test/java/util/Formatter/BasicBigDecimal.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicBigDecimal extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicBigInteger.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicBigInteger extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicBoolean.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicBoolean extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicBooleanObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicBooleanObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicByte.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicByte extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicByteObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicByteObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicChar.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicChar extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicCharObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicCharObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicDateTime.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicDateTime extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicDouble.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicDouble extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicDoubleObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicDoubleObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicFloat.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicFloat extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicFloatObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicFloatObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicInt.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicInt extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicIntObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicIntObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicLong.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicLong extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicLongObject.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicLongObject extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicShort.java
浏览文件 @
f868ae43
...
...
@@ -486,6 +486,10 @@ public class BasicShort extends Basic {
//---------------------------------------------------------------------
tryCatch
(
"%-s"
,
MissingFormatWidthException
.
class
);
tryCatch
(
"%--s"
,
DuplicateFormatFlagsException
.
class
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
0.5f
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
"hello"
);
tryCatch
(
"%#s"
,
FormatFlagsConversionMismatchException
.
class
,
null
);
//---------------------------------------------------------------------
// %h
...
...
test/java/util/Formatter/BasicShortObject.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/TimSort/ArrayBuilder.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/TimSort/README
0 → 100644
浏览文件 @
f868ae43
This directory contains benchmark programs used to compare the
performance of the TimSort algorithm against the historic 1997
implementation of Arrays.sort. Any future benchmarking will require
minor modifications.
test/java/util/TimSort/SortPerf.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/TimSort/Sorter.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/BlockingQueue/OfferDrainToLoops.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/Concurrent
LinkedQueue
/ConcurrentQueueLoops.java
→
test/java/util/concurrent/Concurrent
Queues
/ConcurrentQueueLoops.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/ConcurrentQueues/GCRetention.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/ConcurrentQueues/IteratorWeakConsistency.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/Concurrent
LinkedQueue
/LoopHelpers.java
→
test/java/util/concurrent/Concurrent
Queues
/LoopHelpers.java
浏览文件 @
f868ae43
文件已移动
test/java/util/concurrent/ConcurrentQueues/RemovePollRace.java
0 → 100644
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/java/util/concurrent/LinkedBlockingQueue/OfferRemoveLoops.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
test/sun/security/krb5/ConfPlusProp.java
浏览文件 @
f868ae43
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录