Bug 535184 - DirCacheBuildIterator is not resettable
Summary: DirCacheBuildIterator is not resettable
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 4.11   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-28 05:44 EDT by Arthur Daussy CLA
Modified: 2018-06-01 08:49 EDT (History)
1 user (show)

See Also:


Attachments
Stacktrace (1.49 KB, text/plain)
2018-05-28 05:44 EDT, Arthur Daussy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Daussy CLA 2018-05-28 05:44:08 EDT
Created attachment 274222 [details]
Stacktrace

It seems that the current implementation of DirCacheBuildIterator is not resettable. Indeed the builder attributes (DirCacheBuilder) is not resetted when the method org.eclipse.jgit.dircache.DirCacheIterator.reset() is called. It may cause an IllegalStateException (see attachment).

Maybe the DirCacheBuildIterator needs it own reset implementation. Something like:

@Override
public void reset() {
	super.reset();
	// Reset the cache builder
	builder = cache.builder();
}
Comment 1 Thomas Wolf CLA 2018-06-01 08:49:31 EDT
For context see bug 535200. (EMF Compare)