Skip to content

Commit 404c08c

Browse files
committed
remove redundant catch
1 parent 7337014 commit 404c08c

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/HostRestrictingAuthorizationFilter.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,12 @@ private boolean matchRule(String user, String remoteIp, String path) {
117117
String rulePath = rule.getPath();
118118
LOG.trace("Evaluating rule, subnet: {}, path: {}",
119119
subnet != null ? subnet.getCidrSignature() : "*", rulePath);
120-
try {
121-
if ((subnet == null || subnet.isInRange(remoteIp))
122-
&& FilenameUtils.directoryContains(rulePath, path)) {
123-
LOG.debug("Found matching rule, subnet: {}, path: {}; returned true",
124-
rule.getSubnet() != null ? subnet.getCidrSignature() : null,
125-
rulePath);
126-
return true;
127-
}
128-
} catch (IOException e) {
129-
LOG.warn("Got IOException {}; returned false", e);
130-
return false;
120+
if ((subnet == null || subnet.isInRange(remoteIp))
121+
&& FilenameUtils.directoryContains(rulePath, path)) {
122+
LOG.debug("Found matching rule, subnet: {}, path: {}; returned true",
123+
rule.getSubnet() != null ? subnet.getCidrSignature() : null,
124+
rulePath);
125+
return true;
131126
}
132127
}
133128

0 commit comments

Comments
 (0)