Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2021-05-12 06:56:27 +0000
committerMatthias Sohn2021-05-12 06:56:27 +0000
commit618d8c4784e1c7261057eb4bb0b0fba4fe4d19fb (patch)
tree2e8410458cf62d4030711fdca920918fcc6a914e
parent1ccdf83fbd2b7ed4588868ddf28e6c41e6f731e8 (diff)
parent3d156790e9b9ac095bd9abd100b79d4fecbe7ecf (diff)
downloadjgit-618d8c4784e1c7261057eb4bb0b0fba4fe4d19fb.tar.gz
jgit-618d8c4784e1c7261057eb4bb0b0fba4fe4d19fb.tar.xz
jgit-618d8c4784e1c7261057eb4bb0b0fba4fe4d19fb.zip
Merge branch 'stable-5.10' into stable-5.11
* stable-5.10: Remove texts which were added by mistake in 00386272 Fix formatting which was broken in 00386272 Change-Id: I0f1511be5375716d41565e72b271cb956c3e847b
-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) {

Back to the top