diff --git a/backend/src/app/metrics.clj b/backend/src/app/metrics.clj index aa5979c4a..c11d3d112 100644 --- a/backend/src/app/metrics.clj +++ b/backend/src/app/metrics.clj @@ -132,7 +132,7 @@ (defmethod run-collector! :counter [{:keys [::mdef/instance]} {:keys [inc labels] :or {inc 1 labels default-empty-labels}}] - (let [instance (.labels instance (if (is-array? labels) labels (into-array String labels)))] + (let [instance (.labels ^Counter instance (if (is-array? labels) labels (into-array String labels)))] (.inc ^Counter$Child instance (double inc)))) (defmethod run-collector! :gauge diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index 87945779f..bd7eb1b61 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -294,7 +294,7 @@ (defn- retrieve-file [pool file-id] - (with-open [conn (db/open pool)] + (with-open [^AutoCloseable conn (db/open pool)] (binding [pmap/*load-fn* (partial files/load-pointer conn file-id)] (some-> (db/get* conn :file {:id file-id}) (files/decode-row)