Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-4746 Simplifying switch case on JMSExceptionHelper #4908

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,30 @@ public static JMSException convertFromActiveMQException(final ActiveMQException
JMSException je;
switch (me.getType()) {
case CONNECTION_TIMEDOUT:
je = new JMSException(me.getMessage());
break;

case ILLEGAL_STATE:
je = new javax.jms.IllegalStateException(me.getMessage());
break;

case INTERNAL_ERROR:
je = new JMSException(me.getMessage());
break;

case INVALID_FILTER_EXPRESSION:
je = new InvalidSelectorException(me.getMessage());
break;

case NOT_CONNECTED:
je = new JMSException(me.getMessage());
break;

case UNSUPPORTED_PACKET:
case OBJECT_CLOSED:
case ILLEGAL_STATE:
je = new javax.jms.IllegalStateException(me.getMessage());
break;

case QUEUE_DOES_NOT_EXIST:
case QUEUE_EXISTS:
je = new InvalidDestinationException(me.getMessage());
break;

case QUEUE_EXISTS:
je = new InvalidDestinationException(me.getMessage());
case INVALID_FILTER_EXPRESSION:
je = new InvalidSelectorException(me.getMessage());
break;

case SECURITY_EXCEPTION:
je = new JMSSecurityException(me.getMessage());
break;

case UNSUPPORTED_PACKET:
je = new javax.jms.IllegalStateException(me.getMessage());
break;

case TRANSACTION_ROLLED_BACK:
je = new javax.jms.TransactionRolledBackException(me.getMessage());
break;
Expand Down
Loading