In two places we threw an IOException and the message was built using
JGitText.couldNotWriteFile. We specified 2 parameters, but this pattern
expects only one parameter. In both places we tried to rename a file,
that's why we wanted two parameters (src and target) for the exception
text.
I changed it to use JGitText.renameFileFailed which accepts two
parameters and fits better.
Change-Id: Ib8c2cf78f2b26ca2b97754fe91fdb20b30392415
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
FileUtils.delete(stashFile);
if (!stashLockFile.renameTo(stashFile))
throw new JGitInternalException(MessageFormat.format(
- JGitText.get().couldNotWriteFile,
+ JGitText.get().renameFileFailed,
stashLockFile.getPath(), stashFile.getPath()));
}
} catch (IOException e) {
FileUtils.rename(tmpFile, f);
} catch (IOException e) {
throw new IOException(MessageFormat.format(
- JGitText.get().couldNotWriteFile, tmpFile.getPath(),
+ JGitText.get().renameFileFailed, tmpFile.getPath(),
f.getPath()));
}
}