Do not wrap RuntimeExceptions in RuntimeException
@@ -23,7 +23,6 @@ import com.facebook.presto.spi.security.SystemAccessControlFactory;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
-import java.nio.file.InvalidPathException;
import java.nio.file.Paths;
import java.security.Principal;
import java.util.List;
@@ -70,7 +69,6 @@ public class FileBasedSystemAccessControl
String configFileName = config.get(SECURITY_CONFIG_FILE);
checkState(configFileName != null, "Security configuration must contain the '%s' property", SECURITY_CONFIG_FILE);
- try {
FileBasedSystemAccessControlRules rules = parseJson(Paths.get(configFileName), FileBasedSystemAccessControlRules.class);
ImmutableList.Builder<CatalogAccessControlRule> catalogRulesBuilder = ImmutableList.builder();
@@ -85,10 +83,6 @@ public class FileBasedSystemAccessControl
return new FileBasedSystemAccessControl(catalogRulesBuilder.build(), rules.getPrincipalUserMatchRules());
}
- catch (SecurityException | InvalidPathException e) {
- throw new RuntimeException(e);
- }
- }
}
@Override
