You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/08/15 12:23:05 UTC

[shardingsphere] branch master updated: Remove ShardingSphereVendorError (#20199)

This is an automated email from the ASF dual-hosted git repository.

zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 889f2080b03 Remove ShardingSphereVendorError (#20199)
889f2080b03 is described below

commit 889f2080b03f62e0570d595b26d056129c7716f3
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon Aug 15 20:22:59 2022 +0800

    Remove ShardingSphereVendorError (#20199)
---
 .../vendor/ShardingSphereVendorErrorTest.java      | 34 -------------------
 .../sql/vendor/ShardingSphereVendorError.java      | 39 ----------------------
 2 files changed, 73 deletions(-)

diff --git a/shardingsphere-error/shardingsphere-common-error/src/test/java/org/apache/shardingsphere/error/vendor/ShardingSphereVendorErrorTest.java b/shardingsphere-error/shardingsphere-common-error/src/test/java/org/apache/shardingsphere/error/vendor/ShardingSphereVendorErrorTest.java
deleted file mode 100644
index 3b2b8e89026..00000000000
--- a/shardingsphere-error/shardingsphere-common-error/src/test/java/org/apache/shardingsphere/error/vendor/ShardingSphereVendorErrorTest.java
+++ /dev/null
@@ -1,34 +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.shardingsphere.error.vendor;
-
-import org.apache.shardingsphere.infra.util.exception.sql.vendor.ShardingSphereVendorError;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public final class ShardingSphereVendorErrorTest {
-    
-    @Test
-    public void assertUnknownException() {
-        assertThat(ShardingSphereVendorError.UNKNOWN_EXCEPTION.getSqlState().getValue(), is("42000"));
-        assertThat(ShardingSphereVendorError.UNKNOWN_EXCEPTION.getVendorCode(), is(1999));
-        assertThat(ShardingSphereVendorError.UNKNOWN_EXCEPTION.getReason(), is("Unknown exception: %s"));
-    }
-}
diff --git a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java b/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
deleted file mode 100644
index 4cdc511ac6f..00000000000
--- a/shardingsphere-infra/shardingsphere-infra-util/src/main/java/org/apache/shardingsphere/infra/util/exception/sql/vendor/ShardingSphereVendorError.java
+++ /dev/null
@@ -1,39 +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.shardingsphere.infra.util.exception.sql.vendor;
-
-import lombok.Getter;
-import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.infra.util.exception.sql.sqlstate.SQLState;
-import org.apache.shardingsphere.infra.util.exception.sql.sqlstate.XOpenSQLState;
-
-/**
- * ShardingSphere vendor error.
- */
-@RequiredArgsConstructor
-@Getter
-public enum ShardingSphereVendorError implements VendorError {
-    
-    UNKNOWN_EXCEPTION(XOpenSQLState.SYNTAX_ERROR, 1999, "Unknown exception: %s");
-    
-    private final SQLState sqlState;
-    
-    private final int vendorCode;
-    
-    private final String reason;
-}