[
https://issues.apache.org/jira/browse/ARTEMIS-4735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram resolved ARTEMIS-4735.
-------------------------------------
Assignee: Justin Bertram
Resolution: Done
> BOXED PRIMITIVE FOR PARSING in ActiveMQConnectionMetaData.java
> --------------------------------------------------------------
>
> Key: ARTEMIS-4735
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4735
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Galkin Alexey
> Assignee: Justin Bertram
> Priority: Minor
>
> [On line
> 48|https://github.com/apache/activemq-artemis/blob/main/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java](JMS_MAJOR_VERSION
> =
> Integer.valueOf(versionProps.getProperty("activemq.version.implementation.majorVersion",
> "2")), a truly boxed primitive is created from a string simply to extract
> the value of the unboxed primitive. This approach is inefficient and can lead
> to code redundancy and loss of performance.
> A more efficient approach would be to immediately convert strings to
> primitive values without creating boxed primitives. For example, use the
> Integer.parseInt() method to directly convert a string to an int without
> creating an Integer object.
>
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author Alexey Galkin.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)