Added another try-with-resources local variable based on a lgtm.com report. (#2711)

This commit is contained in:
Kevin Dougan SmileCDR 2021-06-04 15:17:27 -04:00 committed by GitHub
parent 4f6c1eaedb
commit 0143e83156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -279,8 +279,8 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc {
try (LoadedFileDescriptors compressedDescriptors = new LoadedFileDescriptors(theFiles)) {
for (FileDescriptor nextDescriptor : compressedDescriptors.getUncompressedFileDescriptors()) {
if (nextDescriptor.getFilename().toLowerCase(Locale.US).endsWith(".xml")) {
try (InputStream inputStream = nextDescriptor.getInputStream()) {
InputStreamReader reader = new InputStreamReader(inputStream, Charsets.UTF_8);
try (InputStream inputStream = nextDescriptor.getInputStream();
InputStreamReader reader = new InputStreamReader(inputStream, Charsets.UTF_8) ) {
Icd10CmLoader loader = new Icd10CmLoader(codeSystemVersion);
loader.load(reader);
count += loader.getConceptCount();