Просмотр исходного кода

Remove redundant try/catch around directory copy operation

Shane Kilkelly 7 лет назад
Родитель
Сommit
d22d5829bb

+ 3 - 8
services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/repo/FSGitRepoStore.java

@@ -87,14 +87,9 @@ public class FSGitRepoStore implements RepoStore {
              sourcePath,
              destinationPath
          );
-         try {
-             File source = new File(sourcePath);
-             File destination = new File(destinationPath);
-             FileUtils.copyDirectory(source, destination);
-         } catch (Exception e) {
-             e.printStackTrace();
-             throw new IOException("copy failed" + e.getLocalizedMessage());
-         }
+         File source = new File(sourcePath);
+         File destination = new File(destinationPath);
+         FileUtils.copyDirectory(source, destination);
          GitProjectRepo ret = GitProjectRepo.fromName(project);
          ret.useExistingRepository(this);
          return new WalkOverrideGitRepo(