accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [1/3] git commit: ACCUMULO-3213 Changed deprecation warning suppression from method to variable for ctubbsii
Date Sat, 01 Nov 2014 22:43:33 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.6 7b7b468f9 -> 933e39ddc
  refs/heads/master af3d11c43 -> 43e0d5efb


ACCUMULO-3213 Changed deprecation warning suppression from method to variable for ctubbsii


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/933e39dd
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/933e39dd
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/933e39dd

Branch: refs/heads/1.6
Commit: 933e39ddcdbd8dac13c54965cdf21c2be5e4c7ff
Parents: 7b7b468
Author: Josh Elser <elserj@apache.org>
Authored: Sat Nov 1 18:42:37 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Nov 1 18:42:37 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/master/tableOps/DeleteTable.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/933e39dd/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
index 6d22a66..96b8e63 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
@@ -266,21 +266,23 @@ class CleanUp extends MasterRepo {
     }
   }
 
-  @SuppressWarnings("deprecation")
   protected void merge(VolumeManager fs, Path src, Path dest) throws IOException {
     for (FileStatus child : fs.listStatus(src)) {
       final String childName = child.getPath().getName();
       final Path childInSrc = new Path(src, childName), childInDest = new Path(dest, childName);
 
+      @SuppressWarnings("deprecation")
+      boolean isFile = fs.isFile(childInSrc), isDir = child.isDir();
+
       // TODO change to `child.isFile()` when Hadoop-1 support is dropped
-      if (fs.isFile(childInSrc)) {
+      if (isFile) {
         if (fs.exists(childInDest)) {
           log.warn("File already exists in archive, ignoring. " + childInDest);
         } else {
           fs.rename(childInSrc, childInDest);
         }
         // TODO change to `child.isDirectory()` when Hadoop-1 support is dropped
-      } else if (child.isDir()) {
+      } else if (isDir) {
         if (fs.exists(childInDest)) {
           // Recurse
           merge(fs, childInSrc, childInDest);


Mime
View raw message