[
https://issues.apache.org/jira/browse/ARTEMIS-2059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597552#comment-16597552
]
ASF GitHub Bot commented on ARTEMIS-2059:
-----------------------------------------
Github user franz1981 commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2274#discussion_r214067838
--- Diff:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/util/NettyWritable.java
---
@@ -106,7 +105,8 @@ public void put(ByteBuf payload) {
@Override
public void put(String value) {
- nettyBuffer.writeCharSequence(value, StandardCharsets.UTF_8);
--- End diff --
@clebertsuconic AFAIK this is happening on Core, but with AMQP the Strings
are UTF-8 encoded using `WritableBuffer::put(String)`.
I'm not 100% sure of it: @gemmellr do you know for what it is used
`WritableBuffer::put(String)`?
> 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)