summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorNasser Grainawi <quic_nasserg@quicinc.com>2024-02-12 16:32:30 -0700
committerMatthias Sohn <matthias.sohn@sap.com>2024-02-13 15:44:38 +0100
commit8197cab33758677eacd2cf253e912f0d23068934 (patch)
treea5b98b02fa1d647f30a4668c8a7973740a1de5a1 /org.eclipse.jgit/src
parent8b49e01abf44e21e38504ba31a68670710ca6610 (diff)
downloadjgit-8197cab33758677eacd2cf253e912f0d23068934.tar.gz
jgit-8197cab33758677eacd2cf253e912f0d23068934.zip
SnapshottingRefDir: Replace lambas with method refs
Method references are shorter and easier to read in this case. Change-Id: Ia6809fa0e3f282acbe7b7f7e3813a34f3cf40c43 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java19
1 files changed, 8 insertions, 11 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java
index 10ef7fbf3e..70eeb2c82a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java
@@ -181,37 +181,35 @@ class SnapshottingRefDirectory extends RefDirectory {
@Override
public Result forceUpdate() throws IOException {
- return invalidateSnapshotOnError(() -> super.forceUpdate(),
+ return invalidateSnapshotOnError(super::forceUpdate,
getRefDatabase());
}
@Override
public Result update() throws IOException {
- return invalidateSnapshotOnError(() -> super.update(),
- getRefDatabase());
+ return invalidateSnapshotOnError(super::update, getRefDatabase());
}
@Override
public Result update(RevWalk walk) throws IOException {
- return invalidateSnapshotOnError(rw -> super.update(rw), walk,
+ return invalidateSnapshotOnError(super::update, walk,
getRefDatabase());
}
@Override
public Result delete() throws IOException {
- return invalidateSnapshotOnError(() -> super.delete(),
- getRefDatabase());
+ return invalidateSnapshotOnError(super::delete, getRefDatabase());
}
@Override
public Result delete(RevWalk walk) throws IOException {
- return invalidateSnapshotOnError(rw -> super.delete(rw), walk,
+ return invalidateSnapshotOnError(super::delete, walk,
getRefDatabase());
}
@Override
public Result link(String target) throws IOException {
- return invalidateSnapshotOnError(t -> super.link(t), target,
+ return invalidateSnapshotOnError(super::link, target,
getRefDatabase());
}
@@ -229,8 +227,7 @@ class SnapshottingRefDirectory extends RefDirectory {
@Override
public RefUpdate.Result rename() throws IOException {
- return invalidateSnapshotOnError(() -> super.rename(),
- getRefDirectory());
+ return invalidateSnapshotOnError(super::rename, getRefDirectory());
}
@Override
@@ -253,7 +250,7 @@ class SnapshottingRefDirectory extends RefDirectory {
@Override
public void execute(RevWalk walk, ProgressMonitor monitor,
List<String> options) throws IOException {
- invalidateSnapshotOnError((rw, m, o) -> super.execute(rw, m, o),
+ invalidateSnapshotOnError(super::execute,
walk, monitor, options, getRefDatabase());
}