Merge branch 'stable-5.11' into stable-5.12
* stable-5.11: Remove texts which were added by mistake in00386272
Fix formatting which was broken in00386272
Change-Id: I6184772bdeca1b9ccecf6e400ae15604ab4f5a69
This commit is contained in:
commit
4e290d389a
|
@ -218,14 +218,14 @@ public void copyCurrentContent() throws IOException {
|
|||
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 @@ private OutputStream get() throws IOException {
|
|||
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 void close() throws IOException {
|
|||
}
|
||||
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) {
|
||||
|
|
Loading…
Reference in New Issue