Re: [JGIT PATCH] Support for delegating tree iterators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



onsdag 01 juli 2009 19:52:52 skrev Constantine Plotnikov <constantine.plotnikov@xxxxxxxxx>:
> +	protected void ensurePathCapacity(final int capacity, final int len) {
> +		if(path.length >= capacity) {
> +			return;
> +		}
> +		final byte[] o = path;
> +		int current = o.length;
> +		int newCapacity = current;
> +		while(newCapacity < capacity && newCapacity > 0) {
> +			newCapacity <<= 1;
> +		}
> +		setPathCapacity(newCapacity, len);
> +	}

There are no JUnit tests that directly or indirectly proves this is working as only
the optimized path is taken.


> +	public int getNameLength() {
> +		return pathLen - pathOffset;
> +	}

> +	public void getName(byte[] buffer, int offset) {
> +		System.arraycopy(path, pathOffset, buffer, offset, pathLen - pathOffset);
> +	}

Never used? Not even unit test code.

> -- robin
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]