Codebase list libfastutil-java / bda88e3
Import upstream version 8.2.3, md5 83c28dce12794bf1d7208512384472d9 Debian Janitor 4 years ago
6 changed file(s) with 16 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
0 8.2.3
1
2 - Array-based lists were not allocating a backing array even if the
3 required capacity was greater than the default capacity, violating
4 the contract. Thanks to 盏一 for reporting this bug.
5
6 - FastMultiByteArrayInputStream had since 2014 the wrong slice size
7 (1Ki instead of 1Gi). Thanks to Thibault Allançon for his detailed
8 reports, which dug out this old one.
9
010 8.2.2
111
212 - Fixed small bug in new lazy allocation scheme for array-based lists.
22
33 build.sysclasspath=ignore
44
5 version=8.2.2
5 version=8.2.3
66
77 dist=dist
88 src=src
285285 */
286286 SUPPRESS_WARNINGS_KEY_UNCHECKED
287287 public void ensureCapacity(final int capacity) {
288 if (capacity <= a.length || a == ARRAYS.DEFAULT_EMPTY_ARRAY) return;
288 if (capacity <= a.length || (a == ARRAYS.DEFAULT_EMPTY_ARRAY && capacity <= DEFAULT_INITIAL_CAPACITY)) return;
289289 #if KEYS_PRIMITIVE
290290 a = ARRAYS.ensureCapacity(a, capacity, size);
291291 #else
24302430 *
24312431 * <p>This method implement an <em>indirect</em> sort. The elements of {@code perm} (which must
24322432 * be exactly the numbers in the interval {@code [0..perm.length)}) will be permuted so that
2433 * {@code a[perm[i]] &le; a[perm[i + 1]]}.
2433 * {@code a[perm[i]] &le; a[perm[i + 1]]} or {@code a[perm[i]] == a[perm[i + 1]]} and {@code b[perm[i]] &le; b[perm[i + 1]]}.
24342434 *
24352435 * <p>This implementation will allocate, in the stable case, a further support array as large as {@code perm} (note that the stable
24362436 * version is slightly faster).
24522452 *
24532453 * <p>This method implement an <em>indirect</em> sort. The elements of {@code perm} (which must
24542454 * be exactly the numbers in the interval {@code [0..perm.length)}) will be permuted so that
2455 * {@code a[perm[i]] &le; a[perm[i + 1]]}.
2455 * {@code a[perm[i]] &le; a[perm[i + 1]]} or {@code a[perm[i]] == a[perm[i + 1]]} and {@code b[perm[i]] &le; b[perm[i + 1]]}.
24562456 *
24572457 * <p>This implementation will allocate, in the stable case, a further support array as large as {@code perm} (note that the stable
24582458 * version is slightly faster).
33 <artifactId>fastutil</artifactId>
44 <packaging>jar</packaging>
55 <name>fastutil</name>
6 <version>8.2.2</version>
6 <version>8.2.3</version>
77 <description>fastutil extends the Java Collections Framework by providing type-specific maps, sets, lists and priority queues with a small memory footprint and fast access and insertion; provides also big (64-bit) arrays, sets and lists, and fast, practical I/O classes for binary and text files.</description>
88 <url>http://fastutil.di.unimi.it/</url>
99 <licenses>
3333 public class FastMultiByteArrayInputStream extends MeasurableInputStream implements RepositionableStream {
3434
3535 /** The number of bits of an array slice index. */
36 public static final int SLICE_BITS = 10;
36 public static final int SLICE_BITS = 30;
3737
3838 /** The maximum length of an array slice. */
3939 public static final int SLICE_SIZE = 1 << SLICE_BITS;