Browse Source

Merge "reftable: remove assert calls"

tags/v5.6.0.201911271000-m3
Jonathan Tan 4 years ago
parent
commit
d4404fb438

+ 3
- 1
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java View File

* if tables cannot be opened. * if tables cannot be opened.
*/ */
protected DfsReftableStack stack() throws IOException { protected DfsReftableStack stack() throws IOException {
assert getLock().isLocked();
if (!getLock().isLocked()) {
throw new IllegalStateException("most hold lock to access stack"); //$NON-NLS-1$
}
DfsObjDatabase odb = getRepository().getObjectDatabase(); DfsObjDatabase odb = getRepository().getObjectDatabase();


if (ctx == null) { if (ctx == null) {

+ 4
- 1
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java View File

* on I/O problems * on I/O problems
*/ */
private Reftable reader() throws IOException { private Reftable reader() throws IOException {
assert lock.isLocked();
if (!lock.isLocked()) {
throw new IllegalStateException(
"must hold lock to access merged table"); //$NON-NLS-1$
}
if (mergedTables == null) { if (mergedTables == null) {
mergedTables = openMergedReftable(); mergedTables = openMergedReftable();
} }

Loading…
Cancel
Save