Simplfy code in FileBasedOpenPgpMetadataStore

This commit is contained in:
Florian Schmaus 2018-08-17 12:22:58 +02:00
parent 97feeb2e2c
commit fe9d2daed2
1 changed files with 3 additions and 4 deletions

View File

@ -123,10 +123,9 @@ public class FileBasedOpenPgpMetadataStore extends AbstractOpenPgpMetadataStore
if (data == null || data.isEmpty()) {
if (!destination.exists()) {
return;
} else {
if (!destination.delete()) {
throw new IOException("Cannot delete file " + destination.getAbsolutePath());
}
}
if (!destination.delete()) {
throw new IOException("Cannot delete file " + destination.getAbsolutePath());
}
return;
}