1913 |
|
Collections.shuffle(Arrays.asList(array), ThreadLocalRandom.current()); |
1914 |
|
} |
1915 |
|
|
1916 |
+ |
/** |
1917 |
+ |
* Returns the same String as would be returned by {@link |
1918 |
+ |
* Object#toString}, whether or not the given object's class |
1919 |
+ |
* overrides toString(). |
1920 |
+ |
* |
1921 |
+ |
* @see System#identityHashCode |
1922 |
+ |
*/ |
1923 |
+ |
static String identityString(Object x) { |
1924 |
+ |
return x.getClass().getName() |
1925 |
+ |
+ "@" + Integer.toHexString(System.identityHashCode(x)); |
1926 |
+ |
} |
1927 |
+ |
|
1928 |
|
// --- Shared assertions for Executor tests --- |
1929 |
|
|
1930 |
|
/** |