From 4e6740949d1fc52c40f6bde512d1cd59734e342c Mon Sep 17 00:00:00 2001 From: loboxu Date: Thu, 2 Feb 2023 14:37:16 +0800 Subject: [PATCH] Remove the useless exception class: MQRedirectException #5963 --- .../client/exception/MQRedirectException.java | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 client/src/main/java/org/apache/rocketmq/client/exception/MQRedirectException.java diff --git a/client/src/main/java/org/apache/rocketmq/client/exception/MQRedirectException.java b/client/src/main/java/org/apache/rocketmq/client/exception/MQRedirectException.java deleted file mode 100644 index 6ed395ead0..0000000000 --- a/client/src/main/java/org/apache/rocketmq/client/exception/MQRedirectException.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.rocketmq.client.exception; - -public class MQRedirectException extends MQBrokerException { - private static final StackTraceElement[] UNASSIGNED_STACK = new StackTraceElement[0]; - - private final byte[] body; - - public MQRedirectException(byte[] responseBody) { - this.body = responseBody; - } - - // This exception class is used as a flow control item, so stack trace is useless and performance killer. - @Override - public synchronized Throwable fillInStackTrace() { - this.setStackTrace(UNASSIGNED_STACK); - return this; - } - - public byte[] getBody() { - return body; - } -}