void (final int minCapacity) { if (attributeData == null) { attributeData = new Attribute[Math.max(minCapacity, INITIAL_ARRAY_SIZE)]; return; } else if (minCapacity < attributeData.length) { return; } // most JVM's allocate memory in multiples of 'double-words', on // 64-bit it's 16-bytes, on 32-bit it's 8 bytes which all means it makes // sense to increment the capacity in even values. attributeData = Arrays.copyOf(attributeData, ((minCapacity + INITIAL_ARRAY_SIZE) >>> 1) << 1); }