Skip to content

Commit f85021c

Browse files
committed
(maint) Address new clj-kondo issues
clj-kondo version 2024.03.05 fixed a bug which suppressed the :java-static-field-call warning in some cases. Linting is now erroring in CI and this patch should resolve that issue.
1 parent b995e12 commit f85021c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/clj/puppetlabs/services/jruby/jruby_metrics_core.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
(do
270270
(.update wait-timer
271271
(- (System/currentTimeMillis) (:time ta))
272-
(TimeUnit/MILLISECONDS))
272+
TimeUnit/MILLISECONDS)
273273
(swap! requested-instances dissoc requested-event))
274274
(log/warn (trs "Unable to find request event for borrowed JRuby instance: {0}" event))))
275275

@@ -281,8 +281,8 @@
281281
(if-let [ta (get @borrowed-instances worker-id)]
282282
(let [elapsed-time (- (System/currentTimeMillis) (:time ta))
283283
per-reason-timer (timer-for-borrow-reason metrics ta)]
284-
(.update borrow-timer elapsed-time (TimeUnit/MILLISECONDS))
285-
(.update per-reason-timer elapsed-time (TimeUnit/MILLISECONDS))
284+
(.update borrow-timer elapsed-time TimeUnit/MILLISECONDS)
285+
(.update per-reason-timer elapsed-time TimeUnit/MILLISECONDS)
286286
(MDC/put "jruby.borrow-time" (Long/toString elapsed-time))
287287
(swap! borrowed-instances dissoc worker-id))
288288
(log/warn (trs "JRuby instance ''{0}'' returned, but no record of when it was borrowed!" worker-id)))))
@@ -314,7 +314,7 @@
314314
(do
315315
(.update lock-wait-timer
316316
(- (System/currentTimeMillis) (:time lock-request))
317-
(TimeUnit/MILLISECONDS))
317+
TimeUnit/MILLISECONDS)
318318
(swap! lock-requests assoc
319319
lock-request-id
320320
{:state :acquired
@@ -330,7 +330,7 @@
330330
(do
331331
(.update lock-held-timer
332332
(- (System/currentTimeMillis) (:time lock-request))
333-
(TimeUnit/MILLISECONDS))
333+
TimeUnit/MILLISECONDS)
334334
(swap! lock-requests dissoc lock-request-id))
335335
(log/warn (trs "Lock request ''{0}'' released, but no record of when it was acquired!"
336336
lock-request-id)))

0 commit comments

Comments
 (0)