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

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

                Author: ASF GitHub Bot
            Created on: 10/Feb/21 20:27
            Start Date: 10/Feb/21 20:27
    Worklog Time Spent: 10m 
      Work Description: clebertsuconic commented on a change in pull request 
#3448:
URL: https://github.com/apache/activemq-artemis/pull/3448#discussion_r574053059



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/AMQPMessageSupport.java
##########
@@ -303,34 +294,11 @@ public static String toAnnotationName(String key) {
       return  key;
    }
 
-
-   public static String toAddress(Destination destination) {
-      try {
-         if (destination instanceof ActiveMQDestination) {
-            return ((ActiveMQDestination) destination).getAddress();
-         } else {
-            if (destination instanceof Queue) {
-               return ((Queue) destination).getQueueName();
-            } else if (destination instanceof Topic) {
-
-               return ((Topic) destination).getTopicName();
-            }
-         }
-      } catch (JMSException e) {
-         // ActiveMQDestination (and most JMS implementations I know) will 
never throw an Exception here
-         // this is here for compilation support (as JMS declares it), and I 
don't want to propagate exceptions into
-         // the converter...
-         // and for the possibility of who knows in the future!!!
-         logger.warn(e.getMessage(), e);
-      }
-      return null;
-   }
-
    public static ServerJMSBytesMessage createBytesMessage(long id, 
CoreMessageObjectPools coreMessageObjectPools) {
       return new ServerJMSBytesMessage(newMessage(id, BYTES_TYPE, 
coreMessageObjectPools));
    }
 
-   public static ServerJMSBytesMessage createBytesMessage(long id, byte[] 
array, int arrayOffset, int length, CoreMessageObjectPools 
coreMessageObjectPools) throws JMSException {
+   public static ServerJMSBytesMessage createBytesMessage(long id, byte[] 
array, int arrayOffset, int length, CoreMessageObjectPools 
coreMessageObjectPools) throws Exception {

Review comment:
       what's the different on throwing something like ArtemisException here?
   
   
   This is used just for the converters, all that matters is that we capture 
eventual exceptions and log them.




----------------------------------------------------------------
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: 550929)
    Time Spent: 5h  (was: 4h 50m)

> Artemis AMQP shouldn't depend on JMS
> ------------------------------------
>
>                 Key: ARTEMIS-3113
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3113
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: AMQP
>    Affects Versions: 2.16.0
>            Reporter: Emmanuel Hugonnet
>            Priority: Major
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> The converters between core messages and amqp messages depend on JMS. Since 
> this is just for convenience we should remove this dependecy on an API that 
> is being replaced.



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

Reply via email to