HADOOP-17863. ABFS: Fix compiler deprecation warning in TextFileBasedIdentityHandler (#3332)

Closes #3332 

Contributed by Sumangala Patki
This commit is contained in:
sumangala-patki 2021-11-05 18:23:51 +05:30 committed by GitHub
parent 19644c0cdc
commit e1ac10ceae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.LineIterator; import org.apache.commons.io.LineIterator;
import org.apache.hadoop.io.IOUtils;
import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.COLON; import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.COLON;
import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.EMPTY_STRING; import static org.apache.hadoop.fs.azurebfs.constants.AbfsHttpConstants.EMPTY_STRING;
@ -189,7 +190,7 @@ private static void loadMap(HashMap<String, String> cache, String fileLocation,
} catch (ArrayIndexOutOfBoundsException e) { } catch (ArrayIndexOutOfBoundsException e) {
LOG.error("Error while parsing mapping file", e); LOG.error("Error while parsing mapping file", e);
} finally { } finally {
LineIterator.closeQuietly(it); IOUtils.cleanupWithLogger(LOG, it);
} }
} }
} }