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

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

                Author: ASF GitHub Bot
            Created on: 05/Oct/21 02:11
            Start Date: 05/Oct/21 02:11
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on a change in pull request #3783:
URL: https://github.com/apache/activemq-artemis/pull/3783#discussion_r721836399



##########
File path: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java
##########
@@ -710,7 +710,12 @@ private static ActiveMQMessage 
toAMQMessage(MessageReference reference,
    private static <T> T getObjectProperty(ICoreMessage message, Class<T> type, 
SimpleString property) {
       if (message.getPropertyNames().contains(property)) {
          try {
-            return type.cast(message.getObjectProperty(property));
+            Object value = message.getObjectProperty(property);
+            if (type == String.class) {
+               return (T)value.toString();

Review comment:
       My recent change was mainly to ensure that any `ClassCastException` 
would be isolated and logged rather than blowing up the whole message 
conversion. Your change doesn't alter that semantic so it's fine. Although I 
think the `else` block should have this instead:
   ```
   return type.cast(value);
   ```
   Since `value` already has the result of 
`message.getObjectProperty(property)`.




-- 
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: 660063)
    Time Spent: 20m  (was: 10m)

> Compacting Exception May Invalid Journal Deletes and updates
> ------------------------------------------------------------
>
>                 Key: ARTEMIS-3513
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3513
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> After an exception on the journal compacting deleting and update operations 
> will be invalidated.
> In particular I could find an issue with the Mapped Journal that I'm fixing 
> as part of this JIRA.
> an exception on compacting should be a critical issue



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

Reply via email to