Fix exc handling

This commit is contained in:
Robert Muir 2015-12-21 13:04:22 -05:00
parent 3ffd1a5219
commit deaf8884e9
1 changed files with 1 additions and 12 deletions

View File

@ -20,7 +20,6 @@
package org.elasticsearch.repositories.hdfs; package org.elasticsearch.repositories.hdfs;
import org.apache.hadoop.fs.FileContext; import org.apache.hadoop.fs.FileContext;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.SpecialPermission; import org.elasticsearch.SpecialPermission;
import java.io.IOException; import java.io.IOException;
@ -49,17 +48,7 @@ final class SecurityUtils {
} }
}); });
} catch (PrivilegedActionException pae) { } catch (PrivilegedActionException pae) {
Throwable th = pae.getCause(); throw (IOException) pae.getException();
if (th instanceof Error) {
throw (Error) th;
}
if (th instanceof RuntimeException) {
throw (RuntimeException) th;
}
if (th instanceof IOException) {
throw (IOException) th;
}
throw new ElasticsearchException(pae);
} }
} }
} }