if (!tempFile.delete()) {
LOGGER.log(Level.WARNING, "Temporary state file cannot be removed "
+ tempFile.getAbsolutePath(), e);
}
}
throw new SharepointException("Save state failed", e);
}
if (stateFile.exists()) {
if (!stateFile.delete()) {
LOGGER.log(Level.WARNING, "Error deleting old state file "
+ stateFile.getAbsolutePath());
throw new SharepointException("Save state failed");
}
}
if (!tempFile.renameTo(stateFile)) {
LOGGER.log(Level.WARNING, "Error renaming "