Skip to content

Commit 282b9f9

Browse files
author
Gary Gregory
committed
Formatting.
1 parent 22487c3 commit 282b9f9

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

src/main/java/org/apache/commons/io/output/LockableFileWriter.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,10 @@ public LockableFileWriter(final File file, final String charsetName, final boole
228228
*/
229229
private void testLockDir(final File lockDir) throws IOException {
230230
if (!lockDir.exists()) {
231-
throw new IOException(
232-
"Could not find lockDir: " + lockDir.getAbsolutePath());
231+
throw new IOException("Could not find lockDir: " + lockDir.getAbsolutePath());
233232
}
234233
if (!lockDir.canWrite()) {
235-
throw new IOException(
236-
"Could not write to lockDir: " + lockDir.getAbsolutePath());
234+
throw new IOException("Could not write to lockDir: " + lockDir.getAbsolutePath());
237235
}
238236
}
239237

@@ -245,8 +243,7 @@ private void testLockDir(final File lockDir) throws IOException {
245243
private void createLock() throws IOException {
246244
synchronized (LockableFileWriter.class) {
247245
if (!lockFile.createNewFile()) {
248-
throw new IOException("Can't write file, lock " +
249-
lockFile.getAbsolutePath() + " exists");
246+
throw new IOException("Can't write file, lock " + lockFile.getAbsolutePath() + " exists");
250247
}
251248
lockFile.deleteOnExit();
252249
}
@@ -265,8 +262,7 @@ private void createLock() throws IOException {
265262
private Writer initWriter(final File file, final Charset charset, final boolean append) throws IOException {
266263
final boolean fileExistedAlready = file.exists();
267264
try {
268-
return new OutputStreamWriter(new FileOutputStream(file.getAbsolutePath(), append),
269-
Charsets.toCharset(charset));
265+
return new OutputStreamWriter(new FileOutputStream(file.getAbsolutePath(), append), Charsets.toCharset(charset));
270266

271267
} catch (final IOException | RuntimeException ex) {
272268
FileUtils.deleteQuietly(lockFile);

0 commit comments

Comments
 (0)