]> source.dussan.org Git - jgit.git/commit
Move WorkingTreeIterator inherited state into an object 26/1926/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 19 Nov 2010 01:04:10 +0000 (17:04 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 19 Nov 2010 01:06:12 +0000 (17:06 -0800)
commitbd98a0a9a52973704467cda892e99711524de48b
tree4108bc4af11e0c3523c85c3f1cc4bce969f7b082
parent3de186fbf0e79094bd07c71101d80f39b02eb0ca
Move WorkingTreeIterator inherited state into an object

Instead of copying up to 4 fields from the parent iterator each time a
child iterator is initialized and used, construct a single state
object that contains the 4 fields, and pass that one state object
through to the child.  This makes it easier to add additional state
fields that must be inherited, at the slight expense of an extra
object allocation per TreeWalk, and an extra level of field
indirection whenever the options, nameEncoder, or read buffer is
required by the iterator.

Change-Id: Ic4603c33b772d7a45f9c81140537d51945688fcb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java