summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-05-11 18:36:05 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2021-05-11 18:36:05 +0200
commit70e250c3564cd9a17479fecc0d58d1700806c056 (patch)
treeb8722c2b8a4bccd6c1d1537c426f25bc18124c2c /org.eclipse.jgit/src
parent00386272264f65c41e36406f7c2e9ea6e901276e (diff)
downloadjgit-70e250c3564cd9a17479fecc0d58d1700806c056.tar.gz
jgit-70e250c3564cd9a17479fecc0d58d1700806c056.zip
Fix formatting which was broken in 00386272
Change-Id: I10a3e2b117e790f64386a8e9e7663db8e59230d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
index f57581a299..78262e9773 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
@@ -218,14 +218,14 @@ public class LockFile {
int r;
while ((r = fis.read(buf)) >= 0) {
out.write(buf, 0, r);
+ }
}
- }
- } catch (FileNotFoundException fnfe) {
- if (ref.exists()) {
- throw fnfe;
- }
- // Don't worry about a file that doesn't exist yet, it
- // conceptually has no current content to copy.
+ } catch (FileNotFoundException fnfe) {
+ if (ref.exists()) {
+ throw fnfe;
+ }
+ // Don't worry about a file that doesn't exist yet, it
+ // conceptually has no current content to copy.
}
} catch (IOException | RuntimeException | Error ioe) {
unlock();
@@ -322,17 +322,16 @@ public class LockFile {
if (out == null) {
os = getStream();
if (fsync) {
- out = Channels.newOutputStream(os.getChannel());
+ out = Channels.newOutputStream(os.getChannel());
} else {
- out = os;
+ out = os;
}
}
return out;
}
@Override
- public void write(byte[] b, int o, int n)
- throws IOException {
+ public void write(byte[] b, int o, int n) throws IOException {
get().write(b, o, n);
}
@@ -359,10 +358,10 @@ public class LockFile {
}
if (out != null) {
if (fsync) {
- os.getChannel().force(true);
+ os.getChannel().force(true);
}
- out.close();
- os = null;
+ out.close();
+ os = null;
}
written = true;
} catch (IOException | RuntimeException | Error ioe) {