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

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

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



##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/coreWrapper/CoreMessageWrapper.java
##########
@@ -137,247 +175,187 @@ public final String getJMSCorrelationID() throws 
JMSException {
       }
    }
 
-   @Override
-   public final void setJMSCorrelationID(String correlationID) throws 
JMSException {
+   public final void setJMSCorrelationID(String correlationID)  {
       message.setCorrelationID(correlationID);
    }
 
-   @Override
-   public final Destination getJMSReplyTo() throws JMSException {
-      SimpleString reply = MessageUtil.getJMSReplyTo(message);
-      if (reply != null) {
-         return ActiveMQDestination.fromPrefixedName(reply.toString());
-      } else {
-         return null;
-      }
+   public final SimpleString getJMSReplyTo()  {
+      return MessageUtil.getJMSReplyTo(message);
    }
 
-   @Override
-   public final void setJMSReplyTo(Destination replyTo) throws JMSException {
-      MessageUtil.setJMSReplyTo(message, replyTo == null ? null : 
((ActiveMQDestination) replyTo).getSimpleAddress());
+   public final void setJMSReplyTo(String replyTo)  {
+      MessageUtil.setJMSReplyTo(message, SimpleString.toSimpleString(replyTo));
    }
 
-   @Override
-   public Destination getJMSDestination() throws JMSException {
-      return ActiveMQDestination.createDestination(message.getRoutingType(), 
message.getAddressSimpleString());
-   }
-
-   @Override
-   public final void setJMSDestination(Destination destination) throws 
JMSException {
-      if (destination == null) {
-         message.setAddress((SimpleString) null);
-      } else {
-         message.setAddress(((ActiveMQDestination) 
destination).getSimpleAddress());
+   public SimpleString getDestination()  {
+      if (message.getAddress() == null || message.getAddress().isEmpty()) {
+         return null;
       }
-
+      return 
SimpleString.toSimpleString(AMQPMessageSupport.destination(message.getRoutingType(),
 message.getAddress()));
    }
 
-   @Override
-   public final int getJMSDeliveryMode() throws JMSException {
-      return message.isDurable() ? DeliveryMode.PERSISTENT : 
DeliveryMode.NON_PERSISTENT;
+   public final void setDestination(String destination)  {
+      message.setAddress(destination);
    }
 
-   @Override
-   public final void setJMSDeliveryMode(int deliveryMode) throws JMSException {
-      if (deliveryMode == DeliveryMode.PERSISTENT) {
-         message.setDurable(true);
-      } else if (deliveryMode == DeliveryMode.NON_PERSISTENT) {
-         message.setDurable(false);
-      } else {
-         throw new JMSException("Invalid mode " + deliveryMode);
-      }
+   public final int getJMSDeliveryMode()  {
+      return message.isDurable() ? PERSISTENT : NON_PERSISTENT;
    }
 
-   @Override
-   public final boolean getJMSRedelivered() throws JMSException {
-      return false;
+   public final void setDeliveryMode(int deliveryMode) throws 
ConversionException {
+      switch (deliveryMode) {
+         case PERSISTENT:
+            message.setDurable(true);
+            break;
+         case NON_PERSISTENT:
+            message.setDurable(false);
+            break;
+         default:
+            // There shouldn't be any other values used
+            throw new ConversionException("Invalid mode " + deliveryMode);
+      }
    }
 
-   @Override
-   public final void setJMSRedelivered(boolean redelivered) throws 
JMSException {
-      // no op
-   }
 
-   @Override
-   public final String getJMSType() throws JMSException {
+   public final String getJMSType()  {
       return MessageUtil.getJMSType(message);
    }
 
-   @Override
-   public final void setJMSType(String type) throws JMSException {
+   public final void setJMSType(String type)  {
       MessageUtil.setJMSType(message, type);
    }
 
-   @Override
-   public final long getJMSExpiration() throws JMSException {
+   public final long getExpiration()  {
       return message.getExpiration();
    }
 
-   @Override
-   public final void setJMSExpiration(long expiration) throws JMSException {
+   public final void setJMSExpiration(long expiration)  {
       message.setExpiration(expiration);
    }
 
-   @Override
-   public final long getJMSDeliveryTime() throws JMSException {
-      // no op
-      return 0;
-   }
-
-   @Override
-   public final void setJMSDeliveryTime(long deliveryTime) throws JMSException 
{
-      // no op
-   }
 
-   @Override
-   public final int getJMSPriority() throws JMSException {
+   public final int getJMSPriority()  {
       return message.getPriority();
    }
 
-   @Override
-   public final void setJMSPriority(int priority) throws JMSException {
+   public final void setJMSPriority(int priority)  {
       message.setPriority((byte) priority);
    }
 
-   @Override
-   public final void clearProperties() throws JMSException {
+   public final void clearProperties()  {
       MessageUtil.clearProperties(message);
 
    }
 
-   @Override
-   public final boolean propertyExists(String name) throws JMSException {
+   public final boolean propertyExists(String name)  {
       return MessageUtil.propertyExists(message, name);
    }
 
-   @Override
-   public final boolean getBooleanProperty(String name) throws JMSException {
+   public final boolean getBooleanProperty(String name)  {
       return message.getBooleanProperty(name);
    }
 
-   @Override
-   public final byte getByteProperty(String name) throws JMSException {
+   public final byte getByteProperty(String name)  {
       return message.getByteProperty(name);
    }
 
-   @Override
-   public final short getShortProperty(String name) throws JMSException {
+   public final short getShortProperty(String name)  {
       return message.getShortProperty(name);
    }
 
-   @Override
-   public final int getIntProperty(String name) throws JMSException {
+   public final int getIntProperty(String name)  {
       return MessageUtil.getIntProperty(message, name);
    }
 
-   @Override
-   public final long getLongProperty(String name) throws JMSException {
+   public final long getLongProperty(String name)  {
       return MessageUtil.getLongProperty(message, name);
    }
 
-   @Override
-   public final float getFloatProperty(String name) throws JMSException {
+   public final float getFloatProperty(String name)  {
       return message.getFloatProperty(name);
    }
 
-   @Override
-   public final double getDoubleProperty(String name) throws JMSException {
+   public final double getDoubleProperty(String name)  {
       return message.getDoubleProperty(name);
    }
 
-   @Override
-   public final String getStringProperty(String name) throws JMSException {
+   public final String getStringProperty(String name)  {
       return MessageUtil.getStringProperty(message, name);
    }
 
-   @Override
-   public final Object getObjectProperty(String name) throws JMSException {
+   public final Object getObjectProperty(String name)  {
       return MessageUtil.getObjectProperty(message, name);
    }
 
-   @Override
-   public final Enumeration getPropertyNames() throws JMSException {
+   public final Enumeration getPropertyNames()  {
       return Collections.enumeration(MessageUtil.getPropertyNames(message));
    }
 
-   @Override
-   public final void setBooleanProperty(String name, boolean value) throws 
JMSException {
+   public final void setBooleanProperty(String name, boolean value)  {
       message.putBooleanProperty(name, value);
    }
 
-   @Override
-   public final void setByteProperty(String name, byte value) throws 
JMSException {
+   public final void setByteProperty(String name, byte value)  {
       message.putByteProperty(name, value);
    }
 
-   @Override
-   public final void setShortProperty(String name, short value) throws 
JMSException {
+   public final void setShortProperty(String name, short value)  {
       message.putShortProperty(name, value);
    }
 
-   @Override
-   public final void setIntProperty(String name, int value) throws 
JMSException {
+   public final void setIntProperty(String name, int value)  {
       MessageUtil.setIntProperty(message, name, value);
    }
 
-   @Override
-   public final void setLongProperty(String name, long value) throws 
JMSException {
+   public final void setLongProperty(String name, long value)  {
       MessageUtil.setLongProperty(message, name, value);
    }
 
-   @Override
-   public final void setFloatProperty(String name, float value) throws 
JMSException {
+   public final void setFloatProperty(String name, float value)  {
       message.putFloatProperty(name, value);
    }
 
-   @Override
-   public final void setDoubleProperty(String name, double value) throws 
JMSException {
+   public final void setDoubleProperty(String name, double value)  {
       message.putDoubleProperty(name, value);
    }
 
-   @Override
-   public final void setStringProperty(String name, String value) throws 
JMSException {
+   public final void setStringProperty(String name, String value)  {
       MessageUtil.setStringProperty(message, name, value);
    }
 
-   @Override
-   public final void setObjectProperty(String name, Object value) throws 
JMSException {
+   public final void setObjectProperty(String name, Object value) {
       MessageUtil.setObjectProperty(message, name, value);
    }
 
-   @Override
-   public final void acknowledge() throws JMSException {
+   public final void acknowledge() {
       // no op
    }
 
-   @Override
-   public void clearBody() throws JMSException {
+   public void clearBody() {
       message.getBodyBuffer().clear();
    }
 
-   @Override
-   public final <T> T getBody(Class<T> c) throws JMSException {
+   public final <T> T getBody(Class<T> c)  {
       // no op.. jms2 not used on the conversion
       return null;
    }
 
    /**
     * Encode the body into the internal message
     */
-   public void encode() throws Exception {
+   public void encode() {
       if (!message.isLargeMessage()) {
          message.getBodyBuffer().resetReaderIndex();
       }
    }
 
-   public void decode() throws Exception {
+   public void decode() {
       if (!message.isLargeMessage()) {
          message.getBodyBuffer().resetReaderIndex();
       }
    }
 
-   @Override
-   public final boolean isBodyAssignableTo(Class c) throws JMSException {
+   public final boolean isBodyAssignableTo(Class c)  {

Review comment:
       If this isnt used and no longer impl interface...would be better to 
remove. No point having a no op method in a concrete class with no interface 
contract




----------------------------------------------------------------
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: 551212)
    Time Spent: 12h  (was: 11h 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: 12h
>  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