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

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

                Author: ASF GitHub Bot
            Created on: 11/Jan/21 19:10
            Start Date: 11/Jan/21 19:10
    Worklog Time Spent: 10m 
      Work Description: michaelandrepearce commented on a change in pull 
request #3404:
URL: https://github.com/apache/activemq-artemis/pull/3404#discussion_r555276302



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
##########
@@ -1382,20 +1382,26 @@ public final Object getObjectProperty(String key) {
             return 
AMQPMessageIdHelper.INSTANCE.toCorrelationIdString(properties.getCorrelationId());
          }
       } else {
-         Object value = getApplicationPropertiesMap(false).get(key);
-         if (value instanceof UnsignedInteger ||
-             value instanceof UnsignedByte ||
-             value instanceof UnsignedLong ||
-             value instanceof UnsignedShort) {
-            return ((Number)value).longValue();
-         } else {
-            return value;
-         }
+         return getApplicationObjectProperty(key);
       }
 
       return null;
    }
 
+   private Object getApplicationObjectProperty(String key) {
+      Object value = getApplicationPropertiesMap(false).get(key);
+      if (value instanceof Number) {

Review comment:
       What if number is float or double. This then would  be invalid




----------------------------------------------------------------
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.

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


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

    Worklog Id:     (was: 534455)
    Time Spent: 1h 40m  (was: 1.5h)

> AMQPMessage::getDuplicateProperty can save key comparisons and class checks
> ---------------------------------------------------------------------------
>
>                 Key: ARTEMIS-3061
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3061
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: AMQP
>    Affects Versions: 2.16.0
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Minor
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to