|
19 | 19 | package org.apache.hadoop.fs.azurebfs.services; |
20 | 20 |
|
21 | 21 | import java.io.File; |
22 | | -import java.io.FileNotFoundException; |
23 | 22 | import java.io.IOException; |
24 | 23 | import java.nio.charset.Charset; |
| 24 | +import java.nio.file.NoSuchFileException; |
25 | 25 |
|
26 | 26 | import org.junit.Assert; |
27 | 27 | import org.junit.BeforeClass; |
@@ -114,7 +114,7 @@ public void testLookupForUser() throws IOException { |
114 | 114 | public void testLookupForUserFileNotFound() throws Exception { |
115 | 115 | TextFileBasedIdentityHandler handler = |
116 | 116 | new TextFileBasedIdentityHandler(userMappingFile.getPath() + ".test", groupMappingFile.getPath()); |
117 | | - intercept(FileNotFoundException.class, "FileNotFoundException", |
| 117 | + intercept(NoSuchFileException.class, "NoSuchFileException", |
118 | 118 | () -> handler.lookupForLocalUserIdentity(testUserDataLine3.split(":")[0])); |
119 | 119 | } |
120 | 120 |
|
@@ -143,7 +143,7 @@ public void testLookupForGroup() throws IOException { |
143 | 143 | public void testLookupForGroupFileNotFound() throws Exception { |
144 | 144 | TextFileBasedIdentityHandler handler = |
145 | 145 | new TextFileBasedIdentityHandler(userMappingFile.getPath(), groupMappingFile.getPath() + ".test"); |
146 | | - intercept(FileNotFoundException.class, "FileNotFoundException", |
| 146 | + intercept(NoSuchFileException.class, "NoSuchFileException", |
147 | 147 | () -> handler.lookupForLocalGroupIdentity(testGroupDataLine2.split(":")[0])); |
148 | 148 | } |
149 | 149 | } |
0 commit comments