You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy A. Bish (Jira)" <ji...@apache.org> on 2025/06/17 15:34:00 UTC
[jira] [Resolved] (ARTEMIS-5535) Use Objects.toString() instead of ternary operator
[ https://issues.apache.org/jira/browse/ARTEMIS-5535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy A. Bish resolved ARTEMIS-5535.
--------------------------------------
Fix Version/s: 2.42.0
Resolution: Fixed
> Use Objects.toString() instead of ternary operator
> --------------------------------------------------
>
> Key: ARTEMIS-5535
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5535
> Project: ActiveMQ Artemis
> Issue Type: Task
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.42.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> There are lots of places across the code-base which do a check like this:
> {code:java}
> foo != null ? foo.toString() : null{code}
> or
> {code:java}
> foo == null ? null : foo.toString(){code}
> These can be replaced, e.g.:
> {code:java}
> Objects.toString(foo, null){code}
> This code is more clear and will make the code-base more consistent overall.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact