[ 
https://issues.apache.org/jira/browse/ARTEMIS-3535?focusedWorklogId=672022&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-672022
 ]

ASF GitHub Bot logged work on ARTEMIS-3535:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Oct/21 15:41
            Start Date: 29/Oct/21 15:41
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on a change in pull request #3824:
URL: https://github.com/apache/activemq-artemis/pull/3824#discussion_r739340378



##########
File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
##########
@@ -1345,7 +1345,13 @@ protected void init() throws OpenDataException {
          rc.put(CompositeDataConstants.TYPE, m.getType());
          if (!m.isLargeMessage()) {
             ActiveMQBuffer bodyCopy = m.getReadOnlyBodyBuffer();
-            byte[] bytes = new byte[bodyCopy.readableBytes() <= valueSizeLimit 
? bodyCopy.readableBytes() : valueSizeLimit + 1];
+            int arraySize;
+            if (valueSizeLimit == -1 || bodyCopy.readableBytes() <= 
valueSizeLimit) {
+               arraySize = bodyCopy.readableBytes();
+            } else {
+               arraySize = valueSizeLimit + 1;

Review comment:
       To be honest I'm not sure why the `+ 1` is there. That's the way it was 
originally so I just left it. However, I removed the `+ 1` and all the tests 
still pass. I'll go ahead and remove it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 672022)
    Time Spent: 20m  (was: 10m)

> management-message-attribute-size-limit = -1 does not unlimit
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-3535
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3535
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: 2.19.0
>            Reporter: arne anka
>            Assignee: Justin Bertram
>            Priority: Major
>             Fix For: 2.20.0
>
>         Attachments: artemis-rest-2.19.0.war, broken_message.png, broker.xml, 
> limited.jpg, rest.messaging.config.file.xml, test.xml, unlimited.jpg, web.xml
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> With the new option messages are truncated.
> [https://activemq.apache.org/components/artemis/documentation/latest/versions.html]
> states for 2.18.0 that this may be overriden by using
> -1
> as value. But that doesn't work.
> {{broker.xml}}
> {code:xml}
> <address-setting match="#">
> ...
>    
> <management-message-attribute-size-limit>-1</management-message-attribute-size-limit>
> </address-setting>
> {code}
> Text shown is empty.
> Changing -1 to eg 1024 text appears partially.
> Seems -1 does not work as expected.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to