diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2021-05-11 23:32:22 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-05-11 23:32:22 +0200 |
commit | 26dee2d984b6173fe6b85cdbe81715561c500c3d (patch) | |
tree | e668edd39fca787c039ea41088d331c4bcb69275 /org.eclipse.jgit/src/org/eclipse | |
parent | 0616016c83614d09e69895a2ca76564ff478d4d2 (diff) | |
parent | 37436cc9334ed7bf49bf1d297ae4f90d5f141068 (diff) | |
download | jgit-26dee2d984b6173fe6b85cdbe81715561c500c3d.tar.gz jgit-26dee2d984b6173fe6b85cdbe81715561c500c3d.zip |
Merge branch 'stable-5.6' into stable-5.7
* stable-5.6:
Remove texts which were added by mistake in 00386272
Fix formatting which was broken in 00386272
Change-Id: I45d444b360485564744bf3dfad2c2f5a5e7fcdf6
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java | 4 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java | 27 |
2 files changed, 13 insertions, 18 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index fd17d326e5..b2a6b2a31e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -446,10 +446,6 @@ public class JGitText extends TranslationBundle { /***/ public String lockOnNotHeld; /***/ public String lockStreamClosed; /***/ public String lockStreamMultiple; - /***/ public String logInconsistentFiletimeDiff; - /***/ public String logLargerFiletimeDiff; - /***/ public String logSmallerFiletime; - /***/ public String logXDGConfigHomeInvalid; /***/ public String maxCountMustBeNonNegative; /***/ public String mergeConflictOnNonNoteEntries; /***/ public String mergeConflictOnNotes; 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) { |