[
https://issues.apache.org/jira/browse/ARTEMIS-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595046#comment-16595046
]
ASF GitHub Bot commented on ARTEMIS-2059:
-----------------------------------------
Github user gemmellr commented on the issue:
https://github.com/apache/activemq-artemis/pull/2274
Not sure I'd call it a bug really, more that this is a memory optimisation,
one that shouldnt be getting used much since it only comes into play if you are
encoding things (whereas it should mostly be passing stuff through), in which
case its likely to be expanding the buffer anyway given typical usage.
> NettyWritable should use UTF-8 exact length to encode strings
> -------------------------------------------------------------
>
> Key: ARTEMIS-2059
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2059
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: AMQP
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
> Fix For: 2.7.0
>
>
> NettyWritable.put(String) tries to enlarge the buffer used to write a UTF-8
> string until ByteBufUtil.utf8MaxBytes.
> That means that it will fail or will enlarge any ByteBuf that is perfectly
> sized to contain the encoded string.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)