Example usage for org.eclipse.jgit.errors IncorrectObjectTypeException IncorrectObjectTypeException

List of usage examples for org.eclipse.jgit.errors IncorrectObjectTypeException IncorrectObjectTypeException

Introduction

In this page you can find the example usage for org.eclipse.jgit.errors IncorrectObjectTypeException IncorrectObjectTypeException.

Prototype

public IncorrectObjectTypeException(ObjectId id, int type) 

Source Link

Document

Construct an IncorrectObjectTypeException for the specified object id.

Usage

From source file:org.eclipse.egit.core.ContainerTreeIterator.java

License:Open Source License

@Override
public AbstractTreeIterator createSubtreeIterator(ObjectReader reader)
        throws IncorrectObjectTypeException, IOException {
    if (FileMode.TREE.equals(mode))
        return new ContainerTreeIterator(this, (IContainer) ((ResourceEntry) current()).rsrc);
    else//from w  ww.  j a  va2s  . c  o m
        throw new IncorrectObjectTypeException(ObjectId.zeroId(), Constants.TYPE_TREE);
}