MCPcopy Create free account
hub / github.com/davidgiven/luje / growByOne

Method growByOne

lib/java/util/Vector.java:457–470  ·  view source on GitHub ↗

JIT optimization

()

Source from the content-addressed store, hash-verified

455 * JIT optimization
456 */
457 private void growByOne() {
458 int adding = 0;
459 if (capacityIncrement <= 0) {
460 if ((adding = elementData.length) == 0) {
461 adding = 1;
462 }
463 } else {
464 adding = capacityIncrement;
465 }
466
467 E[] newData = newElementArray(elementData.length + adding);
468 System.arraycopy(elementData, 0, newData, 0, elementCount);
469 elementData = newData;
470 }
471
472 private void growBy(int required) {
473 int adding = 0;

Callers 3

addMethod · 0.95
addElementMethod · 0.95
insertElementAtMethod · 0.95

Calls 2

newElementArrayMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected