Fix FindBugs warnings in sal-cluster-admin and enable enforcement
[controller.git] / opendaylight / md-sal / sal-cluster-admin / src / main / java / org / opendaylight / controller / cluster / datastore / admin / ClusterAdminRpcService.java
index a55eca1..3667131 100644 (file)
@@ -20,6 +20,7 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.SettableFuture;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.util.AbstractMap.SimpleEntry;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -393,7 +394,7 @@ public class ClusterAdminRpcService implements ClusterAdminService {
 
             returnFuture.set(newSuccessfulResult());
             LOG.info("Successfully backed up datastore to file {}", fileName);
-        } catch (Exception e) {
+        } catch (IOException | RuntimeException e) {
             onDatastoreBackupFailure(fileName, returnFuture, e);
         }
     }