private void checkSubmodules() throws IOException { ObjectDatabase odb = db.getObjectDatabase(); if (objectChecker == null) { return; } for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch (LargeObjectException | SubmoduleValidationException e) { throw new IOException(e); } } }
gitsubmodules.add(new GitmoduleEntry(id, blob));
gitsubmodules.add(new GitmoduleEntry(id, blob));
private void checkGitModules(ProgressMonitor pm, FsckError errors) throws IOException { pm.beginTask(JGitText.get().validatingGitModules, objChecker.getGitsubmodules().size()); for (GitmoduleEntry entry : objChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = objdb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch (SubmoduleValidationException e) { CorruptObject co = new FsckError.CorruptObject( blobId.toObjectId(), Constants.OBJ_BLOB, e.getFsckMessageId()); errors.getCorruptObjects().add(co); } pm.update(1); } pm.endTask(); }
private void checkSubmodules() throws IOException { ObjectDatabase odb = db.getObjectDatabase(); if (objectChecker == null) { return; } for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch (LargeObjectException | SubmoduleValidationException e) { throw new IOException(e); } } }
private void checkGitModules(ProgressMonitor pm, FsckError errors) throws IOException { pm.beginTask(JGitText.get().validatingGitModules, objChecker.getGitsubmodules().size()); for (GitmoduleEntry entry : objChecker.getGitsubmodules()) { AnyObjectId blobId = entry.getBlobId(); ObjectLoader blob = objdb.open(blobId, Constants.OBJ_BLOB); try { SubmoduleValidator.assertValidGitModulesFile( new String(blob.getBytes(), UTF_8)); } catch (SubmoduleValidationException e) { CorruptObject co = new FsckError.CorruptObject( blobId.toObjectId(), Constants.OBJ_BLOB, e.getFsckMessageId()); errors.getCorruptObjects().add(co); } pm.update(1); } pm.endTask(); }