From 0143e831563987f3a0d24e5f86b06599c55da74b Mon Sep 17 00:00:00 2001 From: Kevin Dougan SmileCDR <72025369+KevinDougan-SmileCDR@users.noreply.github.com> Date: Fri, 4 Jun 2021 15:17:27 -0400 Subject: [PATCH] Added another try-with-resources local variable based on a lgtm.com report. (#2711) --- .../src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java index 538821f3d32..45a34e23260 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java @@ -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();