Skip to content

Commit

Permalink
Ensure Stream is Closed
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkiel committed Dec 18, 2024
1 parent 71bd188 commit 1a2eeca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/admin-api/src/blaze/admin_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@
(defn- load-profile [context name]
(log/debug "Load profile" name)
(let [parser (.newJsonParser ^FhirContext context)
classloader (.getContextClassLoader (Thread/currentThread))
source (.getResourceAsStream classloader name)]
(.parseResource parser source)))
classloader (.getContextClassLoader (Thread/currentThread))]
(with-open [source (.getResourceAsStream classloader name)]
(.parseResource parser source))))

(defn- profile-validation-support [context]
(let [s (PrePopulatedValidationSupport. context)]
Expand Down

0 comments on commit 1a2eeca

Please sign in to comment.