You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Sergio Peña (JIRA)" <ji...@apache.org> on 2017/04/21 21:24:04 UTC
[jira] [Commented] (SENTRY-1691) TransactionManager should use
try-with-resource for timers
[ https://issues.apache.org/jira/browse/SENTRY-1691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15979407#comment-15979407 ]
Sergio Peña commented on SENTRY-1691:
-------------------------------------
[~akolb] I attached the file and link to the review board. Btw, I couldn't avoid the declaration of the unused Context variable; it is required by the try even if it is not used.
Question, why do you think it is better to use try-with-resources on the timer? For simplicity? might it throw exceptions when closing it?
> TransactionManager should use try-with-resource for timers
> ----------------------------------------------------------
>
> Key: SENTRY-1691
> URL: https://issues.apache.org/jira/browse/SENTRY-1691
> Project: Sentry
> Issue Type: Improvement
> Components: Sentry
> Affects Versions: 1.8.0, sentry-ha-redesign
> Reporter: Alexander Kolbasov
> Assignee: Sergio Peña
> Priority: Minor
> Labels: bite-sized, newbie
> Attachments: SENTRY-1691.1-sentry-ha-redesign.patch
>
>
> There are a few places in TransactionManager where it creates a timer context and closes it explicitly in the finally block. Instead we should use try-with-resource to close it.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)