Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.IncorrectObjectTypeException


            obj.flags = SEEN;
            objects.add(obj);
            return obj;
          }
          if (!(obj instanceof RevBlob))
            throw new IncorrectObjectTypeException(obj, OBJ_BLOB);
          obj.flags = flags = obj.flags | SEEN;
          if ((flags & UNINTERESTING) == 0)
            return obj;
          if (boundary)
            return obj;
          continue;

        case TYPE_TREE:
          if (obj == null) {
            obj = new RevTree(idBuffer);
            obj.flags = SEEN;
            objects.add(obj);
            return enterTree(obj);
          }
          if (!(obj instanceof RevTree))
            throw new IncorrectObjectTypeException(obj, OBJ_TREE);
          obj.flags = flags = obj.flags | SEEN;
          if ((flags & UNINTERESTING) == 0)
            return enterTree(obj);
          if (boundary)
            return enterTree(obj);
View Full Code Here


  public RevCommit parseCommit(final AnyObjectId id)
      throws MissingObjectException, IncorrectObjectTypeException,
      IOException {
    RevObject c = peel(parseAny(id));
    if (!(c instanceof RevCommit))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_COMMIT);
    return (RevCommit) c;
  }
View Full Code Here

    final RevTree t;
    if (c instanceof RevCommit)
      t = ((RevCommit) c).getTree();
    else if (!(c instanceof RevTree))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_TREE);
    else
      t = (RevTree) c;
    parseHeaders(t);
    return t;
View Full Code Here

   */
  public RevTag parseTag(final AnyObjectId id) throws MissingObjectException,
      IncorrectObjectTypeException, IOException {
    RevObject c = parseAny(id);
    if (!(c instanceof RevTag))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_TAG);
    return (RevTag) c;
  }
View Full Code Here

   */
  public RevCommit getBaseCommit(final int aIdx, final int bIdx)
      throws IncorrectObjectTypeException,
      IOException {
    if (sourceCommits[aIdx] == null)
      throw new IncorrectObjectTypeException(sourceObjects[aIdx],
          Constants.TYPE_COMMIT);
    if (sourceCommits[bIdx] == null)
      throw new IncorrectObjectTypeException(sourceObjects[bIdx],
          Constants.TYPE_COMMIT);
    walk.reset();
    walk.setRevFilter(RevFilter.MERGE_BASE);
    walk.markStart(sourceCommits[aIdx]);
    walk.markStart(sourceCommits[bIdx]);
View Full Code Here

        return new AdaptableFileTreeIterator(this, fileEntry.getFile(), root);
      } else {
        throw new IllegalStateException("Unknown entry type: " + current()); //$NON-NLS-1$
      }
    } else
      throw new IncorrectObjectTypeException(ObjectId.zeroId(),
          Constants.TYPE_TREE);
  }
View Full Code Here

  public RevCommit parseCommit(final AnyObjectId id)
      throws MissingObjectException, IncorrectObjectTypeException,
      IOException {
    RevObject c = peel(parseAny(id));
    if (!(c instanceof RevCommit))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_COMMIT);
    return (RevCommit) c;
  }
View Full Code Here

    final RevTree t;
    if (c instanceof RevCommit)
      t = ((RevCommit) c).getTree();
    else if (!(c instanceof RevTree))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_TREE);
    else
      t = (RevTree) c;
    parseHeaders(t);
    return t;
View Full Code Here

   */
  public RevTag parseTag(final AnyObjectId id) throws MissingObjectException,
      IncorrectObjectTypeException, IOException {
    RevObject c = parseAny(id);
    if (!(c instanceof RevTag))
      throw new IncorrectObjectTypeException(id.toObjectId(),
          Constants.TYPE_TAG);
    return (RevTag) c;
  }
View Full Code Here

      if (typeHint == OBJ_ANY)
        throw new MissingObjectException(objectId.copy(), "unknown");
      throw new MissingObjectException(objectId.copy(), typeHint);
    }
    if (typeHint != OBJ_ANY && ldr.getType() != typeHint)
      throw new IncorrectObjectTypeException(objectId.copy(), typeHint);
    return ldr;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.errors.IncorrectObjectTypeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.